rustemo

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

Object Safety§

This trait is not object safe.

Implementors§