Uses of Class
org.antlr.v4.runtime.RecognitionException
Packages that use RecognitionException
-
Uses of RecognitionException in org.antlr.v4.runtime
Subclasses of RecognitionException in org.antlr.v4.runtimeModifier and TypeClassDescriptionclassA semantic predicate failed during validation.classThis signifies any kind of mismatched input exceptions such as when the current input does not match the expected token.classclassIndicates that the parser could not decide which of two or more paths to take based upon the remaining input.Fields in org.antlr.v4.runtime declared as RecognitionExceptionModifier and TypeFieldDescriptionParserRuleContext.exceptionThe exception that forced this rule to return.Methods in org.antlr.v4.runtime with parameters of type RecognitionExceptionModifier and TypeMethodDescriptionRecognizer.getErrorHeader(RecognitionException e) What is the error header, normally line/character position information?voidParser.notifyErrorListeners(Token offendingToken, String msg, RecognitionException e) voidANTLRErrorStrategy.recover(Parser recognizer, RecognitionException e) This method is called to recover from exceptione.voidBailErrorStrategy.recover(Parser recognizer, RecognitionException e) Instead of recovering from exceptione, re-throw it wrapped in aParseCancellationExceptionso it is not caught by the rule function catches.voidDefaultErrorStrategy.recover(Parser recognizer, RecognitionException e) This method is called to recover from exceptione.voidLexer.recover(RecognitionException re) Lexers can normally match any char in it's vocabulary after matching a token, so do the easy thing and just kill a character and hope it all works out.protected voidParserInterpreter.recover(RecognitionException e) Rely on the error handler for this parser but, if no tokens are consumed to recover, add an error node.voidANTLRErrorStrategy.reportError(Parser recognizer, RecognitionException e) Report any kind ofRecognitionException.voidDefaultErrorStrategy.reportError(Parser recognizer, RecognitionException e) Report any kind ofRecognitionException.voidANTLRErrorListener.syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) Upon syntax error, notify any interested parties.voidBaseErrorListener.syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) voidConsoleErrorListener.syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) Upon syntax error, notify any interested parties.voidProxyErrorListener.syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) Methods in org.antlr.v4.runtime that throw RecognitionExceptionModifier and TypeMethodDescriptionParser.match(int ttype) Match current input symbol againstttype.Parser.matchWildcard()Match current input symbol as a wildcard.voidANTLRErrorStrategy.recover(Parser recognizer, RecognitionException e) This method is called to recover from exceptione.ANTLRErrorStrategy.recoverInline(Parser recognizer) This method is called when an unexpected symbol is encountered during an inline match operation, such asParser.match(int).BailErrorStrategy.recoverInline(Parser recognizer) Make sure we don't attempt to recover inline; if the parser successfully recovers, it won't throw an exception.DefaultErrorStrategy.recoverInline(Parser recognizer) This method is called when an unexpected symbol is encountered during an inline match operation, such asParser.match(int).voidThis method provides the error handler with an opportunity to handle syntactic or semantic errors in the input stream before they result in aRecognitionException.voidThe default implementation ofANTLRErrorStrategy.sync(org.antlr.v4.runtime.Parser)makes sure that the current lookahead symbol is consistent with what were expecting at this point in the ATN. -
Uses of RecognitionException in org.antlr.v4.runtime.tree.xpath
Methods in org.antlr.v4.runtime.tree.xpath with parameters of type RecognitionExceptionModifier and TypeMethodDescriptionvoidXPathLexerErrorListener.syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) -
Uses of RecognitionException in org.antlr.v4.tool
Methods in org.antlr.v4.tool with parameters of type RecognitionExceptionModifier and TypeMethodDescriptionvoidGrammarParserInterpreter.BailButConsumeErrorStrategy.recover(Parser recognizer, RecognitionException e) Methods in org.antlr.v4.tool that throw RecognitionExceptionModifier and TypeMethodDescriptionstatic List<ParserRuleContext> GrammarParserInterpreter.getAllPossibleParseTrees(Grammar g, Parser originalParser, TokenStream tokens, int decision, BitSet alts, int startIndex, int stopIndex, int startRuleIndex) Given an ambiguous parse information, return the list of ambiguous parse trees.GrammarParserInterpreter.BailButConsumeErrorStrategy.recoverInline(Parser recognizer)