![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
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 |
![]() | |
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 |
![]() | |
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 |
@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).
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.