pub enum ParserError {
UnsupportedRequirement(Requirement),
ParseError(ErrorKind, String),
IncompleteInput(Needed),
ExpectedIdentifier,
ExpectedToken(Token, Range<usize>, Option<Vec<(Result<Token, ParserError>, String)>>),
ExpectedFloat,
ExpectedInteger,
LexerError,
ExpectedEndOfInput,
UnknownError,
}
Expand description
A PDDL parser error
Variants§
UnsupportedRequirement(Requirement)
The PDDL file contains an unsupported requirement (e.g. :fluents
). See the Requirement
section of the README.md for a list of supported requirements.
ParseError(ErrorKind, String)
A generic parse error.
IncompleteInput(Needed)
An incomplete input error. This is returned by the parser when it needs more input to continue parsing.
ExpectedIdentifier
The parser expected an identifier, but found something else.
ExpectedToken(Token, Range<usize>, Option<Vec<(Result<Token, ParserError>, String)>>)
The parser expected a token, but found something else.
ExpectedFloat
The parser expected a float, but found something else.
ExpectedInteger
The parser expected an integer, but found something else.
LexerError
The lexer encountered an error. This is returned by the lexer when it encounters an invalid token.
ExpectedEndOfInput
The parser expected the end of input, but there was more input. This is returned by the parser when it encounters more input after the end of the PDDL file.
UnknownError
An unknown error. Default error variant. This should never be returned.
Trait Implementations§
Source§impl Clone for ParserError
impl Clone for ParserError
Source§fn clone(&self) -> ParserError
fn clone(&self) -> ParserError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ParserError
impl Debug for ParserError
Source§impl Default for ParserError
impl Default for ParserError
Source§fn default() -> ParserError
fn default() -> ParserError
Source§impl Display for ParserError
impl Display for ParserError
Source§impl Error for ParserError
impl Error for ParserError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Err<ParserError>> for ParserError
impl From<Err<ParserError>> for ParserError
Source§fn from(err: Err<ParserError>) -> Self
fn from(err: Err<ParserError>) -> Self
Source§impl From<ParseFloatError> for ParserError
impl From<ParseFloatError> for ParserError
Source§fn from(_: ParseFloatError) -> Self
fn from(_: ParseFloatError) -> Self
Source§impl From<ParseIntError> for ParserError
impl From<ParseIntError> for ParserError
Source§fn from(_: ParseIntError) -> Self
fn from(_: ParseIntError) -> Self
Source§impl<I: ToString> ParseError<I> for ParserError
impl<I: ToString> ParseError<I> for ParserError
Source§fn from_error_kind(input: I, kind: ErrorKind) -> Self
fn from_error_kind(input: I, kind: ErrorKind) -> Self
Source§fn append(_: I, _: ErrorKind, other: Self) -> Self
fn append(_: I, _: ErrorKind, other: Self) -> Self
Source§impl<'a> Parser<TokenStream<'a>, &'a str, ParserError> for Token
impl<'a> Parser<TokenStream<'a>, &'a str, ParserError> for Token
Source§fn parse(
&mut self,
input: TokenStream<'a>,
) -> IResult<TokenStream<'a>, &'a str, ParserError>
fn parse( &mut self, input: TokenStream<'a>, ) -> IResult<TokenStream<'a>, &'a str, ParserError>
Result
containing
either the remaining input and the output value, or an error