[][src]Struct rspg::grammar::Grammar

pub struct Grammar<N, T> where
    N: Ord,
    T: Ord
{ /* fields omitted */ }

Implementations

impl<N, T> Grammar<N, T> where
    N: Ord,
    T: Ord
[src]

pub fn start(&self) -> &N[src]

pub fn start_index(&self) -> NonterminalIndex[src]

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

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

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

pub fn nonterminals(
    &self
) -> Map<Iter<'_, (N, Vec<RuleIndex>)>, fn(_: &(N, Vec<RuleIndex>)) -> &N>
[src]

pub fn terminals(&self) -> Iter<'_, T>[src]

pub fn rules(&self) -> Iter<'_, Rule>[src]

pub fn rules_with_left(
    &self,
    nonterminal: NonterminalIndex
) -> Iter<'_, RuleIndex>
[src]

pub fn nonterminal(&self, index: NonterminalIndex) -> &N[src]

pub fn terminal(&self, index: TerminalIndex) -> &T[src]

pub fn rule(&self, index: RuleIndex) -> &Rule[src]

pub fn nonterminal_indices(
    &self
) -> Map<Range<usize>, fn(_: usize) -> NonterminalIndex>
[src]

pub fn terminal_indices(
    &self
) -> Map<Range<usize>, fn(_: usize) -> TerminalIndex>
[src]

pub fn rule_indices(&self) -> Map<Range<usize>, fn(_: usize) -> RuleIndex>[src]

impl<N, T> Grammar<N, T> where
    N: Ord,
    T: Ord
[src]

pub fn nonterminal_index(&self, nonterminal: &N) -> NonterminalIndex[src]

pub fn contains_nonterminal(&self, nonterminal: &N) -> bool[src]

impl<N, T> Grammar<N, T> where
    N: Ord,
    T: Ord
[src]

pub fn terminal_index(&self, terminal: &T) -> TerminalIndex[src]

pub fn contains_terminal(&self, terminal: &T) -> bool[src]

Trait Implementations

impl<N: Clone, T: Clone> Clone for Grammar<N, T> where
    N: Ord,
    T: Ord
[src]

impl<N: Debug, T: Debug> Debug for Grammar<N, T> where
    N: Ord,
    T: Ord
[src]

impl<'de, N, T> Deserialize<'de> for Grammar<N, T> where
    N: Ord,
    T: Ord,
    N: Deserialize<'de>,
    T: Deserialize<'de>, 
[src]

impl<N, T> Display for Grammar<N, T> where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for NonterminalIndex where
    N: Display + Ord,
    T: Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for TerminalIndex where
    N: Ord,
    T: Debug + Ord
[src]

impl<N, T, Parsed, Token> DisplayWith<Grammar<N, T>> for SymbolStackItemString<Parsed, Token> where
    N: Display + Ord,
    T: Ord,
    Token: Debug,
    Parsed: Debug
[src]

impl<N, T, Parsed, Token> DisplayWith<Grammar<N, T>> for Reduce<Parsed, Token> where
    N: Display + Ord,
    T: Ord,
    Token: Debug,
    Parsed: Debug
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for Action where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for EndAction where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for FirstSet where
    N: Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for FirstSets where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for FollowSet where
    N: Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for FollowSets where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for RuleIndex where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for Symbol where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for SymbolString where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for Rule where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for Item where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T> DisplayWith<Grammar<N, T>> for ItemSet where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<'r, N, T> DisplayWith<Grammar<N, T>> for ItemRef<'r> where
    N: Display + Ord,
    T: Debug + Ord
[src]

impl<N, T, Parsed, Token> DisplayWith<Grammar<N, T>> for SymbolStackItem<Parsed, Token> where
    N: Display + Ord,
    T: Ord,
    Token: Debug,
    Parsed: Debug
[src]

impl<N, T> Serialize for Grammar<N, T> where
    N: Ord,
    T: Ord,
    N: Serialize,
    T: Serialize
[src]

Auto Trait Implementations

impl<N, T> RefUnwindSafe for Grammar<N, T> where
    N: RefUnwindSafe,
    T: RefUnwindSafe

impl<N, T> Send for Grammar<N, T> where
    N: Send,
    T: Send

impl<N, T> Sync for Grammar<N, T> where
    N: Sync,
    T: Sync

impl<N, T> Unpin for Grammar<N, T> where
    N: Unpin,
    T: Unpin

impl<N, T> UnwindSafe for Grammar<N, T> where
    N: RefUnwindSafe + UnwindSafe,
    T: RefUnwindSafe + UnwindSafe

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.