public abstract class Parser<T> extends Object
| Constructor and Description |
|---|
Parser() |
| Modifier and Type | Method and Description |
|---|---|
Parser<T> |
debug() |
<U> Parser<U> |
map(Function<T,U> transform)
this.map(transform) succeeds if this succeeds and transform is used to convert the result of this |
Parser<T> |
named(String name) |
Parser<T> |
or(Parser<T> another)
this.or(another) succeeds if this succeeds or another succeeds on the given input. |
abstract ParserResult<T> |
parse(String input) |
Parser<T> |
skip(int nChars) |
<U> Parser<Tuple2<T,U>> |
then(Parser<U> another)
this.thenL(another) succeeds if this succeeds and another succeeds on the input left over by this |
<U> Parser<T> |
thenL(Parser<U> another)
this.thenL(another) succeeds if this succeeds and another succeeds on the input left over by this |
<U> Parser<U> |
thenR(Parser<U> another)
this.thenR(another) succeeds if this succeeds and another succeeds on the input left over by this |
public abstract ParserResult<T> parse(String input)
public <U> Parser<U> map(Function<T,U> transform)
this.map(transform) succeeds if this succeeds and transform is used to convert the result of thistransform - Function to transform the result from T -> Utransform.public <U> Parser<U> thenR(Parser<U> another)
this.thenR(another) succeeds if this succeeds and another succeeds on the input left over by thisanother - Another Parserpublic <U> Parser<T> thenL(Parser<U> another)
this.thenL(another) succeeds if this succeeds and another succeeds on the input left over by thisanother - Another Parserpublic <U> Parser<Tuple2<T,U>> then(Parser<U> another)
this.thenL(another) succeeds if this succeeds and another succeeds on the input left over by thisanother - Another Parserpublic Parser<T> or(Parser<T> another)
this.or(another) succeeds if this succeeds or another succeeds on the given input.
another parser is not evaluated if this succeeds.another - Another ParserCopyright © 2016. All rights reserved.