in this docu: http://www.antlr.org/wiki/display/ANTLR3/Tree+construction#Treeconstruction- treegrammarAST
there is as sample on how to use the node token option to indicate node types for parsers and tree parsers. I've tried this and the parser allocates my new class correctly, but how do I access the class in the treeparser? the parser generates the following tree node (Fub is my new class): root_1 = (CommonTree)adaptor.becomeRoot(new Fub(ADDRESS, (arg!=null)?arg.data:null)), root_1); So the Fub is generated, but in the Treeparser the Fub ist lost, even if I write the rule as follows: test: ^ADDRESS<Fub> ... { //where is my Fub data? } ; it seems, that in the treeparser the <Fub> is lost... cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---