Public Member Functions | Public Attributes
rve_interface_gen.antlr3.tree.TreeVisitor Class Reference

List of all members.

Public Member Functions

def __init__
def visit

Public Attributes

 adaptor

Detailed Description

Do a depth first walk of a tree, applying pre() and post() actions
we go.

Definition at line 2377 of file tree.py.


Constructor & Destructor Documentation

Definition at line 2382 of file tree.py.


Member Function Documentation

def rve_interface_gen.antlr3.tree.TreeVisitor.visit (   self,
  t,
  pre_action = None,
  post_action = None 
)
Visit every node in tree t and trigger an action for each node
before/after having visited all of its children.  Bottom up walk.
Execute both actions even if t has no children.  Ignore return
results from transforming children since they will have altered
the child list of this node (their parent).  Return result of
applying post action to this node.

The Python version differs from the Java version by taking two
callables 'pre_action' and 'post_action' instead of a class instance
that wraps those methods. Those callables must accept a TreeNode as
their single argument and return the (potentially transformed or
replaced) TreeNode.

Definition at line 2388 of file tree.py.


Member Data Documentation

Definition at line 2382 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