Lines Matching refs:self
67 def __init__(self, elementDescription): argument
68 RuntimeError.__init__(self, elementDescription)
70 self.elementDescription = elementDescription
73 def getMessage(self): argument
74 return self.elementDescription
80 def __init__(self, elementDescription=None): argument
81 RewriteCardinalityException.__init__(self, elementDescription)
114 def getChild(self, i): argument
118 def getChildCount(self): argument
122 def getParent(self): argument
127 def setParent(self, t): argument
133 def hasAncestor(self, ttype): argument
138 def getAncestor(self, ttype): argument
143 def getAncestors(self): argument
153 def getChildIndex(self): argument
158 def setChildIndex(self, index): argument
164 def freshenParentAndChildIndexes(self): argument
170 def addChild(self, t): argument
179 def setChild(self, i, t): argument
185 def deleteChild(self, i): argument
189 def replaceChildren(self, startChildIndex, stopChildIndex, t): argument
200 def isNil(self): argument
209 def getTokenStartIndex(self): argument
218 def setTokenStartIndex(self, index): argument
222 def getTokenStopIndex(self): argument
231 def setTokenStopIndex(self, index): argument
235 def dupNode(self): argument
239 def getType(self): argument
245 def getText(self): argument
249 def getLine(self): argument
257 def getCharPositionInLine(self): argument
261 def toStringTree(self): argument
265 def toString(self): argument
286 def createWithPayload(self, payload): argument
298 def dupNode(self, treeNode): argument
306 def dupTree(self, tree): argument
312 def nil(self): argument
322 def errorNode(self, input, start, stop, exc): argument
342 def isNil(self, tree): argument
348 def addChild(self, t, child): argument
361 def becomeRoot(self, newRoot, oldRoot): argument
393 def rulePostProcessing(self, root): argument
412 def getUniqueID(self, node): argument
425 def createFromToken(self, tokenType, fromToken, text=None): argument
439 def createFromType(self, tokenType, text): argument
453 def getType(self, t): argument
459 def setType(self, t, type): argument
465 def getText(self, t): argument
468 def setText(self, t, text): argument
474 def getToken(self, t): argument
489 def setTokenBoundaries(self, t, startToken, stopToken): argument
501 def getTokenStartIndex(self, t): argument
509 def getTokenStopIndex(self, t): argument
519 def getChild(self, t, i): argument
525 def setChild(self, t, i, child): argument
531 def deleteChild(self, t, i): argument
537 def getChildCount(self, t): argument
543 def getParent(self, t): argument
553 def setParent(self, t, parent): argument
563 def getChildIndex(self, t): argument
573 def setChildIndex(self, t, index): argument
583 def replaceChildren(self, parent, startChildIndex, stopChildIndex, t): argument
598 def create(self, *args): argument
613 return self.createWithPayload(args[0])
625 return self.createFromToken(args[0], args[1])
638 return self.createFromToken(args[0], args[1], args[2])
650 return self.createFromType(args[0], args[1])
686 def __init__(self, node=None): argument
693 Tree.__init__(self)
694 self.children = []
695 self.parent = None
696 self.childIndex = 0
699 def getChild(self, i): argument
701 return self.children[i]
706 def getChildren(self): argument
714 return self.children
717 def getFirstChildWithType(self, treeType): argument
718 for child in self.children:
725 def getChildCount(self): argument
726 return len(self.children)
729 def addChild(self, childTree): argument
746 if self.children is childTree.children:
751 child.parent = self
752 child.childIndex = len(self.children) + idx
754 self.children += childTree.children
758 self.children.append(childTree)
759 childTree.parent = self
760 childTree.childIndex = len(self.children) - 1
763 def addChildren(self, children): argument
766 self.children += children
769 def setChild(self, i, t): argument
776 self.children[i] = t
777 t.parent = self
781 def deleteChild(self, i): argument
782 killed = self.children[i]
784 del self.children[i]
787 for idx, child in enumerate(self.children[i:]):
793 def replaceChildren(self, startChildIndex, stopChildIndex, newTree): argument
801 if (startChildIndex >= len(self.children)
802 or stopChildIndex >= len(self.children)
822 self.children[idx + startChildIndex] = child
823 child.parent = self
830 del self.children[startChildIndex:stopChildIndex+1]
833 self.children[startChildIndex:startChildIndex] = newChildren
836 self.freshenParentAndChildIndexes(startChildIndex)
839 def isNil(self): argument
843 def freshenParentAndChildIndexes(self, offset=0): argument
844 for idx, child in enumerate(self.children[offset:]):
846 child.parent = self
849 def sanityCheckParentAndChildIndexes(self, parent=None, i=-1): argument
850 if parent != self.parent:
853 % (parent, self.parent)
856 if i != self.childIndex:
859 % (i, self.childIndex)
862 for idx, child in enumerate(self.children):
863 child.sanityCheckParentAndChildIndexes(self, idx)
866 def getChildIndex(self): argument
872 def setChildIndex(self, index): argument
878 def getParent(self): argument
883 def setParent(self, t): argument
889 def hasAncestor(self, ttype): argument
891 return self.getAncestor(ttype) is not None
893 def getAncestor(self, ttype): argument
895 t = self.getParent()
903 def getAncestors(self): argument
913 t = self.getParent()
921 def toStringTree(self): argument
924 if len(self.children) == 0:
925 return self.toString()
928 if not self.isNil():
930 buf.append(self.toString())
933 for i, child in enumerate(self.children):
938 if not self.isNil():
944 def getLine(self): argument
948 def getCharPositionInLine(self): argument
952 def toString(self): argument
968 def nil(self): argument
969 return self.createWithPayload(None)
972 def errorNode(self, input, start, stop, exc): argument
989 def isNil(self, tree): argument
993 def dupTree(self, t, parent=None): argument
1003 newTree = self.dupNode(t)
1008 self.setChildIndex(newTree, self.getChildIndex(t))
1010 self.setParent(newTree, parent)
1012 for i in range(self.getChildCount(t)):
1013 child = self.getChild(t, i)
1014 newSubTree = self.dupTree(child, t)
1015 self.addChild(newTree, newSubTree)
1020 def addChild(self, tree, child): argument
1037 def becomeRoot(self, newRoot, oldRoot): argument
1067 newRoot = self.create(newRoot)
1073 newRoot = self.createWithPayload(newRoot)
1092 def rulePostProcessing(self, root): argument
1108 def createFromToken(self, tokenType, fromToken, text=None): argument
1110 return self.createFromType(tokenType, text)
1116 fromToken = self.createToken(fromToken)
1120 t = self.createWithPayload(fromToken)
1124 def createFromType(self, tokenType, text): argument
1128 fromToken = self.createToken(tokenType=tokenType, text=text)
1129 t = self.createWithPayload(fromToken)
1133 def getType(self, t): argument
1137 def setType(self, t, type): argument
1141 def getText(self, t): argument
1145 def setText(self, t, text): argument
1149 def getChild(self, t, i): argument
1153 def setChild(self, t, i, child): argument
1157 def deleteChild(self, t, i): argument
1161 def getChildCount(self, t): argument
1165 def getUniqueID(self, node): argument
1169 def createToken(self, fromToken=None, tokenType=None, text=None): argument
1210 def __init__(self, payload): argument
1211 BaseTree.__init__(self)
1215 self.startIndex = -1
1216 self.stopIndex = -1
1219 self.parent = None
1222 self.childIndex = -1
1226 self.token = None
1229 self.token = payload.token
1230 self.startIndex = payload.startIndex
1231 self.stopIndex = payload.stopIndex
1234 self.token = payload
1241 def getToken(self): argument
1242 return self.token
1245 def dupNode(self): argument
1246 return CommonTree(self)
1249 def isNil(self): argument
1250 return self.token is None
1253 def getType(self): argument
1254 if self.token is None:
1257 return self.token.getType()
1262 def getText(self): argument
1263 if self.token is None:
1266 return self.token.text
1271 def getLine(self): argument
1272 if self.token is None or self.token.getLine() == 0:
1273 if self.getChildCount():
1274 return self.getChild(0).getLine()
1278 return self.token.getLine()
1283 def getCharPositionInLine(self): argument
1284 if self.token is None or self.token.getCharPositionInLine() == -1:
1285 if self.getChildCount():
1286 return self.getChild(0).getCharPositionInLine()
1291 return self.token.getCharPositionInLine()
1296 def getTokenStartIndex(self): argument
1297 if self.startIndex == -1 and self.token is not None:
1298 return self.token.getTokenIndex()
1300 return self.startIndex
1302 def setTokenStartIndex(self, index): argument
1303 self.startIndex = index
1308 def getTokenStopIndex(self): argument
1309 if self.stopIndex == -1 and self.token is not None:
1310 return self.token.getTokenIndex()
1312 return self.stopIndex
1314 def setTokenStopIndex(self, index): argument
1315 self.stopIndex = index
1320 def setUnknownTokenBoundaries(self): argument
1326 if self.children is None:
1327 if self.startIndex < 0 or self.stopIndex < 0:
1328 self.startIndex = self.stopIndex = self.token.getTokenIndex()
1332 for child in self.children:
1335 if self.startIndex >= 0 and self.stopIndex >= 0:
1339 if self.children:
1340 firstChild = self.children[0]
1341 lastChild = self.children[-1]
1342 self.startIndex = firstChild.getTokenStartIndex()
1343 self.stopIndex = lastChild.getTokenStopIndex()
1346 def getChildIndex(self): argument
1348 return self.childIndex
1351 def setChildIndex(self, idx): argument
1353 self.childIndex = idx
1356 def getParent(self): argument
1358 return self.parent
1361 def setParent(self, t): argument
1363 self.parent = t
1366 def toString(self): argument
1367 if self.isNil():
1370 if self.getType() == INVALID_TOKEN_TYPE:
1373 return self.token.text
1379 def toStringTree(self): argument
1380 if not self.children:
1381 return self.toString()
1384 if not self.isNil():
1385 ret += '(%s ' % (self.toString())
1387 ret += ' '.join([child.toStringTree() for child in self.children])
1389 if not self.isNil():
1401 def __init__(self, input, start, stop, exc): argument
1402 CommonTree.__init__(self, None)
1415 self.input = input
1416 self.start = start
1417 self.stop = stop
1418 self.trappedException = exc
1421 def isNil(self): argument
1425 def getType(self): argument
1429 def getText(self): argument
1430 if isinstance(self.start, Token):
1431 i = self.start.getTokenIndex()
1432 j = self.stop.getTokenIndex()
1433 if self.stop.getType() == EOF:
1434 j = self.input.size()
1436 badText = self.input.toString(i, j)
1438 elif isinstance(self.start, Tree):
1439 badText = self.input.toString(self.start, self.stop)
1449 def toString(self): argument
1450 if isinstance(self.trappedException, MissingTokenException):
1452 + str(self.trappedException.getMissingType())
1455 elif isinstance(self.trappedException, UnwantedTokenException):
1457 + str(self.trappedException.getUnexpectedToken())
1458 + ", resync=" + self.getText() + ">")
1460 elif isinstance(self.trappedException, MismatchedTokenException):
1462 + str(self.trappedException.token)
1463 + ", resync=" + self.getText() + ">")
1465 elif isinstance(self.trappedException, NoViableAltException):
1467 + str(self.trappedException.token)
1468 + ", resync=" + self.getText() + ">")
1470 return "<error: "+self.getText()+">"
1488 def dupNode(self, treeNode): argument
1503 def createWithPayload(self, payload): argument
1507 def createToken(self, fromToken=None, tokenType=None, text=None): argument
1524 def setTokenBoundaries(self, t, startToken, stopToken): argument
1548 def getTokenStartIndex(self, t): argument
1554 def getTokenStopIndex(self, t): argument
1560 def getText(self, t): argument
1566 def getType(self, t): argument
1573 def getToken(self, t): argument
1586 def getChild(self, t, i): argument
1592 def getChildCount(self, t): argument
1598 def getParent(self, t): argument
1602 def setParent(self, t, parent): argument
1606 def getChildIndex(self, t): argument
1612 def setChildIndex(self, t, index): argument
1616 def replaceChildren(self, parent, startChildIndex, stopChildIndex, t): argument
1647 def get(self, i): argument
1656 def LT(self, k): argument
1673 def getTreeSource(self): argument
1682 def getTokenStream(self): argument
1693 def getTreeAdaptor(self): argument
1702 def setUniqueNavigationNodes(self, uniqueNavigationNodes): argument
1714 def reset(self): argument
1723 def toString(self, start, stop): argument
1736 def replaceChildren(self, parent, startChildIndex, stopChildIndex, t): argument
1772 def __init__(self, *args): argument
1773 TreeNodeStream.__init__(self)
1812 self.down = down
1814 self.down = adaptor.createFromType(DOWN, "DOWN")
1817 self.up = up
1819 self.up = adaptor.createFromType(UP, "UP")
1822 self.eof = eof
1824 self.eof = adaptor.createFromType(EOF, "EOF")
1835 self.nodes = nodes
1837 self.nodes = []
1840 self.root = tree
1843 self.tokens = None
1846 self.adaptor = adaptor
1849 self.uniqueNavigationNodes = False
1853 self.p = -1
1856 self.lastMarker = None
1859 self.calls = []
1862 def __iter__(self): argument
1863 return TreeIterator(self.root, self.adaptor)
1866 def fillBuffer(self): argument
1871 self._fillBuffer(self.root)
1872 self.p = 0 # buffer of nodes intialized now
1875 def _fillBuffer(self, t): argument
1876 nil = self.adaptor.isNil(t)
1879 self.nodes.append(t) # add this node
1882 n = self.adaptor.getChildCount(t)
1884 self.addNavigationNode(DOWN)
1888 self._fillBuffer(self.adaptor.getChild(t, c))
1892 self.addNavigationNode(UP)
1895 def getNodeIndex(self, node): argument
1900 if self.p == -1:
1901 self.fillBuffer()
1903 for i, t in enumerate(self.nodes):
1910 def addNavigationNode(self, ttype): argument
1920 if self.hasUniqueNavigationNodes():
1921 navNode = self.adaptor.createFromType(DOWN, "DOWN")
1924 navNode = self.down
1927 if self.hasUniqueNavigationNodes():
1928 navNode = self.adaptor.createFromType(UP, "UP")
1931 navNode = self.up
1933 self.nodes.append(navNode)
1936 def get(self, i): argument
1937 if self.p == -1:
1938 self.fillBuffer()
1940 return self.nodes[i]
1943 def LT(self, k): argument
1944 if self.p == -1:
1945 self.fillBuffer()
1951 return self.LB(-k)
1953 if self.p + k - 1 >= len(self.nodes):
1954 return self.eof
1956 return self.nodes[self.p + k - 1]
1959 def getCurrentSymbol(self): argument
1960 return self.LT(1)
1963 def LB(self, k): argument
1969 if self.p - k < 0:
1972 return self.nodes[self.p - k]
1975 def isEOF(self, obj): argument
1976 return self.adaptor.getType(obj) == EOF
1979 def getTreeSource(self): argument
1980 return self.root
1983 def getSourceName(self): argument
1984 return self.getTokenStream().getSourceName()
1987 def getTokenStream(self): argument
1988 return self.tokens
1991 def setTokenStream(self, tokens): argument
1992 self.tokens = tokens
1995 def getTreeAdaptor(self): argument
1996 return self.adaptor
1999 def hasUniqueNavigationNodes(self): argument
2000 return self.uniqueNavigationNodes
2003 def setUniqueNavigationNodes(self, uniqueNavigationNodes): argument
2004 self.uniqueNavigationNodes = uniqueNavigationNodes
2007 def consume(self): argument
2008 if self.p == -1:
2009 self.fillBuffer()
2011 self.p += 1
2014 def LA(self, i): argument
2015 return self.adaptor.getType(self.LT(i))
2018 def mark(self): argument
2019 if self.p == -1:
2020 self.fillBuffer()
2023 self.lastMarker = self.index()
2024 return self.lastMarker
2027 def release(self, marker=None): argument
2033 def index(self): argument
2034 return self.p
2037 def rewind(self, marker=None): argument
2039 marker = self.lastMarker
2041 self.seek(marker)
2044 def seek(self, index): argument
2045 if self.p == -1:
2046 self.fillBuffer()
2048 self.p = index
2051 def push(self, index): argument
2057 self.calls.append(self.p) # save current index
2058 self.seek(index)
2061 def pop(self): argument
2067 ret = self.calls.pop(-1)
2068 self.seek(ret)
2072 def reset(self): argument
2073 self.p = 0
2074 self.lastMarker = 0
2075 self.calls = []
2078 def size(self): argument
2079 if self.p == -1:
2080 self.fillBuffer()
2082 return len(self.nodes)
2087 def replaceChildren(self, parent, startChildIndex, stopChildIndex, t): argument
2089 self.adaptor.replaceChildren(
2094 def __str__(self): argument
2097 if self.p == -1:
2098 self.fillBuffer()
2100 return ' '.join([str(self.adaptor.getType(node))
2101 for node in self.nodes
2105 def toString(self, start, stop): argument
2109 if self.p == -1:
2110 self.fillBuffer()
2123 if self.tokens is not None:
2124 beginTokenIndex = self.adaptor.getTokenStartIndex(start)
2125 endTokenIndex = self.adaptor.getTokenStopIndex(stop)
2129 if self.adaptor.getType(stop) == UP:
2130 endTokenIndex = self.adaptor.getTokenStopIndex(start)
2132 elif self.adaptor.getType(stop) == EOF:
2133 endTokenIndex = self.size() -2 # don't use EOF
2135 return self.tokens.toString(beginTokenIndex, endTokenIndex)
2139 for i, t in enumerate(self.nodes):
2145 t = self.nodes[i]
2147 text = self.adaptor.getText(t)
2149 text = " " + self.adaptor.getType(t)
2153 t = self.nodes[i]
2156 text = self.adaptor.getText(stop)
2158 text = " " +self.adaptor.getType(stop)
2166 def __iter__(self): argument
2167 if self.p == -1:
2168 self.fillBuffer()
2170 for node in self.nodes:
2188 def __init__(self, input, state=None): argument
2189 BaseRecognizer.__init__(self, state)
2191 self.input = None
2192 self.setTreeNodeStream(input)
2195 def reset(self): argument
2196 BaseRecognizer.reset(self) # reset all recognizer state variables
2197 if self.input is not None:
2198 self.input.seek(0) # rewind the input
2201 def setTreeNodeStream(self, input): argument
2204 self.input = input
2207 def getTreeNodeStream(self): argument
2208 return self.input
2211 def getSourceName(self): argument
2212 return self.input.getSourceName()
2215 def getCurrentInputSymbol(self, input): argument
2219 def getMissingSymbol(self, input, e, expectedTokenType, follow): argument
2220 tokenText = "<missing " + self.tokenNames[expectedTokenType] + ">"
2232 def inContext(self, context, adaptor=None, tokenName=None, t=None): argument
2247 self.input.getTreeAdaptor(), self.getTokenNames(),
2248 self.input.LT(1), context)
2311 def matchAny(self, ignore): # ignore stream, copy of this.input argument
2318 self._state.errorRecovery = False
2320 look = self.input.LT(1)
2321 if self.input.getTreeAdaptor().getChildCount(look) == 0:
2322 self.input.consume() # not subtree, consume 1 node and return
2328 tokenType = self.input.getTreeAdaptor().getType(look)
2330 self.input.consume()
2331 look = self.input.LT(1)
2332 tokenType = self.input.getTreeAdaptor().getType(look)
2339 self.input.consume() # consume UP
2342 def mismatch(self, input, ttype, follow): argument
2352 def getErrorHeader(self, e): argument
2359 return (self.getGrammarFileName() +
2367 def getErrorMessage(self, e, tokenNames): argument
2373 if isinstance(self, TreeParser):
2382 return BaseRecognizer.getErrorMessage(self, e, tokenNames)
2385 def traceIn(self, ruleName, ruleIndex): argument
2386 BaseRecognizer.traceIn(self, ruleName, ruleIndex, self.input.LT(1))
2389 def traceOut(self, ruleName, ruleIndex): argument
2390 BaseRecognizer.traceOut(self, ruleName, ruleIndex, self.input.LT(1))
2404 def __init__(self, adaptor=None): argument
2406 self.adaptor = adaptor
2408 self.adaptor = CommonTreeAdaptor()
2410 def visit(self, t, pre_action=None, post_action=None): argument
2425 isNil = self.adaptor.isNil(t)
2431 while idx < self.adaptor.getChildCount(t):
2432 child = self.adaptor.getChild(t, idx)
2433 self.visit(child, pre_action, post_action)
2455 def __init__(self, tree, adaptor=None): argument
2459 self.root = tree
2460 self.adaptor = adaptor
2462 self.first_time = True
2463 self.tree = tree
2467 self.nodes = []
2470 self.down = adaptor.createFromType(DOWN, "DOWN")
2471 self.up = adaptor.createFromType(UP, "UP")
2472 self.eof = adaptor.createFromType(EOF, "EOF")
2475 def reset(self): argument
2476 self.first_time = True
2477 self.tree = self.root
2478 self.nodes = []
2481 def __iter__(self): argument
2482 return self
2485 def has_next(self): argument
2486 if self.first_time:
2487 return self.root is not None
2489 if len(self.nodes) > 0:
2492 if self.tree is None:
2495 if self.adaptor.getChildCount(self.tree) > 0:
2499 return self.adaptor.getParent(self.tree) is not None
2502 def next(self): argument
2503 if not self.has_next():
2506 if self.first_time:
2508 self.first_time = False
2509 if self.adaptor.getChildCount(self.tree) == 0:
2511 self.nodes.append(self.eof)
2512 return self.tree
2514 return self.tree
2517 if len(self.nodes) > 0:
2518 return self.nodes.pop(0)
2521 if self.tree is None:
2522 return self.eof
2525 if self.adaptor.getChildCount(self.tree) > 0:
2526 self.tree = self.adaptor.getChild(self.tree, 0)
2528 self.nodes.append(self.tree)
2529 return self.down
2532 parent = self.adaptor.getParent(self.tree)
2535 and self.adaptor.getChildIndex(self.tree)+1 >= self.adaptor.getChildCount(parent)):
2537 self.nodes.append(self.up)
2538 self.tree = parent
2539 parent = self.adaptor.getParent(self.tree)
2543 self.tree = None # back at root? nothing left then
2544 self.nodes.append(self.eof) # add to queue, might have UP nodes in there
2545 return self.nodes.pop(0)
2549 nextSiblingIndex = self.adaptor.getChildIndex(self.tree) + 1
2550 self.tree = self.adaptor.getChild(parent, nextSiblingIndex)
2551 self.nodes.append(self.tree) # add to queue, might have UP nodes in there
2552 return self.nodes.pop(0)
2580 def __init__(self, adaptor, elementDescription, elements=None): argument
2583 self.cursor = 0
2586 self.singleElement = None
2589 self.elements = None
2595 self.dirty = False
2600 self.elementDescription = elementDescription
2602 self.adaptor = adaptor
2606 self.singleElement = None
2607 self.elements = elements
2611 self.add(elements)
2614 def reset(self): argument
2622 self.cursor = 0
2623 self.dirty = True
2626 def add(self, el): argument
2630 if self.elements is not None: # if in list, just add
2631 self.elements.append(el)
2634 if self.singleElement is None: # no elements yet, track w/o list
2635 self.singleElement = el
2639 self.elements = []
2640 self.elements.append(self.singleElement)
2641 self.singleElement = None
2642 self.elements.append(el)
2645 def nextTree(self): argument
2654 if (self.dirty
2655 or (self.cursor >= len(self) and len(self) == 1)
2658 el = self._next()
2659 return self.dup(el)
2662 el = self._next()
2666 def _next(self): argument
2675 if len(self) == 0:
2676 raise RewriteEmptyStreamException(self.elementDescription)
2678 if self.cursor >= len(self): # out of elements?
2679 if len(self) == 1: # if size is 1, it's ok; return and we'll dup
2680 return self.toTree(self.singleElement)
2683 raise RewriteCardinalityException(self.elementDescription)
2686 if self.singleElement is not None:
2687 self.cursor += 1 # move cursor even for single element list
2688 return self.toTree(self.singleElement)
2691 o = self.toTree(self.elements[self.cursor])
2692 self.cursor += 1
2696 def dup(self, el): argument
2707 def toTree(self, el): argument
2716 def hasNext(self): argument
2717 return ( (self.singleElement is not None and self.cursor < 1)
2718 or (self.elements is not None
2719 and self.cursor < len(self.elements)
2724 def size(self): argument
2725 if self.singleElement is not None:
2728 if self.elements is not None:
2729 return len(self.elements)
2736 def getDescription(self): argument
2739 return self.elementDescription
2745 def toTree(self, el): argument
2751 def nextNode(self): argument
2752 t = self._next()
2753 return self.adaptor.createWithPayload(t)
2756 def nextToken(self): argument
2757 return self._next()
2760 def dup(self, el): argument
2767 def nextNode(self): argument
2783 if (self.dirty
2784 or (self.cursor >= len(self) and len(self) == 1)
2788 el = self._next()
2789 return self.adaptor.dupNode(el)
2792 el = self._next()
2793 while self.adaptor.isNil(el) and self.adaptor.getChildCount(el) == 1:
2794 el = self.adaptor.getChild(el, 0)
2797 return self.adaptor.dupNode(el)
2800 def dup(self, el): argument
2801 return self.adaptor.dupTree(el)
2811 def nextNode(self): argument
2812 return self._next()
2815 def toTree(self, el): argument
2816 return self.adaptor.dupNode(el)
2819 def dup(self, el): argument
2833 def __init__(self): argument
2834 self.start = None
2835 self.tree = None
2838 def getStart(self): argument
2839 return self.start
2842 def getTree(self): argument
2843 return self.tree