Type Alias lalrpop_util::state_machine::ParseError
source · pub type ParseError<D> = ParseError<Location<D>, Token<D>, Error<D>>;
Aliased Type§
enum ParseError<D> {
InvalidToken {
location: <D as ParserDefinition>::Location,
},
UnrecognizedEof {
location: <D as ParserDefinition>::Location,
expected: Vec<String>,
},
UnrecognizedToken {
token: (<D as ParserDefinition>::Location, <D as ParserDefinition>::Token, <D as ParserDefinition>::Location),
expected: Vec<String>,
},
ExtraToken {
token: (<D as ParserDefinition>::Location, <D as ParserDefinition>::Token, <D as ParserDefinition>::Location),
},
User {
error: <D as ParserDefinition>::Error,
},
}
Variants§
InvalidToken
Fields
§
location: <D as ParserDefinition>::Location
Generated by the parser when it encounters a token (or EOF) it did not expect.
UnrecognizedEof
Fields
§
location: <D as ParserDefinition>::Location
The end of the final token
Generated by the parser when it encounters an EOF it did not expect.
UnrecognizedToken
Fields
§
token: (<D as ParserDefinition>::Location, <D as ParserDefinition>::Token, <D as ParserDefinition>::Location)
The unexpected token of type T
with a span given by the two L
values.
Generated by the parser when it encounters a token it did not expect.
ExtraToken
Fields
§
token: (<D as ParserDefinition>::Location, <D as ParserDefinition>::Token, <D as ParserDefinition>::Location)
Generated by the parser when it encounters additional, unexpected tokens.
User
Fields
§
error: <D as ParserDefinition>::Error
Custom error type.