Enum gallop::GrammarError [−][src]
pub enum GrammarError<'a> { EmptyGrammar, NoStartSymbol, ReservedNonTerminal(NonTerminal<'a>), UndefinedNonTerminal(NonTerminal<'a>), InvalidGrammar { non_terminal: NonTerminal<'a>, rule: Rule<'a>, rule_element: RuleElement<'a>, }, Conflict { non_terminal: NonTerminal<'a>, rule: Rule<'a>, rule_element: RuleElement<'a>, }, }
Possible errors that could happen when creating a Parser
Variants
EmptyGrammar
The Grammar
has no rules defined yet
NoStartSymbol
The START
Rule
is not defined yet (see "Reserved Non-terminals" section)
ReservedNonTerminal(NonTerminal<'a>)
The specified NonTerminal
is actually reserved (see "Reserved Non-terminals" section)
UndefinedNonTerminal(NonTerminal<'a>)
The specified NonTerminal
is used within a Rule
but is not defined yet
InvalidGrammar
The Grammar
is invalid, as specified by:
Fields of InvalidGrammar
non_terminal: NonTerminal<'a> | The offending |
rule: Rule<'a> | The offending |
rule_element: RuleElement<'a> | The offending |
Conflict
The Grammar
has a conflict, as specified by:
Fields of Conflict
non_terminal: NonTerminal<'a> | The offending |
rule: Rule<'a> | The offending |
rule_element: RuleElement<'a> | The offending |
Trait Implementations
impl<'a> Clone for GrammarError<'a>
[src]
impl<'a> Clone for GrammarError<'a>
fn clone(&self) -> GrammarError<'a>
[src]
fn clone(&self) -> GrammarError<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a> Debug for GrammarError<'a>
[src]
impl<'a> Debug for GrammarError<'a>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> PartialEq for GrammarError<'a>
[src]
impl<'a> PartialEq for GrammarError<'a>
fn eq(&self, other: &GrammarError<'a>) -> bool
[src]
fn eq(&self, other: &GrammarError<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &GrammarError<'a>) -> bool
[src]
fn ne(&self, other: &GrammarError<'a>) -> bool
This method tests for !=
.
Auto Trait Implementations
impl<'a> Send for GrammarError<'a>
impl<'a> Send for GrammarError<'a>
impl<'a> Sync for GrammarError<'a>
impl<'a> Sync for GrammarError<'a>