[antlr-interest] Problem with Heterogenous AST antlr 2.7.2a6
beeh1973 <hastur4711 at bigfoot.com>
hastur4711 at bigfoot.com
Fri Dec 20 12:04:05 PST 2002
hi,
i tried to use my grammar with antlr 2.7.2a6. i used it with version
2.7.2a2 before without problems.
i use heterogenous AST Construction
AST Classes are in some package.
header {
package org.mydomain;
}
tokens {
EXIST <AST=ExistOperator>;
}
[...]
i have a corresponding class org.mydomain.ExistOperator
while Parsing something ASTFactory tries to create a ExistOperator
which fails with a RuntimeError occurs.
1) testExistOperator(TCLTest)
java.lang.IllegalArgumentException: Invalid class or can't make
instance, ExistOperator
at antlr.ASTFactory.createUsingCtor(ASTFactory.java:237)
at antlr.ASTFactory.create(ASTFactory.java:194)
at TCLParser.exist(TCLParser.java:826)
[...]
it seems to me that ASTFactory is trying to create an instance of
ExistOperator while it should create an instance of
org.mydomain.ExistOperator.
adding the package name to the call to ASTFactory in TCLParser avoids
the exception.
is this a bug or am i missing something?
regards,
alphonse bendt
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list