protected IntervalSet getErrorRecoverySet(Parser recognizer) {
		ATN atn = recognizer.getInterpreter().atn;
		RuleContext ctx = recognizer._ctx;
		IntervalSet recoverSet = new IntervalSet();
		while ( ctx!=null && ctx.invokingState>=0 ) {
			// compute what follows who invoked us
			ATNState invokingState = atn.states.get(ctx.invokingState);
			RuleTransition rt = (RuleTransition)invokingState.transition(0);
			IntervalSet follow = atn.nextTokens(rt.followState);
			recoverSet.addAll(follow);
			ctx = ctx.parent;
		}
        recoverSet.remove(Token.EPSILON);
//		System.out.println("recover set "+recoverSet.toString(recognizer.getTokenNames()));
		return recoverSet;
	}
How should a token be displayed in an error message? The default
 is to display just the text, but during development you might
 want to have a lot of information spit out.  Override in that case
 to use t.toString() (which, for CommonToken, dumps everything about
 the token). This is better than forcing you to override a method in
 your token objects because you don't have to go modify your lexer
 so that it creates a new Java type.
runtime/Java/src/org/antlr/v4/runtime/DefaultErrorStrategy.java