[antlr-interest] 3.0 final will require t.g has t in it

Martin Probst mail at martin-probst.com
Wed Jul 12 00:20:46 PDT 2006


> So I think people are proposing C.g generating CParser.java if  
> parser, CLexer.java if lexer grammar, CTreeParser.java if tree  
> grammar.  If combined then CParser.java *and* CLexer.java.

I wouldn't go that way. In that case you'd need build tools like ANT  
to find out of which type the included grammar in F.g is - not good.  
If you have only exactly one grammar per .g file, then you can simply  
name the file FooParser.g and you will not run into the  
FooParserLexer.java problem the original author described.

This suffix will create the need to either look into the .g file, or  
start guessing (in a certain order), both of which isn't a good idea  
in my opinion.

Martin



More information about the antlr-interest mailing list