App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | List of all members
google.appengine._internal.antlr3.tree.TreeNodeStream Class Reference
Inheritance diagram for google.appengine._internal.antlr3.tree.TreeNodeStream:
google.appengine._internal.antlr3.streams.IntStream google.appengine._internal.antlr3.tree.CommonTreeNodeStream

Public Member Functions

def get
 
def LT
 
def getTreeSource
 
def getTokenStream
 
def getTreeAdaptor
 
def setUniqueNavigationNodes
 
def toString
 
def replaceChildren
 
- Public Member Functions inherited from google.appengine._internal.antlr3.streams.IntStream
def consume
 
def LA
 
def mark
 
def index
 
def rewind
 
def release
 
def seek
 
def size
 
def getSourceName
 

Detailed Description

@brief A stream of tree nodes

It accessing nodes from a tree of some kind.

Member Function Documentation

def google.appengine._internal.antlr3.tree.TreeNodeStream.get (   self,
  i 
)
Get a tree node at an absolute index i; 0..n-1.
If you don't want to buffer up nodes, then this method makes no
sense for you.
def google.appengine._internal.antlr3.tree.TreeNodeStream.getTokenStream (   self)
If the tree associated with this stream was created from a TokenStream,
you can specify it here.  Used to do rule $text attribute in tree
parser.  Optional unless you use tree parser rule text attribute
or output=template and rewrite=true options.
def google.appengine._internal.antlr3.tree.TreeNodeStream.getTreeAdaptor (   self)
What adaptor can tell me how to interpret/navigate nodes and
trees.  E.g., get text of a node.
def google.appengine._internal.antlr3.tree.TreeNodeStream.getTreeSource (   self)
Where is this stream pulling nodes from?  This is not the name, but
the object that provides node objects.
def google.appengine._internal.antlr3.tree.TreeNodeStream.LT (   self,
  k 
)
Get tree node at current input pointer + i ahead where i=1 is next node.
i<0 indicates nodes in the past.  So LT(-1) is previous node, but
implementations are not required to provide results for k < -1.
LT(0) is undefined.  For i>=n, return null.
Return null for LT(0) and any index that results in an absolute address
that is negative.

This is analogus to the LT() method of the TokenStream, but this
returns a tree node instead of a token.  Makes code gen identical
for both parser and tree grammars. :)
def google.appengine._internal.antlr3.tree.TreeNodeStream.replaceChildren (   self,
  parent,
  startChildIndex,
  stopChildIndex,
  t 
)
    Replace from start to stop child index of parent with t, which might
be a list.  Number of children may be different
after this call.  The stream is notified because it is walking the
tree and might need to know you are monkeying with the underlying
tree.  Also, it might be able to modify the node stream to avoid
restreaming for future phases.

If parent is null, don't do anything; must be at root of overall tree.
Can't replace whatever points to the parent externally.  Do nothing.
def google.appengine._internal.antlr3.tree.TreeNodeStream.setUniqueNavigationNodes (   self,
  uniqueNavigationNodes 
)
As we flatten the tree, we use UP, DOWN nodes to represent
the tree structure.  When debugging we need unique nodes
so we have to instantiate new ones.  When doing normal tree
parsing, it's slow and a waste of memory to create unique
navigation nodes.  Default should be false;
def google.appengine._internal.antlr3.tree.TreeNodeStream.toString (   self,
  start,
  stop 
)
Return the text of all nodes from start to stop, inclusive.
If the stream does not buffer all the nodes then it can still
walk recursively from start until stop.  You can always return
null or "" too, but users should not access $ruleLabel.text in
an action of course in that case.

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