Struct lalr::LR0StateMachine
[−]
[src]
pub struct LR0StateMachine<'a, T: 'a, N: 'a, A: 'a> { pub states: Vec<(ItemSet<'a, T, N, A>, BTreeMap<&'a Symbol<T, N>, usize>)>, pub start: &'a N, }
An LR(0) state machine.
Fields
states: Vec<(ItemSet<'a, T, N, A>, BTreeMap<&'a Symbol<T, N>, usize>)>
A vector of states, each of which consists of an item set and a set of transitions.
State 0 is the starting state.
start: &'a N
The starting state of the associated context-free grammar.
Methods
impl<'a, T: Ord, N: Ord, A> LR0StateMachine<'a, T, N, A>
[src]
fn extended_grammar(&self) -> Grammar<&'a T, (usize, &'a N), (usize, &'a Rhs<T, N, A>)>
Create an LALR(1) extended grammar, as described here.
impl<'a, T: Debug, N: Debug, A> LR0StateMachine<'a, T, N, A>
[src]
fn print(&self)
Print the state machine in graphviz format.