Expand description
This crate is the runtime for the generated Rustemo parsers.
Re-exports§
pub use colored;
pub use fancy_regex;
pub use once_cell;
pub use regex;
Modules§
Macros§
- err
- Creates error Result from message, file and location
- log
- Prints with newline to stdout in debug profile
- logn
- Prints without newline to stdout in debug profile
- rustemo_
mod - Loads generated parser modules from the Cargo OUT_DIR location.
Structs§
- Forest
- Shared Packed Parse Forest (SPPF) returned by the GLR parser.
- GlrParser
- An implementation of Right-Nulled GLR parsing (RNGLR)
- GssHead
- A node/head in the Graph Structured Stack (GSS). Implements
Context
for GLR parsing. - LRContext
Context
implementation for LR parsing- LRParser
- An implementation of LR parsing
- Line
Column - A line-column based location for use where applicable (e.g. plain text).
- Location
- Describes a span from start till end in the parsed input.
- Slice
Builder - Returns a slice of the matched input. If no match is possible
None
is returned. - String
Lexer - A lexer that operates over string inputs and uses generated string and regex recognizers provided by the parser table.
- Token
- Represents a single token from the input stream.
- Tree
Builder - TreeBuilder is a builder that builds a generic concrete parse tree.
- ValLoc
- Value with location. Used in place of parsed values which need locations to report errors during semantic analysis.
Enums§
- Action
- An action executed by the (G)LR Parser during parsing
- Error
- Error type returned in
Err
variant ofResult
type from the parser. - Position
- A position in the input file.
- Tree
Node - A node in the generic tree produced by
TreeBuilder
Traits§
- Builder
- Builds output during parsing by using semantic actions.
- Context
- Lexer/Parser context is used to keep the state. It provides necessary information to parsers and actions.
- Input
- Input is a sliceable sequence-like type with a concept of length.
- LRBuilder
- A builder variant for LR parsing.
- Lexer
- The trait implemented by all Rustemo lexers
- Parser
- The trait implemented by all Rustemo parsers.
- Parser
Definition - Provides LR actions and GOTOs given the state and term/nonterm.
- State
- This trait must be implemented by the parser state type.
- Token
Recognizer - The trait implemented by types used to recognize tokens in string inputs.
Used by
StringLexer
.