Modifier and Type | Method and Description |
---|---|
static <I,E> Parser<Stream<I>,I,E> |
element(E e)
Returns a parser that produces an element from the stream if it is available and fails otherwise.
|
static <I,E> Parser<Stream<I>,I,E> |
element(F0<E> e)
Returns a parser that produces an element from the stream if it is available and fails otherwise.
|
static <I,E> Parser<Stream<I>,I,E> |
satisfy(E missing,
F<I,E> sat,
F<I,java.lang.Boolean> f)
Returns a parser that produces an element from the stream that satisfies the given predicate, or fails.
|
static <I,E> Parser<Stream<I>,I,E> |
satisfy(F0<E> missing,
F<I,E> sat,
F<I,java.lang.Boolean> f)
Returns a parser that produces an element from the stream that satisfies the given predicate, or fails.
|
public static <I,E> Parser<Stream<I>,I,E> element(F0<E> e)
e
- The error to fail with if no element is available.public static <I,E> Parser<Stream<I>,I,E> element(E e)
e
- The error to fail with if no element is available.public static <I,E> Parser<Stream<I>,I,E> satisfy(F0<E> missing, F<I,E> sat, F<I,java.lang.Boolean> f)
missing
- The error if no element is available.sat
- The error if the element does not satisfy the predicate.f
- The predicate that the element should satisfy.public static <I,E> Parser<Stream<I>,I,E> satisfy(E missing, F<I,E> sat, F<I,java.lang.Boolean> f)
missing
- The error if no element is available.sat
- The error if the element does not satisfy the predicate.f
- The predicate that the element should satisfy.