" ;");
Tool antlr = newTool();
CodeGenerator generator = new CodeGenerator(antlr, g, "Java");
g.setCodeGenerator(generator);
generator.genRecognizer(); // forces load of templates
ActionTranslator translator = new ActionTranslator(generator,
"rule",
new CommonToken(ANTLRParser.ACTION,action),1);
String rawTranslation =
translator.translate();
int expectedMsgID = ErrorManager.MSG_WRITE_TO_READONLY_ATTR;
ArrayList<Message> expectedErrors = new ArrayList<Message>(3);
GrammarSemanticsMessage expectedMessage =
new GrammarSemanticsMessage(expectedMsgID, g, null, "start", "");