/** * {@inheritDoc} */ @Override public void syntaxError(BaseRecognizer recognizer, String[] tokenNames, RecognitionException e) { String hdr = recognizer.getErrorHeader(e); String msg = recognizer.getErrorMessage(e, tokenNames); StringBuilder builder = new StringBuilder().append(hdr) .append(' ') .append(msg); if (recognizer instanceof Parser) appendQuerySnippet((Parser) recognizer, builder); errorMsgs.add(builder.toString()); }
public DFA1(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 1; this.eot = DFA1_eot; this.eof = DFA1_eof; this.min = DFA1_min; this.max = DFA1_max; this.accept = DFA1_accept; this.special = DFA1_special; this.transition = DFA1_transition; }
public DFA15(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 15; this.eot = DFA15_eot; this.eof = DFA15_eof; this.min = DFA15_min; this.max = DFA15_max; this.accept = DFA15_accept; this.special = DFA15_special; this.transition = DFA15_transition; }
public DFA44(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 44; this.eot = DFA44_eot; this.eof = DFA44_eof; this.min = DFA44_min; this.max = DFA44_max; this.accept = DFA44_accept; this.special = DFA44_special; this.transition = DFA44_transition; }
public DFA153(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 153; this.eot = DFA153_eot; this.eof = DFA153_eof; this.min = DFA153_min; this.max = DFA153_max; this.accept = DFA153_accept; this.special = DFA153_special; this.transition = DFA153_transition; }
public DFA154(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 154; this.eot = DFA154_eot; this.eof = DFA154_eof; this.min = DFA154_min; this.max = DFA154_max; this.accept = DFA154_accept; this.special = DFA154_special; this.transition = DFA154_transition; }
public DFA172(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 172; this.eot = DFA172_eot; this.eof = DFA172_eof; this.min = DFA172_min; this.max = DFA172_max; this.accept = DFA172_accept; this.special = DFA172_special; this.transition = DFA172_transition; }
public DFA174(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 174; this.eot = DFA174_eot; this.eof = DFA174_eof; this.min = DFA174_min; this.max = DFA174_max; this.accept = DFA174_accept; this.special = DFA174_special; this.transition = DFA174_transition; }
public DFA176(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 176; this.eot = DFA176_eot; this.eof = DFA176_eof; this.min = DFA176_min; this.max = DFA176_max; this.accept = DFA176_accept; this.special = DFA176_special; this.transition = DFA176_transition; }
public DFA178(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 178; this.eot = DFA178_eot; this.eof = DFA178_eof; this.min = DFA178_min; this.max = DFA178_max; this.accept = DFA178_accept; this.special = DFA178_special; this.transition = DFA178_transition; }
public DFA181(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 181; this.eot = DFA181_eot; this.eof = DFA181_eof; this.min = DFA181_min; this.max = DFA181_max; this.accept = DFA181_accept; this.special = DFA181_special; this.transition = DFA181_transition; }
public DFA189(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 189; this.eot = DFA189_eot; this.eof = DFA189_eof; this.min = DFA189_min; this.max = DFA189_max; this.accept = DFA189_accept; this.special = DFA189_special; this.transition = DFA189_transition; }
public DFA195(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 195; this.eot = DFA195_eot; this.eof = DFA195_eof; this.min = DFA195_min; this.max = DFA195_max; this.accept = DFA195_accept; this.special = DFA195_special; this.transition = DFA195_transition; }
public DFA194(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 194; this.eot = DFA194_eot; this.eof = DFA194_eof; this.min = DFA194_min; this.max = DFA194_max; this.accept = DFA194_accept; this.special = DFA194_special; this.transition = DFA194_transition; }
public DFA204(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 204; this.eot = DFA204_eot; this.eof = DFA204_eof; this.min = DFA204_min; this.max = DFA204_max; this.accept = DFA204_accept; this.special = DFA204_special; this.transition = DFA204_transition; }
public DFA6(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 6; this.eot = DFA6_eot; this.eof = DFA6_eof; this.min = DFA6_min; this.max = DFA6_max; this.accept = DFA6_accept; this.special = DFA6_special; this.transition = DFA6_transition; }
public DFA16(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 16; this.eot = DFA16_eot; this.eof = DFA16_eof; this.min = DFA16_min; this.max = DFA16_max; this.accept = DFA16_accept; this.special = DFA16_special; this.transition = DFA16_transition; }
public DFA4(final BaseRecognizer recognizer) { this.recognizer = recognizer; decisionNumber = 4; eot = DFA4_eot; eof = DFA4_eof; min = DFA4_min; max = DFA4_max; accept = DFA4_accept; special = DFA4_special; transition = DFA4_transition; }
public DFA1(final BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 1; this.eot = DFA1_eot; this.eof = DFA1_eof; this.min = DFA1_min; this.max = DFA1_max; this.accept = DFA1_accept; this.special = DFA1_special; this.transition = DFA1_transition; }
/** * Format an error message as expected by ANTLR. It is basically the * same error message that ANTL BaseRecognizer generates with some * additional data. * Also used to log debugging information. * @param log the logger to use at debug time * @param recognizer the lexer or parser who generated the error * @param e the exception that occured * @param superMessage the error message that the super class generated * @param tokenNames list of token names * @return a formatted error message */ public static String getErrorMessage( final Log log, final BaseRecognizer recognizer, final RecognitionException e, final String superMessage, final String[] tokenNames) { if (log.isDebugEnabled()) { List < ? > stack = BaseRecognizer.getRuleInvocationStack( e, recognizer.getClass().getSuperclass().getName()); String debugMsg = recognizer.getErrorHeader(e) + " " + e.getClass().getSimpleName() + ": " + superMessage + ":"; if (e instanceof NoViableAltException) { NoViableAltException nvae = (NoViableAltException) e; debugMsg += " (decision=" + nvae.decisionNumber + " state=" + nvae.stateNumber + ")" + " decision=<<" + nvae.grammarDecisionDescription + ">>"; } else if (e instanceof UnwantedTokenException) { UnwantedTokenException ute = (UnwantedTokenException) e; debugMsg += " (unexpected token=" + toString(ute.getUnexpectedToken(), tokenNames) + ")"; } else if (e instanceof EarlyExitException) { EarlyExitException eea = (EarlyExitException) e; debugMsg += " (decision=" + eea.decisionNumber + ")"; } debugMsg += " ruleStack=" + stack.toString(); log.debug(debugMsg); } return makeUserMsg(e, superMessage); }
public DFA2(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 2; this.eot = DFA2_eot; this.eof = DFA2_eof; this.min = DFA2_min; this.max = DFA2_max; this.accept = DFA2_accept; this.special = DFA2_special; this.transition = DFA2_transition; }
public DFA13(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 13; this.eot = DFA13_eot; this.eof = DFA13_eof; this.min = DFA13_min; this.max = DFA13_max; this.accept = DFA13_accept; this.special = DFA13_special; this.transition = DFA13_transition; }
public DFA22(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 22; this.eot = DFA22_eot; this.eof = DFA22_eof; this.min = DFA22_min; this.max = DFA22_max; this.accept = DFA22_accept; this.special = DFA22_special; this.transition = DFA22_transition; }
public DFA4(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 4; this.eot = DFA4_eot; this.eof = DFA4_eof; this.min = DFA4_min; this.max = DFA4_max; this.accept = DFA4_accept; this.special = DFA4_special; this.transition = DFA4_transition; }
public DFA8(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 8; this.eot = DFA8_eot; this.eof = DFA8_eof; this.min = DFA8_min; this.max = DFA8_max; this.accept = DFA8_accept; this.special = DFA8_special; this.transition = DFA8_transition; }
public DFA9(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 9; this.eot = DFA9_eot; this.eof = DFA9_eof; this.min = DFA9_min; this.max = DFA9_max; this.accept = DFA9_accept; this.special = DFA9_special; this.transition = DFA9_transition; }
public DFA11(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 11; this.eot = DFA11_eot; this.eof = DFA11_eof; this.min = DFA11_min; this.max = DFA11_max; this.accept = DFA11_accept; this.special = DFA11_special; this.transition = DFA11_transition; }
public DFA21(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 21; this.eot = DFA21_eot; this.eof = DFA21_eof; this.min = DFA21_min; this.max = DFA21_max; this.accept = DFA21_accept; this.special = DFA21_special; this.transition = DFA21_transition; }
public DFA32(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 32; this.eot = DFA32_eot; this.eof = DFA32_eof; this.min = DFA32_min; this.max = DFA32_max; this.accept = DFA32_accept; this.special = DFA32_special; this.transition = DFA32_transition; }