pub(crate) struct __StateMachine<'input> {
    source_id: usize,
    __phantom: PhantomData<&'input ()>,
}

Fields§

§source_id: usize§__phantom: PhantomData<&'input ()>

Trait Implementations§

Represents a location in the input text. If you are using the default tokenizer, this will be a usize.
Represents a “user error” – this can get produced by reduce() if the grammar includes =>? actions.
The type emitted by the user’s tokenizer (excluding the location information).
We assign a unique index to each token in the grammar, which we call its index. When we pull in a new Token from the input, we then match against it to determine its index. Note that the actual Token is retained too, as it may carry additional information (e.g., an ID terminal often has a string value associated with it; this is not important to the parser, but the semantic analyzer will want it).
The type representing things on the LALRPOP stack. Represents the union of terminals and nonterminals.
Type produced by reducing the start symbol.
Identifies a state. Typically an i8, i16, or i32 (depending on how many states you have).
Identifies an action.
Identifies a reduction.
Identifies a nonterminal.
Returns a location representing the “start of the input”.
Returns the initial state.
Converts the user’s tokens into an internal index; this index is then used to index into actions and the like. When using an internal tokenizer, these indices are directly produced. When using an external tokenier, however, this function matches against the patterns given by the user: it is fallible therefore as these patterns may not be exhaustive. If a token value is found that doesn’t match any of the patterns the user supplied, then this function returns None, which is translated into a parse error by LALRPOP (“unrecognized token”).
Given the top-most state and the pending terminal, returns an action. This can be either SHIFT(state), REDUCE(action), or ERROR.
Returns the action to take if an error occurs in the given state. This function is the same as the ordinary action, except that it applies not to the user’s terminals but to the “special terminal” !.
Action to take if EOF occurs in the given state. This function is the same as the ordinary action, except that it applies not to the user’s terminals but to the “special terminal” $.
If we reduce to a nonterminal in the given state, what state do we go to? This is infallible due to the nature of LR(1) grammars.
“Upcast” a terminal into a symbol so we can push it onto the parser stack.
Returns the expected tokens in a given state. This is used for error reporting.
True if this grammar supports error recovery.
Given error information, creates an error recovery symbol that we push onto the stack (and supply to user actions).
Execute a reduction in the given state: that is, execute user code. The start location indicates the “starting point” of the current lookahead that is triggering the reduction (it is None for EOF). Read more
Returns information about how many states will be popped during a reduction, and what nonterminal would be produced as a result.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more