Struct lrtable::StateGraph

source ·
pub struct StateGraph<StorageT: Eq + Hash> { /* private fields */ }

Implementations

Return an iterator which produces (in order from 0..self.rules_len()) all this grammar’s valid RIdxs.

Return the itemset for closed state stidx. Panics if stidx doesn’t exist.

Return an iterator over all closed states in this StateGraph.

Return the itemset for core state stidx or None if it doesn’t exist.

Return an iterator over all core states in this StateGraph.

How many states does this StateGraph contain? NB: By definition the StateGraph contains the same number of core and closed states.

Return the state pointed to by sym from stidx or None otherwise.

Return the edges for state stidx. Panics if stidx doesn’t exist.

How many edges does this StateGraph contain?

Pretty print this stategraph as a String. If core_states is set to true, only the core states are pretty printed; if set to false, all states (including non-core states) are pretty printed.

Return a pretty printed version of the core states, and all edges.

Return a pretty printed version of the closed states, and all edges.

Trait Implementations

Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.