public class ChoiceParser extends ListParser
parsers| Constructor | Description |
|---|---|
ChoiceParser(Parser... parsers) |
| Modifier and Type | Method | Description |
|---|---|---|
ChoiceParser |
copy() |
Returns a shallow copy of the receiver.
|
ChoiceParser |
or(Parser... others) |
Returns a parser that accepts the receiver or
other. |
Result |
parseOn(Context context) |
Primitive method doing the actual parsing.
|
getChildren, replaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, and, callCC, delimitedBy, end, end, flatten, hasEqualChildren, hasEqualProperties, isEqualTo, isEqualTo, map, matches, matchesSkipping, neg, neg, not, not, optional, optional, parse, permute, pick, plus, plusGreedy, plusLazy, repeat, repeatGreedy, repeatLazy, separatedBy, seq, settable, star, starGreedy, starLazy, times, token, toString, trim, trim, trimpublic ChoiceParser(Parser... parsers)
public Result parseOn(Context context)
Parserpublic ChoiceParser or(Parser... others)
Parserother. The resulting parser returns the
parse result of the receiver, if the receiver fails it returns the parse result of
other (exclusive ordered choice).public ChoiceParser copy()
ParserCopyright © 2018 PetitParser. All rights reserved.