[][src]Enum gll_pg_core::SPPFNode

pub enum SPPFNode<L: GrammarLabel> {
    Dummy,
    Symbol(L::SymbolusizeusizeVec<SPPFNodeIndex>),
    Intermediate(L, usizeusizeVec<SPPFNodeIndex>),
    Packed(L, usizeVec<SPPFNodeIndex>),
}

Binary SPPF Node structure.

Each node can be one of: Dummy, Symbol, Intermediate and Packed.

Symbol is a Terminal or a Nonterminal.

Intermediate is a grammar rule with position.

Packed means different derivations of the same grammar rule.

Each grammar rule possible position corresponds to a label. So store labels for Intermediate and Packed rules.

Variants

Dummy

$ node in original paper

Symbol(L::SymbolusizeusizeVec<SPPFNodeIndex>)

(symbol, left, right, children)

Intermediate(L, usizeusizeVec<SPPFNodeIndex>)

(label, left, right, children)

Packed(L, usizeVec<SPPFNodeIndex>)

(label, split, children)

Methods

impl<L: GrammarLabel> SPPFNode<L>[src]

pub fn right_extent(&self) -> usize[src]

Get right extent of the node, panics if it doesn't have it.

pub fn left_extent(&self) -> usize[src]

Get left extent of the node, panics if it doesn't have it.

pub fn children(&self) -> Option<&Vec<SPPFNodeIndex>>[src]

Get children node references.

Trait Implementations

impl<L: Clone + GrammarLabel> Clone for SPPFNode<L> where
    L::Symbol: Clone
[src]

impl<L: Eq + GrammarLabel> Eq for SPPFNode<L> where
    L::Symbol: Eq
[src]

impl<L: Ord + GrammarLabel> Ord for SPPFNode<L> where
    L::Symbol: Ord
[src]

impl<L: PartialEq + GrammarLabel> PartialEq<SPPFNode<L>> for SPPFNode<L> where
    L::Symbol: PartialEq
[src]

impl<L: PartialOrd + GrammarLabel> PartialOrd<SPPFNode<L>> for SPPFNode<L> where
    L::Symbol: PartialOrd
[src]

impl<L: GrammarLabel> StructuralPartialEq for SPPFNode<L>[src]

impl<L: GrammarLabel> StructuralEq for SPPFNode<L>[src]

Auto Trait Implementations

impl<L> Send for SPPFNode<L> where
    L: Send,
    <L as GrammarLabel>::Symbol: Send

impl<L> Sync for SPPFNode<L> where
    L: Sync,
    <L as GrammarLabel>::Symbol: Sync

impl<L> Unpin for SPPFNode<L> where
    L: Unpin,
    <L as GrammarLabel>::Symbol: Unpin

impl<L> UnwindSafe for SPPFNode<L> where
    L: UnwindSafe,
    <L as GrammarLabel>::Symbol: UnwindSafe

impl<L> RefUnwindSafe for SPPFNode<L> where
    L: RefUnwindSafe,
    <L as GrammarLabel>::Symbol: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]