[antlr-interest] Templates for ANTLR post processing ?

Terence Parr parrt at cs.usfca.edu
Tue Oct 21 10:17:54 PDT 2008


On Oct 21, 2008, at 3:12 AM, lars.vonwedel at bayertechnology.com wrote:

>
> Hello,
>
> I'd like to further process some of ANTLR's output (e.g. the  
> contents of the .tokens file).
>
> Would it be possible to submit a string template to ANTLR that is  
> called during the generation process ?

Not at this time. Unfortunately also this one in particular is hard to  
alter! I hardcoded the template inside CodeGenerator. doh!

	protected final static String vocabFilePattern =
		"<tokens:{<attr.name>=<attr.type>\n}>" +
		"<literals:{<attr.name>=<attr.type>\n}>";

Ter


More information about the antlr-interest mailing list