[antlr-interest] gunit with custom AST nodes throws InvocationTargetException
Felix Dorner
felix_do at web.de
Fri Mar 28 06:03:08 PDT 2008
Ok,
lot of things to learn. The gUnit creates a Parser instance and
obviously does not set its TreeAdaptor to my ASTAdaptor, therefore the
Parser creates CommonTree nodes. Then, some questions arise:
As I learned from the Book, I set the parser's TreeAdaptor from
_outside_ the parser. I don't see a simple way to implicitly set the
Adaptor from _within_ the parser, when using the default constructor
(which gUnit does). Is there a reason why there's nothing like, e.g. a
parser option "Adapter" or so?
So either gUnit would provide an option to set the desired Adaptor, or I
find a way to implicitly set the Adaptor from within the grammar.
Thanks for your comments,
Felix
More information about the antlr-interest
mailing list