Hello All,
I'm trying to run a tree parser on part of a tree and then delete that
sub-tree but I can't get the parent of the node that needs to be deleted.
//For each i in pPackageList
pANTLR3_BASE_TREE thisNode = pPackageList->at(i);
pANTLR3_BASE_TREE parentNode = thisNode->getParent(thisNode);
unsigned int thisIndex = thisNode->getChildIndex(thisNode);
runPackageTree(thisNode);
parentNode->deleteChild(parentNode,thisIndex);
After calling getParent, parentNode is 0x38 which isn't a valid pointer. The
parent for thisNode should be a NilNode so I'm wondering if that is causing
a problem. I tried using deleteChild() on the node returned from the parser
rule but it still segfaults. Is there something special needed to remove a
child from the root node?
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 [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.