public String getErrorMessage(RecognitionException e, String[] tokenNames) { if ( e instanceof SemanticException ) { return e.getMessage(); } else { return super.getErrorMessage(e, tokenNames); } }
public String getErrorMessage(RecognitionException e, String[] tokenNames) { if ( e instanceof SemanticException ) { return e.getMessage(); } else { return super.getErrorMessage(e, tokenNames); } }
public String getErrorMessage(RecognitionException e, String[] tokenNames) { if ( e instanceof SemanticException ) { return e.getMessage(); } else { return super.getErrorMessage(e, tokenNames); } }
public String getErrorMessage(RecognitionException e, String[] tokenNames) { if ( e instanceof SemanticException ) { return e.getMessage(); } else { return super.getErrorMessage(e, tokenNames); } }
public String getErrorMessage(RecognitionException e, String[] tokenNames) { List stack = getRuleInvocationStack(e, this.getClass().getName()); String msg = null; String inputContext = input.LT(-3) == null ? "" : ((Tree)input.LT(-3)).getText()+" "+ input.LT(-2) == null ? "" : ((Tree)input.LT(-2)).getText()+" "+ input.LT(-1) == null ? "" : ((Tree)input.LT(-1)).getText()+" >>>"+ ((Tree)input.LT(1)).getText()+"<<< "+ ((Tree)input.LT(2)).getText()+" "+ ((Tree)input.LT(3)).getText(); if ( e instanceof NoViableAltException ) { NoViableAltException nvae = (NoViableAltException)e; msg = " no viable alt; token="+e.token+ " (decision="+nvae.decisionNumber+ " state "+nvae.stateNumber+")"+ " decision=<<"+nvae.grammarDecisionDescription+">>"; } else { msg = super.getErrorMessage(e, tokenNames); } return stack+" "+msg+" context=..."+inputContext+"..."; } public String getTokenErrorDisplay(Token t) {
public String getErrorMessage(RecognitionException e, String[] tokenNames) { List stack = getRuleInvocationStack(e, this.getClass().getName()); String msg = null; String inputContext = input.LT(-3) == null ? "" : ((Tree)input.LT(-3)).getText()+" "+ input.LT(-2) == null ? "" : ((Tree)input.LT(-2)).getText()+" "+ input.LT(-1) == null ? "" : ((Tree)input.LT(-1)).getText()+" >>>"+ ((Tree)input.LT(1)).getText()+"<<< "+ ((Tree)input.LT(2)).getText()+" "+ ((Tree)input.LT(3)).getText(); if ( e instanceof NoViableAltException ) { NoViableAltException nvae = (NoViableAltException)e; msg = " no viable alt; token="+e.token+ " (decision="+nvae.decisionNumber+ " state "+nvae.stateNumber+")"+ " decision=<<"+nvae.grammarDecisionDescription+">>"; } else { msg = super.getErrorMessage(e, tokenNames); } return stack+" "+msg+" context=..."+inputContext+"..."; } public String getTokenErrorDisplay(Token t) {