Crate lalry

Source
Expand description

This crate provides data structures for context-free grammars and LR(1) state machines, and an algorithm to convert a context-free grammar into an LR(1) state machine by the LALR(1) construction.

To use this crate, you should create a Grammar and call lalr1. Then you can use the LR1ParseTable to create your own parser.

Re-exports§

pub use config::Config;
pub use Symbol::*;

Modules§

config
This module provides a trait for the configuration of the parse table generation process.

Structs§

Grammar
A context-free grammar.
Item
An item in an LR(0) state machine, consisting of a rule with a distinguished current position.
ItemSet
A set of Items, forming a state in an LR(0) state machine.
LR0StateMachine
An LR(0) state machine.
LR1ParseTable
An LR(1) parse table.
LR1ResolvedConflict
The resolution of an LR(1) conflict. It is reported to the user during parse table generation.
LR1State
A state in an LR(1) parse table.
Rhs
The right-hand side of a rule in a context-free grammar.

Enums§

LR1Conflict
A conflict detected while trying to construct an LR(1) parse table.
LRAction
An action in an LR(1) parse table.
LRConflictResolution
The applied resolution of an LR(1) conflict.
Symbol
A symbol in a context-free grammar.