Crate rustemo

Source
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§

debug

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
LineColumn
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.
SliceBuilder
Returns a slice of the matched input. If no match is possible None is returned.
StringLexer
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.
TreeBuilder
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 of Result type from the parser.
Position
A position in the input file.
TreeNode
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.
ParserDefinition
Provides LR actions and GOTOs given the state and term/nonterm.
State
This trait must be implemented by the parser state type.
TokenRecognizer
The trait implemented by types used to recognize tokens in string inputs. Used by StringLexer.

Type Aliases§

Result