@Test public void testLexerRuleLabel() {
		String grammar =
				"grammar T;\n" +
				"a : A;\n" +
				"A : h=~('b'|'c') ;";
		testErrors(new String[] {
				grammar,
				"error(" + ErrorType.SYNTAX_ERROR.code + "): T.g4:3:5: syntax error: '=' came as a complete surprise to me while looking for lexer rule element\n" }, false);
	}
This is a regression test for antlr/antlr4#497 now that antlr/antlr4#309
is resolved.
https://github.com/antlr/antlr4/issues/497
https://github.com/antlr/antlr4/issues/309
tool-testsuite/test/org/antlr/v4/test/tool/TestToolSyntaxErrors.java