@Test public void testLexerCommandArgumentValidation() {
		String[] pair = new String[] {
			"grammar A;\n" +
			"tokens{Foo}\n" +
			"b : Foo ;\n" +
			"X : 'foo1' -> popMode(Foo);\n" + // "meant" to use -> popMode
			"Y : 'foo2' -> type;", // "meant" to use -> type(Foo)

			"error(" + ErrorType.UNWANTED_LEXER_COMMAND_ARGUMENT.code + "): A.g4:4:14: lexer command popMode does not take any arguments\n" +
			"error(" + ErrorType.MISSING_LEXER_COMMAND_ARGUMENT.code + "): A.g4:5:14: missing argument for lexer command type\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