PEG parser combinators using operator overloading without macros.
p.name(_)
, give parser a name to identify parsing errors.p.convert(f)
, convert parser result to desired value, fail in case of conversion error.list(p,s)
backtrack to the last successfully matched element.p.pos()
to get input position after matching p.pom::Parser<I, O>
as alias of pom::parser::Parser<'static, I, O>
.Add p >> q
operation, where q depends on the result of p.
Input
is a trait.Input
has two impls: DataInput
and TextInput
.Add list(p,s) to parse separated list.
Ingenious design and implementation of parser combinators.