Defines a TokenParser that will execute parser to check for lookahead content, and let f decide what to consume
parser
f
It can be used as lookahead for definitions of LL(k) parsers with only TokenParser parsers (where no recursion is really needed).
A new TokenParser that will execute the given parser to see if it succeeds, but without consuming the input.
The parser that will look ahead.
A callback that will accept results from parser to decide which Parser to return for execution.
Defines a TokenParser that will execute
parser
to check for lookahead content, and letf
decide what to consumeIt can be used as lookahead for definitions of LL(k) parsers with only TokenParser parsers (where no recursion is really needed).
Returns
A new TokenParser that will execute the given
parser
to see if it succeeds, but without consuming the input.