[antlr-interest] Small Bug
Terence Parr
parrt at jguru.com
Fri Jan 3 11:49:15 PST 2003
On Friday, January 3, 2003, at 03:28 AM, Robert Colquhoun wrote:
> Thanks a million zillion for working on a glossary. I just read through
> the manual once again earlier this evening. My understanding of antlr
> is increasing, but coincidentally, as I read this time I actually
> started noting glossary problems (i.e. references to undefined
> terms/concepts). I logged on to the forum with the intention of asking
> politely whether it might be useful to do a glossary, but am delighted
> to see that you are already on it. It will help shorten the learning
> process, I am positive.
>
> Thanks again.
>
Cool! Glad the glossary is helping. Please let me know what I'm
missing. :)
> I just noticed a small inefficiency in the generated parser code,
> antlr was
> creating a method like:
>
> protected void buildTokenTypeASTClassMap() {
> tokenTypeToASTClassMap = new Hashtable();
> tokenTypeToASTClassMap=null;
> };
>
> The problem is in the antlr.JavaCodeGenerator.getTokenASTNodeMap(),
> attached is a version of JavaCodeGenerator which creates:
>
> protected void buildTokenTypeASTClassMap() {
> tokenTypeToASTClassMap=null;
> };
>
> PS For some reason the first method caused kaffe, which i dont normally
> use, to crash!
Ok, I think I've fixed this. hashtable only generated if there is a
mapping to add.
Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list