[−][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(L::Symbol, 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: 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]
L::Symbol: Clone,
impl<L: Eq + GrammarLabel> Eq for SPPFNode<L> where
L::Symbol: Eq,
[src]
L::Symbol: Eq,
impl<L: Ord + GrammarLabel> Ord for SPPFNode<L> where
L::Symbol: Ord,
[src]
L::Symbol: Ord,
fn cmp(&self, other: &SPPFNode<L>) -> 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 + GrammarLabel> PartialEq<SPPFNode<L>> for SPPFNode<L> where
L::Symbol: PartialEq,
[src]
L::Symbol: PartialEq,
impl<L: PartialOrd + GrammarLabel> PartialOrd<SPPFNode<L>> for SPPFNode<L> where
L::Symbol: PartialOrd,
[src]
L::Symbol: PartialOrd,
fn partial_cmp(&self, other: &SPPFNode<L>) -> Option<Ordering>
[src]
fn lt(&self, other: &SPPFNode<L>) -> bool
[src]
fn le(&self, other: &SPPFNode<L>) -> bool
[src]
fn gt(&self, other: &SPPFNode<L>) -> bool
[src]
fn ge(&self, other: &SPPFNode<L>) -> bool
[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,
L: Send,
<L as GrammarLabel>::Symbol: Send,
impl<L> Sync for SPPFNode<L> where
L: Sync,
<L as GrammarLabel>::Symbol: Sync,
L: Sync,
<L as GrammarLabel>::Symbol: Sync,
impl<L> Unpin for SPPFNode<L> where
L: Unpin,
<L as GrammarLabel>::Symbol: Unpin,
L: Unpin,
<L as GrammarLabel>::Symbol: Unpin,
impl<L> UnwindSafe for SPPFNode<L> where
L: UnwindSafe,
<L as GrammarLabel>::Symbol: UnwindSafe,
L: UnwindSafe,
<L as GrammarLabel>::Symbol: UnwindSafe,
impl<L> RefUnwindSafe for SPPFNode<L> where
L: RefUnwindSafe,
<L as GrammarLabel>::Symbol: RefUnwindSafe,
L: RefUnwindSafe,
<L as GrammarLabel>::Symbol: 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,