Defines a SymbolParser that will check all alternative parsers for a match.
It works by adding all parsers in the ParseStack passed to it for deferred evaluation.
It tests all parsers for results and whichever matches appends a new result to the returned list.
If no parser matches, the first error to be produced gets returned.
It is the equivalent to choice for TokenParser.
It works like the pipe ( | ) operator in BNF notation and can define different rules for the same symbol.
Returns
A new TokenParser that will push all parsers for later evaluation.
Defines a SymbolParser that will check all alternative
parsersfor a match.It works by adding all
parsersin the ParseStack passed to it for deferred evaluation. It tests allparsersfor results and whichever matches appends a new result to the returned list. If no parser matches, the first error to be produced gets returned.It is the equivalent to choice for TokenParser. It works like the pipe ( | ) operator in BNF notation and can define different rules for the same symbol.
Returns
A new TokenParser that will push all
parsersfor later evaluation.See
choice