Package org.antlr.v4.runtime
Class NoViableAltException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.antlr.v4.runtime.RecognitionException
org.antlr.v4.runtime.NoViableAltException
- All Implemented Interfaces:
Serializable
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()
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ATNConfigSet
Which configurations did we try at input.index() that couldn't match input.LT(1)?private final Token
The token object at the start index; the input stream might not be buffering tokens so get a reference to it. -
Constructor Summary
ConstructorsConstructorDescriptionNoViableAltException
(Parser recognizer) NoViableAltException
(Parser recognizer, TokenStream input, Token startToken, Token offendingToken, ATNConfigSet deadEndConfigs, ParserRuleContext ctx) -
Method Summary
Methods inherited from class org.antlr.v4.runtime.RecognitionException
getCtx, getExpectedTokens, getInputStream, getOffendingState, getOffendingToken, getRecognizer, setOffendingState, setOffendingToken
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
deadEndConfigs
Which configurations did we try at input.index() that couldn't match input.LT(1)? -
startToken
The token object at the start index; the input stream might not be buffering tokens so get a reference to it. (At the time the error occurred, of course the stream needs to keep a buffer all of the tokens but later we might not have access to those.)
-
-
Constructor Details
-
NoViableAltException
-
NoViableAltException
public NoViableAltException(Parser recognizer, TokenStream input, Token startToken, Token offendingToken, ATNConfigSet deadEndConfigs, ParserRuleContext ctx)
-
-
Method Details
-
getStartToken
-
getDeadEndConfigs
-