Struct parol::analysis::lookahead_dfa::LookaheadDFA [−][src]
pub struct LookaheadDFA {
pub states: Vec<DFAState>,
pub transitions: BTreeMap<StateIndex, BTreeMap<usize, StateIndex>>,
pub k: usize,
}
Expand description
The lookahead DFA. Used to calculate a certain production number from a sequence of terminals.
The start state is per definition always the state with index 0.
Fields
states: Vec<DFAState>
transitions: BTreeMap<StateIndex, BTreeMap<usize, StateIndex>>
The transitions data is the relation: “from-state -> terminal -> to-state” Actually a map of from-states to terminal transitions, which in turn are maps from terminals to to-states.
k: usize
Maximum number of tokens needed to reach an accepting state It is equivalent to the maximum length over all contributing k-tuples.
Implementations
Returns the union of self and other without changing self. If there exists a conflict in the accepting states production numbers an error is returned.
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for LookaheadDFA
impl Send for LookaheadDFA
impl Sync for LookaheadDFA
impl Unpin for LookaheadDFA
impl UnwindSafe for LookaheadDFA
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.