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

InvalidToken

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

Fields

location: L
UnrecognizedToken

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

Fields

token: Option<(L, T, L)>

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.

expected: Vec<String>

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

ExtraToken

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

Fields

token: (L, T, L)
User

Custom error type.

Fields

error: E

Trait Implementations

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

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.