Public Member Functions
rve_interface_gen.antlr3.tree.Tree Class Reference
Inheritance diagram for rve_interface_gen.antlr3.tree.Tree:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def addChild
def deleteChild
def dupNode
def freshenParentAndChildIndexes
def getAncestor
def getAncestors
def getCharPositionInLine
def getChild
def getChildCount
def getChildIndex
def getLine
def getParent
def getText
def getTokenStartIndex
def getTokenStopIndex
def getType
def hasAncestor
def isNil
def replaceChildren
def setChild
def setChildIndex
def setParent
def setTokenStartIndex
def setTokenStopIndex
def toString
def toStringTree

Detailed Description

@brief Abstract baseclass for tree nodes.

What does a tree look like?  ANTLR has a number of support classes
such as CommonTreeNodeStream that work on these kinds of trees.  You
don't have to make your trees implement this interface, but if you do,
you'll be able to use more support code.

NOTE: When constructing trees, ANTLR can build any kind of tree; it can
even use Token objects as trees if you add a child list to your tokens.

This is a tree node without any payload; just navigation and factory stuff.

Definition at line 98 of file tree.py.


Member Function Documentation

Add t as a child to this node.  If t is null, do nothing.  If t
is nil, add all children of t to this' children.

Reimplemented in rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 170 of file tree.py.

Reimplemented in rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 185 of file tree.py.

Reimplemented in rve_interface_gen.antlr3.tree.CommonTree.

Definition at line 235 of file tree.py.

Set the parent and child index values for all children

Definition at line 164 of file tree.py.

Walk upwards and get first ancestor with this token type.

Reimplemented in rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 138 of file tree.py.

Return a list of all ancestors of this node.

The first node of list is the root and the last is the parent of
this node.

Reimplemented in rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 143 of file tree.py.

Reimplemented in rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 114 of file tree.py.

Reimplemented in rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 118 of file tree.py.

This node is what child index? 0..n-1

Reimplemented in rve_interface_gen.antlr3.tree.CommonTree, and rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 153 of file tree.py.

In case we don't have a token payload, what is the line for errors?

Reimplemented in rve_interface_gen.antlr3.tree.CommonTree, and rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 249 of file tree.py.

Tree tracks parent and child index now > 3.0

Reimplemented in rve_interface_gen.antlr3.tree.CommonTree, and rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 122 of file tree.py.

What is the smallest token index (indexing from 0) for this node
   and its children?

Reimplemented in rve_interface_gen.antlr3.tree.CommonTree.

Definition at line 209 of file tree.py.

What is the largest token index (indexing from 0) for this node
and its children?

Reimplemented in rve_interface_gen.antlr3.tree.CommonTree.

Definition at line 222 of file tree.py.

Return a token type; needed for tree parsing.

Reimplemented in rve_interface_gen.antlr3.tree.CommonErrorNode, and rve_interface_gen.antlr3.tree.CommonTree.

Definition at line 239 of file tree.py.

Walk upwards looking for ancestor with this token type.

Reimplemented in rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 133 of file tree.py.

Indicates the node is a nil node but may still have children, meaning
the tree is a flat list.

Reimplemented in rve_interface_gen.antlr3.tree.CommonErrorNode, rve_interface_gen.antlr3.tree.CommonTree, and rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 200 of file tree.py.

def rve_interface_gen.antlr3.tree.Tree.replaceChildren (   self,
  startChildIndex,
  stopChildIndex,
  t 
)
Delete children from start to stop and replace with t even if t is
a list (nil-root tree).  num of children can increase or decrease.
For huge child lists, inserting children can force walking rest of
children to set their childindex; could be slow.

Reimplemented in rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 189 of file tree.py.

def rve_interface_gen.antlr3.tree.Tree.setChild (   self,
  i,
  t 
)
Set ith child (0..n-1) to t; t must be non-null and non-nil node

Reimplemented in rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 179 of file tree.py.

This node is what child index? 0..n-1

Reimplemented in rve_interface_gen.antlr3.tree.CommonTree, and rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 158 of file tree.py.

Tree tracks parent and child index now > 3.0

Reimplemented in rve_interface_gen.antlr3.tree.CommonTree, and rve_interface_gen.antlr3.tree.BaseTree.

Definition at line 127 of file tree.py.

Reimplemented in rve_interface_gen.antlr3.tree.CommonTree.

Definition at line 218 of file tree.py.

Reimplemented in rve_interface_gen.antlr3.tree.CommonTree.

Definition at line 231 of file tree.py.


The documentation for this class was generated from the following file:


rve_interface_gen
Author(s): Josh Faust
autogenerated on Wed Dec 11 2013 14:31:00