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.CommonTreeAdaptor Class Reference
Inheritance diagram for google.appengine._internal.antlr3.tree.CommonTreeAdaptor:
google.appengine._internal.antlr3.tree.BaseTreeAdaptor google.appengine._internal.antlr3.tree.TreeAdaptor google.appengine._internal.antlr3.treewizard.TreePatternTreeAdaptor

Public Member Functions

def dupNode
 
def createWithPayload
 
def createToken
 
def setTokenBoundaries
 
def getTokenStartIndex
 
def getTokenStopIndex
 
def getText
 
def getType
 
def getToken
 
def getChild
 
def getChildCount
 
def getParent
 
def setParent
 
def getChildIndex
 
def setChildIndex
 
def replaceChildren
 
- Public Member Functions inherited from google.appengine._internal.antlr3.tree.BaseTreeAdaptor
def nil
 
def errorNode
 
def isNil
 
def dupTree
 
def addChild
 
def becomeRoot
 
def rulePostProcessing
 
def createFromToken
 
def createFromType
 
def getType
 
def setType
 
def getText
 
def setText
 
def getChild
 
def setChild
 
def deleteChild
 
def getChildCount
 
def getUniqueID
 
def createToken
 
- Public Member Functions inherited from google.appengine._internal.antlr3.tree.TreeAdaptor
def createWithPayload
 
def dupNode
 
def dupTree
 
def nil
 
def errorNode
 
def isNil
 
def addChild
 
def becomeRoot
 
def rulePostProcessing
 
def getUniqueID
 
def createFromToken
 
def createFromType
 
def getType
 
def setType
 
def getText
 
def setText
 
def getToken
 
def setTokenBoundaries
 
def getTokenStartIndex
 
def getTokenStopIndex
 
def getChild
 
def setChild
 
def deleteChild
 
def getChildCount
 
def getParent
 
def setParent
 
def getChildIndex
 
def setChildIndex
 
def replaceChildren
 
def create
 

Detailed Description

@brief A TreeAdaptor that works with any Tree implementation.

It provides
really just factory methods; all the work is done by BaseTreeAdaptor.
If you would like to have different tokens created than ClassicToken
objects, you need to override this and then set the parser tree adaptor to
use your subclass.

To get your parser to build nodes of a different type, override
create(Token).

Member Function Documentation

def google.appengine._internal.antlr3.tree.CommonTreeAdaptor.createToken (   self,
  fromToken = None,
  tokenType = None,
  text = None 
)
Tell me how to create a token for use with imaginary token nodes.
For example, there is probably no input symbol associated with imaginary
token DECL, but you need to create it as a payload or whatever for
the DECL node as in ^(DECL type ID).

If you care what the token payload objects' type is, you should
override this method and any other createToken variant.
def google.appengine._internal.antlr3.tree.CommonTreeAdaptor.dupNode (   self,
  treeNode 
)
Duplicate a node.  This is part of the factory;
override if you want another kind of node to be built.

I could use reflection to prevent having to override this
but reflection is slow.
def google.appengine._internal.antlr3.tree.CommonTreeAdaptor.getToken (   self,
  t 
)
What is the Token associated with this node?  If
you are not using CommonTree, then you must
override this in your own adaptor.
def google.appengine._internal.antlr3.tree.CommonTreeAdaptor.setTokenBoundaries (   self,
  t,
  startToken,
  stopToken 
)
Track start/stop token for subtree root created for a rule.
Only works with Tree nodes.  For rules that match nothing,
seems like this will yield start=i and stop=i-1 in a nil node.
Might be useful info so I'll not force to be i..i.

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