Expand description
Parser combinator library.
Macros§
- byte_
map - Helper to create a
parser::byte_lutparser usingmatch-like syntax. - literal_
map - Helper to create a
Leafparser matching string literals usingmatch-like syntax. - parsable_
enum - Helper to define a
Parseablefieldless unit-only enum. - parse_
tree - Helper to define a custom
Parserusing amatchinspired parse tree syntax.
Structs§
- ErrToken
- ZST used to ensure that
Parserimplementations push errors toParseState. - Parse
State - Per-parse shared state.
- Parser
Iterator - An iterator that lazily parses the input using the provided parser.
- Parser
Matches Iterator - An iterator which returns successful parse outputs only, skipping over errors.
Enums§
- Parse
Error - Error type returned by parsers.
Traits§
- Leaf
- Trait implemented by atomic, fail‑fast parsers.
- Parseable
- Trait for types that have a canonical
Leafparser. - Parser
- Trait implemented by all parsers.
Functions§
- byte
Leafparser that consumes a single byte.- byte_
lut Leafparser that consumes a single byte and maps it using a lookup table.- byte_
range Leafparser that consumes a single byte in the supplied range.- constant
Leafparser that consumes no input and always succeeds, returning the provided value.- digit
Leafparser for single digits.- eof
Leafparser which matches the end of the input.- eol
Leafparser which matches newlines or the end of the input.- from_
leaf_ fn - Coerces the provided function/closure into a
Leafparser. - from_
parser_ fn Parserwhich delegates to the provided function/closure.- i8
Leafparser fori8values.- i16
Leafparser fori16values.- i32
Leafparser fori32values.- i64
Leafparser fori64values.- i128
Leafparser fori128values.- noop
Leafparser that consumes no input and always succeeds, returning().- number_
range Leafparser for numbers in the supplied range.- one_of
Parserwhich tries a list of parsers in order until one succeeds.- take_
while Leafparser for substrings matching the provided function.- take_
while1 Leafparser for non-empty substrings matching the provided function.- u8
Leafparser foru8values.- u16
Leafparser foru16values.- u32
Leafparser foru32values.- u64
Leafparser foru64values.- u128
Leafparser foru128values.
Type Aliases§
- Leaf
Result Resulttype returned byLeaf::parse.- Parser
Result Resulttype returned byParser::parse_ctx.