Trait menhir_runtime::LRParser
[−]
[src]
pub trait LRParser { type Terminal: Copy; type State: Copy; type YYType; fn error() -> Self::Terminal; fn default_reduction(
state: Self::State
) -> Option<Option<SemAct<Self::YYType, Self::State>>>; fn action(
state: Self::State,
token: Self::Terminal
) -> Action<Self::YYType, Self::State>; }
Trait describing a Menhir parser.
This trait is implemented by the parsers generated by Menhir and describes the parser interface. Menhir should generate a single type implenting this trait for each grammar file.
The user of the generated parser should probably not use this interface
directly and see EntryPoint
instead. This interface should not be
considered stable.
Associated Types
Required Methods
fn error() -> Self::Terminal
fn default_reduction(
state: Self::State
) -> Option<Option<SemAct<Self::YYType, Self::State>>>
state: Self::State
) -> Option<Option<SemAct<Self::YYType, Self::State>>>
fn action(
state: Self::State,
token: Self::Terminal
) -> Action<Self::YYType, Self::State>
state: Self::State,
token: Self::Terminal
) -> Action<Self::YYType, Self::State>