public class StringParser extends Parser
| Modifier and Type | Method | Description |
|---|---|---|
StringParser |
copy() |
Returns a shallow copy of the receiver.
|
protected boolean |
hasEqualProperties(Parser other) |
Compares the properties of two parsers.
|
static Parser |
of(String value) |
Construct a parser that accepts the provides
String value. |
static Parser |
of(String value,
String message) |
Construct a parser that accepts the provides
String value, and that fails with
the error provided error message. |
static Parser |
ofIgnoringCase(String value) |
Construct a parser that accepts the provides
String value case insensitive. |
static Parser |
ofIgnoringCase(String value,
String message) |
Construct a parser that accepts the provides
String value case insensitive, and
that fails with the error provided error message. |
Result |
parseOn(Context context) |
Primitive method doing the actual parsing.
|
String |
toString() |
Returns a human readable string identifying this parser.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, and, callCC, delimitedBy, end, end, flatten, getChildren, hasEqualChildren, isEqualTo, isEqualTo, map, matches, matchesSkipping, neg, neg, not, not, optional, optional, or, parse, permute, pick, plus, plusGreedy, plusLazy, repeat, repeatGreedy, repeatLazy, replace, separatedBy, seq, settable, star, starGreedy, starLazy, times, token, trim, trim, trimpublic static Parser of(String value)
String value.public static Parser of(String value, String message)
String value, and that fails with
the error provided error message.public static Parser ofIgnoringCase(String value)
String value case insensitive.public static Parser ofIgnoringCase(String value, String message)
String value case insensitive, and
that fails with the error provided error message.public Result parseOn(Context context)
Parserprotected boolean hasEqualProperties(Parser other)
ParserhasEqualProperties in class Parserpublic StringParser copy()
ParserCopyright © 2018 PetitParser. All rights reserved.