Package schrodinger :: Package application :: Package desmond :: Package antlr3 :: Module treewizard :: Class TreePattern
[hide private]
[frames] | no frames]

Class TreePattern

object --+            
         |            
 tree.Tree --+        
             |        
 tree.BaseTree --+    
                 |    
   tree.CommonTree --+
                     |
                    TreePattern
Known Subclasses:

When using %label:TOKENNAME in a tree for parse(), we must track the label.

Instance Methods [hide private]
 
__init__(self, payload)
Create a new node from an existing node does nothing for BaseTree as there are no fields other than the children list, which cannot be copied as the children are not considered part of this node.
 
toString(self)
Override to say how a node (not a tree) should look as text

Inherited from tree.CommonTree: __str__, dupNode, getCharPositionInLine, getChildIndex, getLine, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toStringTree

Inherited from tree.BaseTree: addChild, addChildren, deleteChild, freshenParentAndChildIndexes, getAncestor, getAncestors, getChild, getChildCount, getChildren, getFirstChildWithType, hasAncestor, replaceChildren, sanityCheckParentAndChildIndexes, setChild

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from tree.CommonTree: charPositionInLine, line, text, tokenStartIndex, tokenStopIndex, type

Inherited from object: __class__

Method Details [hide private]

__init__(self, payload)
(Constructor)

 

Create a new node from an existing node does nothing for BaseTree as there are no fields other than the children list, which cannot be copied as the children are not considered part of this node.

Overrides: object.__init__
(inherited documentation)

toString(self)

 

Override to say how a node (not a tree) should look as text

Overrides: tree.Tree.toString