Captures the string parsed by the given parser p.
Parses using one parser or the other, if the first one fails.
Parses using one parser or the other, if the first one fails. Returns the first one that succeeds and fails if both fail
Wraps a parser and prints out the indices where it starts and ends, together with its result
Wraps another parser, succeeding/failing identically but consuming no input
Wrap a parser in this if you don't want for it to show up in a stack trace
Wraps another parser, succeeding it it fails and failing if it succeeds.
Wraps another parser, succeeding it it fails and failing if it succeeds. Neither case consumes any input
Wraps a parser and succeeds with Some
if p succeeds,
and succeeds with None
if p fails.
Repeats the parser over and over.
A top-level, named parser.
A top-level, named parser. Lazily evaluates the wrapped parser
p only when parse
is called to allow for circular
dependencies between parsers.
Parsers two things in a row, returning a tuple of the two results if both things succeed
Contains an optimized version of Sequence called Sequence.Flat that
combines a tree of Sequence nodes from the left, into a single
tail-recursive function working over a Vector
of their contents.
Contains an optimized version of Sequence called Sequence.Flat that
combines a tree of Sequence nodes from the left, into a single
tail-recursive function working over a Vector
of their contents.
Intentionally completely type-unsafe internally, using casting all
over the place, because it's near impossible to make the variable-length
heterogenous-typed list type-safe without going crazy. If constructed by
flatten
-ing out a Sequence, the types are checked when the Sequence
was constructed, so it's still safe.
Parsers which are made up of other parsers, adding to or combining their behavior