[−][src]Enum antlr_rust::errors::ANTLRError
Main ANTLR4 Rust runtime error
Variants
Returned from Lexer when it fails to find matching token type for current input
Usually Lexers contain rule that captures all invalid tokens like:
ERROR_TOKEN: . ;
to prevent lexer from throwing errors and have all error handling in parser.
Fields of LexerNoAltError
start_index: isize
NoAltError(NoViableAltError)
Indicates that the parser could not decide which of two or more paths to take based upon the remaining input. It tracks the starting token of the offending input and also knows where the parser was in the various paths when the error. Reported by reportNoViableAlternative()
InputMismatchError(InputMisMatchError)
This signifies any kind of mismatched input exceptions such as when the current input does not match the expected token.
PredicateError(FailedPredicateError)
A semantic predicate failed during validation. Validation of predicates occurs when normally parsing the alternative just like matching a token. Disambiguating predicate evaluation occurs when we test a predicate during prediction.
IllegalStateError(String)
Internal error.
Indicates that error should not be processed and parser should immediately return to caller
Used to allow user to emit his own errors from parser actions or from custom error strategy
Trait Implementations
impl Clone for ANTLRError
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ANTLRError
[src]
impl Display for ANTLRError
[src]
impl Error for ANTLRError
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl RecognitionError for ANTLRError
[src]
fn get_offending_token(&self) -> Option<&dyn Token>
[src]
fn get_message(&self) -> String
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ANTLRError
impl !Send for ANTLRError
impl !Sync for ANTLRError
impl Unpin for ANTLRError
impl !UnwindSafe for ANTLRError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,