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.

Returns the union of self and other while consuming self. If there exists a conflict in the accepting state’s production numbers an error is returned.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. 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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.