|
final
<U extends T>
Parser<U>
|
action(Callback<U> callback)
Creates a Action that will fire and call
Callback.handle whenever this matches.
|
|
static
<T>
Parser<T>
|
alternative(Parser<? super T> left, Parser<? super T> right)
Creates an Alternative parser from the left and
right sub-parsers.
|
|
static
<T>
Parser<T>
|
difference(Parser<? super T> left, Parser<? super T> right)
Creates a Difference parser from the left and
right sub-parsers.
|
|
static
<T>
Parser<T>
|
intersection(Parser<? super T> left, Parser<? super T> right)
Creates an Intersection parser from the left and
right sub-parsers.
|
|
final
Parser<T>
|
list(Parser<? super T> sep)
Creates a Parser that matches a sequence of this
parsers separated by sep parsers.
|
|
final
Parser<T>
|
optional()
Creates a Repeat parser that matches this either
0 or 1 times.
|
|
final
int
|
parse(String str, T udata)
Convenience routine to parse a string.
|
|
abstract
int
|
parse(char[] buf, int start, int end, T udata)
The parse interface that subclasses must implement.
|
|
final
int
|
parse(Reader reader, T udata)
Convenience routine to parse a java.io.Reader.
|
|
final
int
|
parse(char[] buf, T udata)
Convenience routine to parse a character array.
|
|
final
Parser<T>
|
plus()
Creates a Repeat parser that matches this 1 or
more times.
|
|
final
Parser<T>
|
repeat(int min, int max)
Creates a Repeat parser that matches this at
least min times and not mroe than max times.
|
|
final
Parser<T>
|
repeat(int count)
Creates a Repeat parser that matches this
exactly count times.
|
|
static
<T>
Parser<T>
|
sequence(Parser<? super T> one, Parser<? super T> two, Parser<? super T> three, Parser<? super T> four)
Creates a sequence of four parsers.
|
|
static
<T>
Parser<T>
|
sequence(Parser<? super T> one, Parser<? super T> two, Parser<? super T> three, Parser<? super T> four, Parser<? super T> five)
Creates a sequence of five parsers.
|
|
static
<T>
Parser<T>
|
sequence(Parser<? super T> one, Parser<? super T> two, Parser<? super T> three)
Creates a Sequence parser from parsers one,
two and three sub-parsers.
|
|
static
<T>
Parser<T>
|
sequence(Parser<? super T> left, Parser<? super T> right)
Creates a Sequence parser from the left and
right sub-parsers.
|
|
final
Parser<T>
|
star()
Creates a Repeat parser that matches this 0 or
more times.
|