It defines a TokenParser that will match anything until the given terminator parser matches.
The terminator parser will not be consumed and index will stay just behind it so that it can be parsed right ahead.
That is, if terminator is chained to until it will always succeed.
If target reaches EOF before matching, an error with a semantic error value returned by
EOFError gets returned.
Returns
A new TokenParser that matched everything until terminator.
It defines a TokenParser that will match anything until the given
terminator
parser matches. Theterminator
parser will not be consumed and index will stay just behind it so that it can be parsed right ahead. That is, ifterminator
is chained to until it will always succeed.If
target
reaches EOF before matching, an error with a semantic error value returned byEOFError
gets returned.Returns
A new TokenParser that matched everything until
terminator
.