[antlr-interest] Re: missing tokens in the Hashtable

Michael Wirth butch75000 at yahoo.de
Thu Apr 10 06:32:33 PDT 2003


sorry, typed a wrong subject and my name was also wrong. It was the 
first post here.

Greetings 
    Michael

--- In antlr-interest at yahoogroups.com, "butch75000" <butch75000 at y...> 
wrote:
> Hi all,
> 
> if I use heterogeneous tree construction the following code will be 
> generated with version 2.7.2 of antlr
> 
>     tmp1_AST = (ProgNode)astFactory.create(LT(1),"ProgNode");
> 
> But when I start my parser, the following exception is thrown:
> java.lang.IllegalArgumentException: Invalid class or can't make 
> instance, IdentNode
> 
> So should the class also contain the importpath like the following 
> (in my case):
>     tmp1_AST = (ProgNode)astFactory.create(LT
> (1),"parser.tree.ProgNode");
> 
> Then it works. I have overwritten the method
>   public AST create(Token tok, String className)
> in a inherited ASTFactory so that the name of the package is also 
> included in the String className. This works but is not very 
elegent.
> 
> Is this a bug or what do I wrong?


 

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




More information about the antlr-interest mailing list