Expand description
Parser primitives that accept specific token patterns.
“These creatures you call mice, you see, they are not quite as they appear. They are merely the protrusion into our dimension of vastly hyperintelligent pandimensional beings.”
Chumsky parsers are created by combining together smaller parsers. Right at the bottom of the pile are the parser primitives, a parser developer’s bread & butter. Each of these primitives are very easy to understand in isolation, usually only doing one thing.
The Important Ones
Structs
See filter_map
.
See take_until
.
Traits
A utility trait to abstract over linear container-like things.
Functions
A parser that accepts any input (but not the end of input).
Parse using a tuple of many parsers, producing the output of the first to successfully parse.
A parser primitive that allows you to define your own custom parsers.
A parser that parses no inputs.
A parser that accepts only the end of input.
A parser that accepts only inputs that match the given predicate.
A parser that accepts a input and tests it against the given fallible function.
A parser that accepts only the given input.
A parser that accepts any input that is not in a sequence of specific inputs.
A parser that accepts one of a sequence of specific inputs.
A parser that accepts only a sequence of specific inputs.
A parser that accepts any number of inputs until a terminating pattern is reached.
A parser that can be used wherever you need to implement a parser later.