Struct perplex_runtime::ParserMachine[][src]

pub struct ParserMachine<I: ParserInput, S: StateSpace> { /* fields omitted */ }

A parser state machine.

This struct implements the parse stack and driver for the parser. It is generic over the means by which terminals arrive at the input.

Methods

impl<I: ParserInput<Item = S::Terminal>, S: StateSpace> ParserMachine<I, S>
[src]

Create a new parser state machine.

Run the parser to completion.

impl<I: Iterator, S: StateSpace<Terminal = Option<I::Item>>> ParserMachine<IterInput<I>, S>
[src]

Create a new parser state machine from an iterator.

Trait Implementations

impl<I, S> Parser for ParserMachine<I, S> where
    I: ParserInput<Item = S::Terminal>,
    S: StateSpace
[src]

The type of terminals the parser emits.

The type of nonterminals the parser emits. This is likely an enum over all nonterminals generated automatically. Read more

Peek at the next terminal in the sequence without shifting it.

Push the next terminal onto the stack. Read more

Push a nonterminal onto the stack. Read more

Reduce the tail of the stack to a nonterminal. Read more

Accept the last symbol on the stack as the parse result. Read more

Auto Trait Implementations

impl<I, S> Send for ParserMachine<I, S> where
    I: Send,
    <S as StateSpace>::Nonterminal: Send,
    <S as StateSpace>::Terminal: Send

impl<I, S> Sync for ParserMachine<I, S> where
    I: Sync,
    <S as StateSpace>::Nonterminal: Sync,
    <S as StateSpace>::Terminal: Sync