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

The Grammar has no rules defined yet

The START Rule is not defined yet (see "Reserved Non-terminals" section)

The specified NonTerminal is actually reserved (see "Reserved Non-terminals" section)

The specified NonTerminal is used within a Rule but is not defined yet

The Grammar is invalid, as specified by:

Fields of InvalidGrammar

The offending NonTerminal

The offending Rule

The offending RuleElement

The Grammar has a conflict, as specified by:

Fields of Conflict

The offending NonTerminal

The offending Rule

The offending RuleElement

Trait Implementations

impl<'a> Clone for GrammarError<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for GrammarError<'a>
[src]

[src]

Formats the value using the given formatter.

impl<'a> PartialEq for GrammarError<'a>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.