"grammar t;\n"+
"a : ids+=. ( ',' ids+=ID {"+action+"})* ;" +
"ID : 'a';\n");
Tool antlr = newTool();
CodeGenerator generator = new CodeGenerator(antlr, g, "Java");
ActionTranslator translator =
new ActionTranslator(generator,
"a",
new CommonToken(ANTLRParser.ACTION,action),1);
g.setCodeGenerator(generator);
generator.genRecognizer(); // forces load of templates
String found = translator.translate();
assertEquals(expecting, found);
assertEquals("unexpected errors: "+equeue, 0, equeue.errors.size());
}