@Test public void testRuleRedefinition() {
		String[] pair = new String[] {
			"grammar Oops;\n" +
			"\n" +
			"ret_ty : A ;\n" +
			"ret_ty : B ;\n" +
			"\n" +
			"A : 'a' ;\n" +
			"B : 'b' ;\n",

			"error(" + ErrorType.RULE_REDEFINITION.code + "): Oops.g4:4:0: rule ret_ty redefinition; previous at line 3\n"
		};
		testErrors(pair, true);
	}
This is a regression test for antlr/antlr4#190
"NullPointerException building lexer grammar using bogus 'token' action"
https://github.com/antlr/antlr4/issues/190
tool-testsuite/test/org/antlr/v4/test/tool/TestToolSyntaxErrors.java