Hi Jim,
We've upgraded to 3.1.3 from 3.0.1, it's a lot of pain in the upgrading, as the many of the features we used of antlr changed in the new version, especially the node recycling after the rulepostprocessing. Through debugging, I think it might be a bug in the way antlr's nilNode works in antlr3basetreeadaptor. It uses the adaptor to create a tree node from NULL, and then ultimately in newFromTree in antlr3commontoken, it tries to reuse a node from the factory, if such node exists, then copy the token and u to the node, but without wiping out the children of it. When a root_0 is created in this way, and then adaptor->addchild to root_0, it checks if the root_0 has already any child, if it doesn't it would add the children of the subtree to it, and reset the subtree's children to be null. Thus for a root_0 generated from a reused node, the children wouldn't be null, so the subtree's children won't be reset. I think you've got to make it consistent, if you are generating a new empty node, the new node's children have to be null. Plus, I don't think it's that necessary to reset subtree's children, of course one reason is that we need to use it in our @after action. Can you confirm to me if that's a bug, in case I got it wrong. Thanks a lot. Regards, Linlin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
