Trait ParserDefinition

Source
pub trait ParserDefinition<S, P, TK, NTK> {
    // Required methods
    fn actions(&self, state: S, token: TK) -> Vec<Action<S, P>>;
    fn goto(&self, state: S, nonterm: NTK) -> S;
    fn expected_token_kinds(&self, state: S) -> Vec<(TK, bool)>;
    fn longest_match() -> bool;
    fn grammar_order() -> bool;
}
Expand description

Provides LR actions and GOTOs given the state and term/nonterm.

Required Methods§

Source

fn actions(&self, state: S, token: TK) -> Vec<Action<S, P>>

Source

fn goto(&self, state: S, nonterm: NTK) -> S

Source

fn expected_token_kinds(&self, state: S) -> Vec<(TK, bool)>

Source

fn longest_match() -> bool

Source

fn grammar_order() -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§