[antlr-interest] Small Bug

Robert Colquhoun rjc at trump.net.au
Fri Jan 3 03:28:57 PST 2003


Hi,

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!

  - Robert
 

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: JavaCodeGenerator.java.gz
Type: application/octet-stream
Size: 27348 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20030103/f4bb5cb2/JavaCodeGenerator.java.obj


More information about the antlr-interest mailing list