[antlr-interest] missing tokens in the Hashtable
butch75000
butch75000 at yahoo.de
Thu Apr 10 06:18:14 PDT 2003
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