"parser grammar t;\n"+
"@members {'+action+'}\n" +
"a : ;\n");
Tool antlr = newTool();
CodeGenerator generator = new CodeGenerator(antlr, g, "Java");
ActionTranslator translator = new ActionTranslator(generator,
null,
new CommonToken(ANTLRParser.ACTION,action),0);
String found = translator.translate(); assertEquals(expecting, found);
int expectedMsgID = ErrorManager.MSG_ATTRIBUTE_REF_NOT_IN_RULE;
Object expectedArg = "x";
GrammarSemanticsMessage expectedMessage =
new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg);