类 BeetlAntlrErrorStrategy
java.lang.Object
org.antlr.v4.runtime.DefaultErrorStrategy
org.beetl.core.parser.BeetlAntlrErrorStrategy
- 所有已实现的接口:
org.antlr.v4.runtime.ANTLRErrorStrategy
public class BeetlAntlrErrorStrategy
extends org.antlr.v4.runtime.DefaultErrorStrategy
antlr 语法解析错的处理策略。对所有语法错误,都抛出以阻止继续解析
- 作者:
- xiandafu
-
字段概要
从类继承的字段 org.antlr.v4.runtime.DefaultErrorStrategy
errorRecoveryMode, lastErrorIndex, lastErrorStates, nextTokensContext, nextTokensState -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected StringgetErrorKey(String key) protected GrammarTokengetGrammarToken(org.antlr.v4.runtime.Token token) voidrecover(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.RecognitionException e) org.antlr.v4.runtime.TokenrecoverInline(org.antlr.v4.runtime.Parser recognizer) Make sure we don't attempt to recover inline; if the parser successfully recovers, it won't throw an exception.voidreportError(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.RecognitionException e) protected voidreportFailedPredicate(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.FailedPredicateException e) protected voidreportInputMismatch(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.InputMismatchException e) protected voidreportMissingToken(org.antlr.v4.runtime.Parser recognizer) protected voidreportNoViableAlternative(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.NoViableAltException e) protected voidreportUnwantedToken(org.antlr.v4.runtime.Parser recognizer) voidsync(org.antlr.v4.runtime.Parser recognizer) Make sure we don't attempt to recover from problems in subrules.从类继承的方法 org.antlr.v4.runtime.DefaultErrorStrategy
beginErrorCondition, consumeUntil, endErrorCondition, escapeWSAndQuote, getErrorRecoverySet, getExpectedTokens, getMissingSymbol, getSymbolText, getSymbolType, getTokenErrorDisplay, inErrorRecoveryMode, reportMatch, reset, singleTokenDeletion, singleTokenInsertion
-
构造器详细资料
-
BeetlAntlrErrorStrategy
public BeetlAntlrErrorStrategy()
-
-
方法详细资料
-
recover
public void recover(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.RecognitionException e) - 指定者:
recover在接口中org.antlr.v4.runtime.ANTLRErrorStrategy- 覆盖:
recover在类中org.antlr.v4.runtime.DefaultErrorStrategy
-
reportError
public void reportError(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.RecognitionException e) - 指定者:
reportError在接口中org.antlr.v4.runtime.ANTLRErrorStrategy- 覆盖:
reportError在类中org.antlr.v4.runtime.DefaultErrorStrategy
-
reportNoViableAlternative
protected void reportNoViableAlternative(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.NoViableAltException e) - 覆盖:
reportNoViableAlternative在类中org.antlr.v4.runtime.DefaultErrorStrategy
-
reportInputMismatch
protected void reportInputMismatch(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.InputMismatchException e) - 覆盖:
reportInputMismatch在类中org.antlr.v4.runtime.DefaultErrorStrategy
-
reportFailedPredicate
protected void reportFailedPredicate(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.FailedPredicateException e) - 覆盖:
reportFailedPredicate在类中org.antlr.v4.runtime.DefaultErrorStrategy
-
sync
public void sync(org.antlr.v4.runtime.Parser recognizer) Make sure we don't attempt to recover from problems in subrules.- 指定者:
sync在接口中org.antlr.v4.runtime.ANTLRErrorStrategy- 覆盖:
sync在类中org.antlr.v4.runtime.DefaultErrorStrategy
-
recoverInline
public org.antlr.v4.runtime.Token recoverInline(org.antlr.v4.runtime.Parser recognizer) throws org.antlr.v4.runtime.RecognitionException Make sure we don't attempt to recover inline; if the parser successfully recovers, it won't throw an exception.- 指定者:
recoverInline在接口中org.antlr.v4.runtime.ANTLRErrorStrategy- 覆盖:
recoverInline在类中org.antlr.v4.runtime.DefaultErrorStrategy- 抛出:
org.antlr.v4.runtime.RecognitionException
-
reportMissingToken
protected void reportMissingToken(org.antlr.v4.runtime.Parser recognizer) - 覆盖:
reportMissingToken在类中org.antlr.v4.runtime.DefaultErrorStrategy
-
reportUnwantedToken
protected void reportUnwantedToken(org.antlr.v4.runtime.Parser recognizer) - 覆盖:
reportUnwantedToken在类中org.antlr.v4.runtime.DefaultErrorStrategy
-
getErrorKey
-
getGrammarToken
-