[antlr-interest] Inheritance of BaseAST class

John D. Mitchell johnm-antlr at non.net
Mon Mar 14 22:13:14 PST 2005


>>>>> "FC" == FC  <tangfc2001 at yahoo.com> writes:
[...]

> But there is run-time error: parser exception:
> java.lang.ClassCastException at line of "JavaAST t =
> (JavaAST)parser.getAST();", that is, the AST object can not be casted to
> my subclass JavaAST. How can I solve this problem?

Check out the setASTNodeClass() method of the parser.

Go wild,
	John


More information about the antlr-interest mailing list