[antlr-interest] Names of generated files and classes

Kay Roepke kroepke at classdump.org
Mon Aug 6 07:35:42 PDT 2007


On Aug 6, 2007, at 3:18 PM, Johannes Luber wrote:

> And no escaping for spaces is necessary. (Are '\' also escaped?) I  
> know
> that Ter doesn't like XML that much, but as it is meant for programs
> anyway, I think it is the best and simplest way.

There cannot be any spaces in the grammar name anyway, so escaping is  
a non-issue.
Probably every filesystem in significant use can work with ANTLR  
grammar names as is, no escaping
necessary.

Not every tool wants to parse XML. In most cases you specifically do  
not want to parse XML (and handrolling an XML lexer/parser is  
significantly more work than writing one for the current output!)

A tool that uses the depend information of ANTLR will be tied to  
ANTLR anyway, so I don't think we have an issue of hypothetically  
changing suffixes. Build tools would need to be updated then in any  
case.
Plus, no tool should need to know what the .tokens file is good for.  
It is just in the -depend output because ANTLR generates. If the  
build system doesn't have any build rules for .tokens files then it  
gets ignored. The only thing you really need to know is what grammar  
suffixes are valid (you can get away with .g) and how the source  
files depend on that. I don't see any need to update the -depend  
output at this point (though I might revert my opinion when I look at  
the Xcode plugin again - but I'm sure it will only need tweaks if at  
all. Certainly I will not require XML...)

cheers,
-k
-- 
Kay Röpke
http://classdump.org/






More information about the antlr-interest mailing list