antlr3.tree.RewriteRuleNodeStream Class Reference

Queues up nodes matched on left side of -> in a tree parser. More...

Inheritance diagram for antlr3.tree.RewriteRuleNodeStream:

Inheritance graph
[legend]
Collaboration diagram for antlr3.tree.RewriteRuleNodeStream:

Collaboration graph
[legend]

List of all members.

Public Member Functions

def nextNode
def toTree
 Ensure stream emits trees; tokens must be converted to AST nodes.
def dup
 When constructing trees, sometimes we need to dup a token or AST subtree.


Detailed Description

Queues up nodes matched on left side of -> in a tree parser.

This is the analog of RewriteRuleTokenStream for normal parsers.

Definition at line 2787 of file tree.py.


Member Function Documentation

def antlr3.tree.RewriteRuleNodeStream.nextNode (   self  ) 

Definition at line 2789 of file tree.py.

def antlr3.tree.RewriteRuleNodeStream.toTree (   self,
  el 
)

Ensure stream emits trees; tokens must be converted to AST nodes.

AST nodes can be passed through unmolested.

Reimplemented from antlr3.tree.RewriteRuleElementStream.

Definition at line 2793 of file tree.py.

def antlr3.tree.RewriteRuleNodeStream.dup (   self,
  el 
)

When constructing trees, sometimes we need to dup a token or AST subtree.

Dup'ing a token means just creating another AST node around it. For trees, you must call the adaptor.dupTree() unless the element is for a tree root; then it must be a node dup.

Reimplemented from antlr3.tree.RewriteRuleElementStream.

Definition at line 2797 of file tree.py.


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

Generated on Mon Nov 29 17:24:30 2010 for ANTLR Python API by  doxygen 1.5.5