Defines a TokenParser or SymbolParser that will chain parsers yielded by generator.
Each TokenParser or SymbolParser yielded by generator will be chained to the previous one.
An initial parser needs to be provided as the first one in the chain.
It can be used to construct parse chains in an imperative way, applying chain to any yielded
parsers. It's purpose is for convenience of writing parsers.
Returns
A new TokenParser or SymbolParser that will execute the chain defined by generator's yields with initial as it's initial parser.
Defines a TokenParser or SymbolParser that will chain parsers yielded by
generator
. Each TokenParser or SymbolParser yielded bygenerator
will be chained to the previous one. Aninitial
parser needs to be provided as the first one in the chain.It can be used to construct parse chains in an imperative way, applying chain to any yielded parsers. It's purpose is for convenience of writing parsers.
Returns
A new TokenParser or SymbolParser that will execute the chain defined by
generator
's yields withinitial
as it's initial parser.See
chain