petitparser.reflection library

This package contains tools to reflect on and transform parsers.

Functions

allParser(Parser root) → Iterable<Parser>
Returns a lazy iterable over all parsers reachable from a root. [...]
removeDuplicates(Parser parser) Parser
Returns a copy of parser with all duplicates parsers collapsed.
removeSettables(Parser parser) Parser
Returns a copy of parser with all settable parsers removed.
transformParser(Parser parser, TransformationHandler handler) Parser
Transforms all parsers reachable from parser with the given handler. The identity function returns a copy of the the incoming parser. [...]

Typedefs

TransformationHandler(Parser parser) Parser
A function transforming one parser to another one.