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
public class NoViableAltException extends RecognitionException
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NoViableAltException(Parser recognizer)
NoViableAltException(Parser recognizer, TokenStream input, Token startToken, Token offendingToken, ATNConfigSet deadEndConfigs, ParserRuleContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ATNConfigSet
getDeadEndConfigs()
Token
getStartToken()
-
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
-
-
-
-
Constructor Detail
-
NoViableAltException
public NoViableAltException(Parser recognizer)
-
NoViableAltException
public NoViableAltException(Parser recognizer, TokenStream input, Token startToken, Token offendingToken, ATNConfigSet deadEndConfigs, ParserRuleContext ctx)
-
-
Method Detail
-
getStartToken
public Token getStartToken()
-
getDeadEndConfigs
public ATNConfigSet getDeadEndConfigs()
-
-