Function alternatives

  • 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.

    See

    choice

    Type Parameters

    Parameters

    Returns SymbolParser<D, E>