[antlr-interest] proposal for 2.7.4: charVocabulary defaults to ascii 1..127

Brian L. Smith brian-l-smith at uiowa.edu
Sat May 1 13:28:57 PDT 2004


Terence Parr wrote:

>Anybody object?  I'm seeing this issue come up too many times.  So, if you don't specify, then charVocabulary is set for you to ascii.
>  
>
I would prefer 0..65535, since that is what I use for all my grammars.
Having a smaller vocab (e.g. ASCII) is an optimization done to make the 
generated code smaller. I think that this is not a very worthwhile 
optimization anymore. In particular, I thought that the bitsets were now 
optimized much better now than in the original ANTLR optimization, so 
that the original motiviation for charVocabulary in the first place 
don't really appy as much anymore. In addition, there seems to be less 
and less of a need for the generated classfiles to be small now, than 
there was back in 199x when this option was introduced. So, in my 
opinion, it makes sense the most sense to have the default charVocab be 
as large as possible, while still allowing advanced users to tweak it as 
an optimization step.

- Brian


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list