Expand description
Addons for a nom parser.
-
A error code trait.
-
A richer error type ParserError.
-
A thin error type TokenizerError.
-
A tracking/logging system for the parser.
-
A simple framework to test parser functions.
-
Took some inspiration from nom_supreme and implemented a similar subset of postfix functions. They are integrated with the error Code and the error types of this crate.
-
SourceStr and SourceBytes to get context information around a Span. Can retrieve line/column information and context data without burdening every single span.
-
Uses LocatedSpan for debug builds and replaces with plan
&str
or&[u8]
for release builds. Tracking is compiled away completely for release builds.
Re-exports
pub use crate::parser_error::ParserError;
pub use crate::token_error::TokenizerError;
Modules
- Provides some extra parser combinators.
- Types used in doc tests.
- Error type, nom::error::Error replacement.
- Prelude for all traits.
- Additions to LocatedSpan, str and [u8]
- Test framework for parsers.
- Second, simpler error type. Same size as nom::error::Error.
Macros
- Defines a type alias for the span type. Switches between ParseSpan<> in debug mode and plain type in release mode.
Structs
- Central struct for tracking.
Traits
- Parser error code.
- Analog function for err_into() working on a parser, but working on the Result instead.
- This trait is used for Track.err() where the function wants to accept both
E
andnom::Err<E>
. - This trait catches the essentials for an error type within this library.
- Adds some common parser combinators as postfix operators to parser.
- This is an extension trait for nom-Results.
- This trait is implemented for an input type. It takes a tracking event and its raw data, converts if necessary and sends it to the actual tracker.
Type Aliases
- Standard input type. This is a LocatedSpan with a TrackProvider.
- ParserResult for ParserError. Equivalent to nom::IResult<(I, O), ParserError<C, I>>
- ParserResult for TokenizerError.
Equivalent to nom::IResult<(I, O), TokenizerError<C, I>>