Skip to main content

Crate rustemo

Crate rustemo 

Source
Expand description

This crate is the runtime for the generated Rustemo parsers.

Re-exports§

pub use fancy_regex;
pub use once_cell;
pub use regex;
pub use yansi;
pub use crate::colors::*;

Modules§

colors
debug

Macros§

err
Creates error Result from message, file and span
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).
ParseError
Error type returned in Err variant of Result type from the parser.
Position
A position in the input file.
SliceBuilder
Returns a slice of the matched input. If no match is possible None is returned.
SourceSpan
Describes a span from start till end in the parsed input.
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.
ValSpan
Value with span. Used in place of parsed values which need span to report errors during semantic analysis.

Enums§

Action
An action executed by the (G)LR Parser during parsing
Error
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