[][src]Trait cfg::history::RewriteSequence

pub trait RewriteSequence {
    type Rewritten;
    fn top(
        &self,
        rhs: Symbol,
        sep: Option<Symbol>,
        new_rhs: &[Symbol]
    ) -> Self::Rewritten;
fn bottom(
        &self,
        rhs: Symbol,
        sep: Option<Symbol>,
        new_rhs: &[Symbol]
    ) -> Self::Rewritten; }

Trait for history types that allow the sequence rule to be rewritten into grammar rules.

Associated Types

type Rewritten

Must be an Action, because all created grammar rules except the topmost one will have no-op semantic action.

Loading content...

Required methods

fn top(
    &self,
    rhs: Symbol,
    sep: Option<Symbol>,
    new_rhs: &[Symbol]
) -> Self::Rewritten

Returns a history. May record the rewrite.

fn bottom(
    &self,
    rhs: Symbol,
    sep: Option<Symbol>,
    new_rhs: &[Symbol]
) -> Self::Rewritten

Returns a history. May record the rewrite.

Loading content...

Implementations on Foreign Types

impl<'a, T> RewriteSequence for &'a T where
    T: RewriteSequence
[src]

type Rewritten = T::Rewritten

Loading content...

Implementors

impl RewriteSequence for History[src]

type Rewritten = History

impl RewriteSequence for NullHistory[src]

type Rewritten = Self

Loading content...