[antlr-interest] getParent() function on ANTLR3_BASE_TREE_struct

Karim Chichakly kchichakly at iseesystems.com
Fri Jan 28 10:58:35 PST 2011


I have the same question.  I actually have ANTLR3_COMMON_TREE_struct nodes
(even though their type is ANTLR3_BASE_TREE_struct).  Don't they track the
parent?  If not, how do I walk up the tree when I need context information
above me?

Thank you,

Karim

----------------------------------------------------
Subject:[antlr-interest] *getParent*() function on
ANTLR3_BASE_TREE_struct<http://markmail.org/message/ifubo7kubcyop6ei>
[image:
permalink] <http://markmail.org/message/ifubo7kubcyop6ei> From:Richard
Connon (con... at irconan.co.uk)Date: Dec 14, 2010 4:14:24 amList:*
org.antlr.antlr-interest*

I've been trying to use the *getParent*() function on
ANTLR3_BASE_TREE_struct but it seems that it's returning invalid values.

It was my understanding that this function would either return the address
of the parent node in the tree (iff the node isn't the root) or *NULL* (iff
the node is).

Is this the case?


More information about the antlr-interest mailing list