[antlr-interest] Names of generated files and classes

Terence Parr parrt at cs.usfca.edu
Mon Aug 6 07:43:21 PDT 2007


Guys, I'm liking Johannes' proposal to go back to "type grammar X;"  
generating X.java or X.c etc...  Only combined grammars would get the  
suffix Parser / Lexer as they *need* a way to distinguishes the  
classes.  Note that tree grammars are already "tree grammar X" ->  
X.java.  The -depend option will tell build tools all about the output.

If we changed for 3.1, then regenerating code from noncombined  
grammars would require a change in the invocation code perhaps, but  
combined is the common case.  The impact would be minimal either  
way.  It's messy right now:

lexer grammar TLexer;

generates TLexerLexer.java

Ter


More information about the antlr-interest mailing list