pub struct StateTable<StorageT> {
    pub final_state: StIdx,
    /* private fields */
}
Expand description

A representation of a StateTable for a grammar. actions and gotos are split into two separate hashmaps, rather than a single table, due to the different types of their values.

Fields

final_state: StIdx

Implementations

Return the action for stidx and sym, or None if there isn’t any.

Return an iterator over the indexes of all non-empty actions of stidx.

Return an iterator over the indexes of all shift actions of stidx. By definition this is a subset of the indexes produced by state_actions.

Does the state stidx 1) only contain reduce (and error) actions 2) do those reductions all reduce to the same production?

Return an iterator over a set of “core” reduces of stidx. This is a minimal set of reduce actions which explore all possible reductions from a given state. Note that these are chosen non-deterministically from a set of equivalent reduce actions: you must not rely on always seeing the same reduce actions. For example if a state has these three items:

[E -> a ., $] [E -> b ., $] [F -> c ., $]

then the core reduces will be:

One of: [E -> a., $] or [E -> b., $] And: [F -> c., $]

since the two [E -> …] items both have the same effects on a parse stack.

Return the goto state for stidx and ridx, or None if there isn’t any.

Return a struct containing all conflicts or None if there aren’t any.

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.