[−][src]Struct rspg::grammar::Grammar
Implementations
impl<N, T> Grammar<N, T> where
N: Ord,
T: Ord,
[src]
N: Ord,
T: Ord,
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]
&self
) -> Map<Iter<'_, (N, Vec<RuleIndex>)>, fn(_: &(N, Vec<RuleIndex>)) -> &N>
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]
&self,
nonterminal: NonterminalIndex
) -> Iter<'_, RuleIndex>
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]
&self
) -> Map<Range<usize>, fn(_: usize) -> NonterminalIndex>
pub fn terminal_indices(
&self
) -> Map<Range<usize>, fn(_: usize) -> TerminalIndex>
[src]
&self
) -> Map<Range<usize>, fn(_: usize) -> TerminalIndex>
pub fn rule_indices(&self) -> Map<Range<usize>, fn(_: usize) -> RuleIndex>
[src]
impl<N, T> Grammar<N, T> where
N: Ord,
T: Ord,
[src]
N: Ord,
T: Ord,
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]
N: Ord,
T: Ord,
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]
N: Ord,
T: Ord,
impl<N: Debug, T: Debug> Debug for Grammar<N, T> where
N: Ord,
T: Ord,
[src]
N: Ord,
T: Ord,
impl<'de, N, T> Deserialize<'de> for Grammar<N, T> where
N: Ord,
T: Ord,
N: Deserialize<'de>,
T: Deserialize<'de>,
[src]
N: Ord,
T: Ord,
N: Deserialize<'de>,
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<N, T> Display for Grammar<N, T> where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
impl<N, T> DisplayWith<Grammar<N, T>> for NonterminalIndex where
N: Display + Ord,
T: Ord,
[src]
N: Display + Ord,
T: Ord,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for TerminalIndex where
N: Ord,
T: Debug + Ord,
[src]
N: Ord,
T: Debug + Ord,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T, Parsed, Token> DisplayWith<Grammar<N, T>> for SymbolStackItemString<Parsed, Token> where
N: Display + Ord,
T: Ord,
Token: Debug,
Parsed: Debug,
[src]
N: Display + Ord,
T: Ord,
Token: Debug,
Parsed: Debug,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T, Parsed, Token> DisplayWith<Grammar<N, T>> for Reduce<Parsed, Token> where
N: Display + Ord,
T: Ord,
Token: Debug,
Parsed: Debug,
[src]
N: Display + Ord,
T: Ord,
Token: Debug,
Parsed: Debug,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for Action where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for EndAction where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for FirstSet where
N: Ord,
T: Debug + Ord,
[src]
N: Ord,
T: Debug + Ord,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for FirstSets where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error>
[src]
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error>
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for FollowSet where
N: Ord,
T: Debug + Ord,
[src]
N: Ord,
T: Debug + Ord,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for FollowSets where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error> where
N: Ord,
T: Ord,
[src]
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error> where
N: Ord,
T: Ord,
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for RuleIndex where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error>
[src]
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error>
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for Symbol where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error>
[src]
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error>
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for SymbolString where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error>
[src]
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error>
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for Rule where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error>
[src]
&self,
f: &mut Formatter<'_>,
grammar: &Grammar<N, T>
) -> Result<(), Error>
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for Item where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> DisplayWith<Grammar<N, T>> for ItemSet where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<'r, N, T> DisplayWith<Grammar<N, T>> for ItemRef<'r> where
N: Display + Ord,
T: Debug + Ord,
[src]
N: Display + Ord,
T: Debug + Ord,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T, Parsed, Token> DisplayWith<Grammar<N, T>> for SymbolStackItem<Parsed, Token> where
N: Display + Ord,
T: Ord,
Token: Debug,
Parsed: Debug,
[src]
N: Display + Ord,
T: Ord,
Token: Debug,
Parsed: Debug,
fn fmt(&self, f: &mut Formatter<'_>, grammar: &Grammar<N, T>) -> Result
[src]
fn display_with<'t, 'w>(
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
[src]
&'t self,
with: &'w With
) -> DisplayWithMixer<'t, 'w, Self, With>
impl<N, T> Serialize for Grammar<N, T> where
N: Ord,
T: Ord,
N: Serialize,
T: Serialize,
[src]
N: Ord,
T: Ord,
N: Serialize,
T: Serialize,
Auto Trait Implementations
impl<N, T> RefUnwindSafe for Grammar<N, T> where
N: RefUnwindSafe,
T: RefUnwindSafe,
N: RefUnwindSafe,
T: RefUnwindSafe,
impl<N, T> Send for Grammar<N, T> where
N: Send,
T: Send,
N: Send,
T: Send,
impl<N, T> Sync for Grammar<N, T> where
N: Sync,
T: Sync,
N: Sync,
T: Sync,
impl<N, T> Unpin for Grammar<N, T> where
N: Unpin,
T: Unpin,
N: Unpin,
T: Unpin,
impl<N, T> UnwindSafe for Grammar<N, T> where
N: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
N: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,