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
terminatorparser matches. Theterminatorparser will not be consumed and index will stay just behind it so that it can be parsed right ahead. That is, ifterminatoris chained to until it will always succeed.If
targetreaches EOF before matching, an error with a semantic error value returned byEOFErrorgets returned.Returns
A new TokenParser that matched everything until
terminator.