Hi Jim, I'm trying to navigate through my AST using the children of a node and the parent, which seems like an easy task. However, it looks as if the parent pointer isn't maintained properly. I found child nodes of a node that don't have their parent pointer set. I found http://antlr.markmail.org/search/?q=ast%20setparent#query:ast%20setparent+page:1+mid:ykstbb66lqknnvkl+state:results from just a year ago where Dmitri had exactly the same problem as I face now, but this was never solved.
To clarify: the getParent() call is done *after* the parsing completed successfully. I have my AST and am searching for specific nodes in it. Unless I'm missing something important I'd say the parent handling is definitely broken in addChild (pANTLR3_BASE_TREE), because the parent is not set properly. Additionally, setParent (pANTLR3_BASE_TREE) still sets the parent of the parent as new parent in the child node, which makes no sense at all. Mike -- www.soft-gems.net
_______________________________________________ antlr-dev mailing list antlr-dev@antlr.org http://www.antlr.org/mailman/listinfo/antlr-dev