msg = "cannot recognize input near "
+ getTokenErrorDisplay(e.token)
+ (input.LT(2) != null ? " " + getTokenErrorDisplay(input.LT(2)) : "")
+ (input.LT(3) != null ? " " + getTokenErrorDisplay(input.LT(3)) : "");
} else if (e instanceof MismatchedTokenException) {
MismatchedTokenException mte = (MismatchedTokenException) e;
msg = super.getErrorMessage(e, xlateNames) + (input.LT(-1) == null ? "":" near '" + input.LT(-1).getText()) + "'";
} else if (e instanceof FailedPredicateException) {
FailedPredicateException fpe = (FailedPredicateException) e;
msg = "Failed to recognize predicate '" + fpe.token.getText() + "'. Failed rule: '" + fpe.ruleName + "'";
} else {