[antlr-interest] Names of generated files and classes

Loring Craymer lgcraymer at yahoo.com
Mon Aug 6 14:26:42 PDT 2007


Ter--

How about just adding a "LexerName" option to combined
grammars?  Then the parser could get the base grammar
name, and users would have complete control over the
naming and (should) stop complaining.

--Loring

--- Terence Parr <parrt at cs.usfca.edu> wrote:

> 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
> 



       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/


More information about the antlr-interest mailing list