D
- the type of source document identifiersT
- the type of token types; typically an enum typepublic static interface Parser.Input<D,T>
For actual, finite input the token sequence should be extended by a
potentially infinite repetition of distinguished end tokens
(typically of a reserved type EOF
) carrying no further information.
Parser.wrap(Supplier)
Modifier and Type | Method and Description |
---|---|
Parser.Input<D,T> |
consume()
Advances by one step.
|
Parser.Token<D,T> |
lookahead(int k)
Returns the token that lies a given number of steps ahead.
|
Parser.Token<D,T> |
lookbehind()
Returns the token that lies one step behind.
|
default Parser.Output<D,T> |
transitionBy(Update<SimpleMessage<D>> effect) |
Parser.Token<D,T> lookahead(int k)
k
- the number of steps to look aheadk
steps ahead from this state.IllegalArgumentException
- if k < 0
.Parser.Token<D,T> lookbehind()
IllegalStateException
- if this state points to the start
of the token sequence.Parser.Input<D,T> consume()
default Parser.Output<D,T> transitionBy(Update<SimpleMessage<D>> effect)
see also the complete user documentation .