public class OptionalParser extends DelegateParser
| Modifier and Type | Field | Description |
|---|---|---|
protected Object |
otherwise |
delegate| Constructor | Description |
|---|---|
OptionalParser(Parser delegate,
Object otherwise) |
| Modifier and Type | Method | Description |
|---|---|---|
OptionalParser |
copy() |
Returns a shallow copy of the receiver.
|
protected boolean |
hasEqualProperties(Parser other) |
Compares the properties of two parsers.
|
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, isEqualTo, isEqualTo, map, matches, matchesSkipping, neg, neg, not, not, optional, optional, or, parse, permute, pick, plus, plusGreedy, plusLazy, repeat, repeatGreedy, repeatLazy, separatedBy, seq, settable, star, starGreedy, starLazy, times, token, toString, trim, trim, trimprotected final Object otherwise
public Result parseOn(Context context)
ParserparseOn in class DelegateParserprotected boolean hasEqualProperties(Parser other)
ParserhasEqualProperties in class Parserpublic OptionalParser copy()
Parsercopy in class DelegateParserCopyright © 2018 PetitParser. All rights reserved.