Expand description
Parsell: an LL(1) streaming parser combinator library for Rust
The goal of this library is to provide parser combinators that:
- are optimized for LL(1) grammars,
- support streaming input,
- do as little buffering or copying as possible, and
- do as little dynamic method dispatch as possible.
It is based on:
- Monadic Parsing in Haskell by G. Hutton and E. Meijer, JFP 8(4) pp. 437-444,
- Nom, eating data byte by byte by G. Couprie.
Modules§
- impls
- Provide implementations of parser traits.
Structs§
- InState
- A parser that knows its current state.
Enums§
- Parse
Result - The result of parsing
Constants§
- CHARACTER
- A committed parser that reads one character.
Traits§
- Boxable
- A trait for boxable parsers.
- Committed
- A trait for committed parsers.
- Committed
Infer - A trait for committed parsers which can infer their output type from their input types.
- Consumer
- A trait for consumers of data, typically buffers.
- Downcast
- A trait for subtyping where conversion downwards is possible (e.g.
Cow<'a,str>
can be converted toCow<'static,str>
). - Factory
- A trait for factories.
- Function
- A trait for one-argument functions.
- HasOutput
- A trait for parsers which can infer their output type from their input types.
- Parser
- A trait for stateless parsers.
- Peekable
Iterator - Stateful
- A trait for stateful parsers.
- Stateful
Infer - A trait for stateful parsers which can infer their output type from their input types.
- Stateful
Str - A trait for stateful string parsers.
- Static
Marker - A marker trait for static data.
- ToStatic
- A trait for data which can be saved to and restored from long-lived state.
- Uncommitted
- A trait for uncommitted parsers.
- Uncommitted
Infer - A trait for uncommitted parsers which can infer their output type from their input types.
- Uncommitted
Str - A trait for uncommitted string parsers.
- Upcast
- A trait for subtyping
- Variant
Function - A trait for functions that can compute their inputs from their outputs
Functions§
- character
- An uncommitted parser that reads one character.
- character_
map - An uncommitted parser that reads one character and applies a function to it.
- character_
map_ ref - An uncommitted parser that reads one character by reference and applies a function to it.
- character_
ref - An uncommitted parser that reads one character by reference.
- emit
- A committed parser that reads zero characters.