[−][src]Enum gll_pg_core::SPPFNode
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
$ node in original paper
Symbol(S, usize, usize, Vec<SPPFNodeIndex>)
(symbol, left, right, children)
Intermediate(L, usize, usize, Vec<SPPFNodeIndex>)
(label, left, right, children)
Packed(L, usize, Vec<SPPFNodeIndex>)
(label, split, children)
Methods
impl<L, S> SPPFNode<L, S>
[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, S: Clone> Clone for SPPFNode<L, S>
[src]
impl<L: Eq, S: Eq> Eq for SPPFNode<L, S>
[src]
impl<L: Ord, S: Ord> Ord for SPPFNode<L, S>
[src]
fn cmp(&self, other: &SPPFNode<L, S>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<L: PartialEq, S: PartialEq> PartialEq<SPPFNode<L, S>> for SPPFNode<L, S>
[src]
impl<L: PartialOrd, S: PartialOrd> PartialOrd<SPPFNode<L, S>> for SPPFNode<L, S>
[src]
fn partial_cmp(&self, other: &SPPFNode<L, S>) -> Option<Ordering>
[src]
fn lt(&self, other: &SPPFNode<L, S>) -> bool
[src]
fn le(&self, other: &SPPFNode<L, S>) -> bool
[src]
fn gt(&self, other: &SPPFNode<L, S>) -> bool
[src]
fn ge(&self, other: &SPPFNode<L, S>) -> bool
[src]
impl<L: Debug, S: Debug> Debug for SPPFNode<L, S>
[src]
impl<L, S> StructuralPartialEq for SPPFNode<L, S>
[src]
impl<L, S> StructuralEq for SPPFNode<L, S>
[src]
Auto Trait Implementations
impl<L, S> Send for SPPFNode<L, S> where
L: Send,
S: Send,
L: Send,
S: Send,
impl<L, S> Sync for SPPFNode<L, S> where
L: Sync,
S: Sync,
L: Sync,
S: Sync,
impl<L, S> Unpin for SPPFNode<L, S> where
L: Unpin,
S: Unpin,
L: Unpin,
S: Unpin,
impl<L, S> UnwindSafe for SPPFNode<L, S> where
L: UnwindSafe,
S: UnwindSafe,
L: UnwindSafe,
S: UnwindSafe,
impl<L, S> RefUnwindSafe for SPPFNode<L, S> where
L: RefUnwindSafe,
S: RefUnwindSafe,
L: RefUnwindSafe,
S: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,