perplex_runtime

Trait StateSpace

Source
pub trait StateSpace {
    type Terminal;
    type Nonterminal;
    type Root;

    // Required methods
    fn root_state_fn<P: Parser<Terminal = Self::Terminal, Nonterminal = Self::Nonterminal>>(    ) -> fn(_: &mut P);
    fn root_goto_fn<P: Parser<Terminal = Self::Terminal, Nonterminal = Self::Nonterminal>>(    ) -> fn(_: &mut P, _: Self::Nonterminal);
}
Expand description

A description of a parser’s state space.

Required Associated Types§

Source

type Terminal

The type of terminals the parser emits.

Source

type Nonterminal

The type of nonterminals the parser emits.

Source

type Root

The type of the reduction produce by the root rule.

Required Methods§

Source

fn root_state_fn<P: Parser<Terminal = Self::Terminal, Nonterminal = Self::Nonterminal>>() -> fn(_: &mut P)

Return the root state function.

Source

fn root_goto_fn<P: Parser<Terminal = Self::Terminal, Nonterminal = Self::Nonterminal>>() -> fn(_: &mut P, _: Self::Nonterminal)

Return the root goto function.

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§