I was looking for something similar to this: http://www.antlr.org/pipermail/stringtemplate-interest/2009-August/002097.html Was something like that ever implemented? In my concrete case, I want to generate local variables and avoid collisions between them. Cheers, Rafael