ParseTree testInterp(LexerGrammar lg, Grammar g,
					String startRule, String input,
					String expectedParseTree)
	{
		LexerInterpreter lexEngine = lg.createLexerInterpreter(new ANTLRInputStream(input));
		CommonTokenStream tokens = new CommonTokenStream(lexEngine);
		ParserInterpreter parser = g.createParserInterpreter(tokens);
		ParseTree t = parser.parse(g.rules.get(startRule).index);
		assertEquals(expectedParseTree, t.toStringTree(parser));
		return t;
	}
This is a regression test for antlr/antlr4#461.
https://github.com/antlr/antlr4/issues/461
tool-testsuite/test/org/antlr/v4/test/tool/TestParserInterpreter.java