Package org.apache.lucene.expressions.js
Class JavascriptParserErrorStrategy
- java.lang.Object
-
- org.antlr.v4.runtime.DefaultErrorStrategy
-
- org.apache.lucene.expressions.js.JavascriptParserErrorStrategy
-
- All Implemented Interfaces:
org.antlr.v4.runtime.ANTLRErrorStrategy
class JavascriptParserErrorStrategy extends org.antlr.v4.runtime.DefaultErrorStrategyAllows for proper error handling in the ANTLR 4 parser
-
-
Constructor Summary
Constructors Constructor Description JavascriptParserErrorStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrecover(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.RecognitionException re)Ensures the ANTLR parser will throw an exception after the first errororg.antlr.v4.runtime.TokenrecoverInline(org.antlr.v4.runtime.Parser recognizer)Ensures the ANTLR parser will throw an exception after the first errorvoidsync(org.antlr.v4.runtime.Parser recognizer)Do not allow syncing after errors to ensure the ANTLR parser will throw an exception-
Methods inherited from class org.antlr.v4.runtime.DefaultErrorStrategy
beginErrorCondition, consumeUntil, endErrorCondition, escapeWSAndQuote, getErrorRecoverySet, getExpectedTokens, getMissingSymbol, getSymbolText, getSymbolType, getTokenErrorDisplay, inErrorRecoveryMode, reportError, reportFailedPredicate, reportInputMismatch, reportMatch, reportMissingToken, reportNoViableAlternative, reportUnwantedToken, reset, singleTokenDeletion, singleTokenInsertion
-
-
-
-
Method Detail
-
recover
public void recover(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.RecognitionException re)Ensures the ANTLR parser will throw an exception after the first error- Specified by:
recoverin interfaceorg.antlr.v4.runtime.ANTLRErrorStrategy- Overrides:
recoverin classorg.antlr.v4.runtime.DefaultErrorStrategy- Parameters:
recognizer- the parser being usedre- the original exception from the parser
-
recoverInline
public org.antlr.v4.runtime.Token recoverInline(org.antlr.v4.runtime.Parser recognizer) throws org.antlr.v4.runtime.RecognitionExceptionEnsures the ANTLR parser will throw an exception after the first error- Specified by:
recoverInlinein interfaceorg.antlr.v4.runtime.ANTLRErrorStrategy- Overrides:
recoverInlinein classorg.antlr.v4.runtime.DefaultErrorStrategy- Parameters:
recognizer- the parser being used- Returns:
- no actual return value
- Throws:
org.antlr.v4.runtime.RecognitionException- not used as a ParseException wrapped in a RuntimeException is thrown instead
-
sync
public void sync(org.antlr.v4.runtime.Parser recognizer)
Do not allow syncing after errors to ensure the ANTLR parser will throw an exception- Specified by:
syncin interfaceorg.antlr.v4.runtime.ANTLRErrorStrategy- Overrides:
syncin classorg.antlr.v4.runtime.DefaultErrorStrategy- Parameters:
recognizer- the parser being used
-
-