Enum lalrpop_util::ParseError [] [src]

pub enum ParseError<L, T, E> {
    InvalidToken {
        location: L,
    },
    UnrecognizedToken {
        token: Option<(L, T, L)>,
        expected: Vec<String>,
    },
    ExtraToken {
        token: (L, T, L),
    },
    User {
        error: E,
    },
}

Variants

Generated by the parser when it encounters a token (or EOF) it did not expect.

Fields of InvalidToken

Generated by the parser when it encounters a token (or EOF) it did not expect.

Fields of UnrecognizedToken

If this is Some, then an unexpected token of type T was observed, with a span given by the two L values. If this is None, then EOF was observed when it was not expected.

The set of expected tokens: these names are taken from the grammar and hence may not necessarily be suitable for presenting to the user.

Generated by the parser when it encounters additional, unexpected tokens.

Fields of ExtraToken

Custom error type.

Fields of User

Trait Implementations

impl<L: Clone, T: Clone, E: Clone> Clone for ParseError<L, T, E>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<L: Debug, T: Debug, E: Debug> Debug for ParseError<L, T, E>
[src]

Formats the value using the given formatter.

impl<L: PartialEq, T: PartialEq, E: PartialEq> PartialEq for ParseError<L, T, E>
[src]

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

This method tests for !=.

impl<L: Eq, T: Eq, E: Eq> Eq for ParseError<L, T, E>
[src]

impl<L: PartialOrd, T: PartialOrd, E: PartialOrd> PartialOrd for ParseError<L, T, E>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<L: Ord, T: Ord, E: Ord> Ord for ParseError<L, T, E>
[src]

This method returns an Ordering between self and other. Read more

impl<L, T, E> Display for ParseError<L, T, E> where
    L: Display,
    T: Display,
    E: Display
[src]

Formats the value using the given formatter. Read more

impl<L, T, E> Error for ParseError<L, T, E> where
    L: Debug + Display,
    T: Debug + Display,
    E: Debug + Display
[src]

A short description of the error. Read more

The lower-level cause of this error, if any. Read more