[antlr-interest] Can't create AST Node?

Ric Klaren klaren at cs.utwente.nl
Thu Jul 8 02:04:28 PDT 2004


On Wed, Jul 07, 2004 at 05:23:43PM -0400, Tiller, Michael (M.M.) wrote:
> I'm using antlr-2.7.4 with Java as the target language.  I'd like to
> specify a custom default AST type.  I tried using the option
> "ASTLabelType" but it gives me a casting error.  So I thought perhaps
> the ASTFactory wasn't building the correct type so I added
> "parser.setASTNodeClass" to my Main routine.  Then I get a message that
> says "Can't create AST Node <xyz>".  That's odd!?

(I'm no expert on the java bit of this so just guessing here)

Could it be that you did parser.setASTNodeClass before setting the
ASTFactory ? (parser.setASTNodeClass() forwards to
astFactory.setASTNodeClass())

It could be helpfull to see on which variant of ASTFactory.create() it
bombs out.

Cheers,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893755  ----
-----+++++*****************************************************+++++++++-------
 'And this 'rebooting' business? Give it a good kicking, do you?' 'Oh, no,
  of course, we ... that is ... well, yes, in fact,' said Ponder. 'Adrian
    goes round the back and ... er ... prods it with his foot. But in a
     technical way,' he added. --- From: Hogfather by Terry Pratchett.



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list