Lines Matching refs:adaptor
275 and adaptor, I've merged them. Makes sense to encapsulate.
316 use "t=adaptor.nil(); t.addChild(x); t.addChild(y);"
996 tree (not just Tree interface). It invokes the adaptor routines
1480 objects, you need to override this and then set the parser tree adaptor to
1577 override this in your own adaptor.
1695 What adaptor can tell me how to interpret/navigate nodes and
1776 adaptor = CommonTreeAdaptor()
1785 adaptor = args[0]
1798 adaptor = parent.adaptor
1814 self.down = adaptor.createFromType(DOWN, "DOWN")
1819 self.up = adaptor.createFromType(UP, "UP")
1824 self.eof = adaptor.createFromType(EOF, "EOF")
1845 # What tree adaptor was used to build these trees
1846 self.adaptor = adaptor
1863 return TreeIterator(self.root, self.adaptor)
1876 nil = self.adaptor.isNil(t)
1882 n = self.adaptor.getChildCount(t)
1888 self._fillBuffer(self.adaptor.getChild(t, c))
1921 navNode = self.adaptor.createFromType(DOWN, "DOWN")
1928 navNode = self.adaptor.createFromType(UP, "UP")
1976 return self.adaptor.getType(obj) == EOF
1996 return self.adaptor
2015 return self.adaptor.getType(self.LT(i))
2089 self.adaptor.replaceChildren(
2100 return ' '.join([str(self.adaptor.getType(node))
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:
2147 text = self.adaptor.getText(t)
2149 text = " " + self.adaptor.getType(t)
2156 text = self.adaptor.getText(stop)
2158 text = " " +self.adaptor.getType(stop)
2221 adaptor = input.adaptor
2222 return adaptor.createToken(
2232 def inContext(self, context, adaptor=None, tokenName=None, t=None):
2251 def _inContext(cls, adaptor, tokenNames, t, context):
2271 t = adaptor.getParent(t)
2279 ancestor = cls._getAncestor(adaptor, tokenNames, t, goal)
2285 name = tokenNames[adaptor.getType(t)]
2291 t = adaptor.getParent(t)
2300 def _getAncestor(adaptor, tokenNames, t, goal):
2303 name = tokenNames[adaptor.getType(t)]
2306 t = adaptor.getParent(t)
2374 adaptor = e.input.getTreeAdaptor()
2375 e.token = adaptor.getToken(e.node)
2378 type=adaptor.getType(e.node),
2379 text=adaptor.getText(e.node)
2404 def __init__(self, adaptor=None):
2405 if adaptor is not None:
2406 self.adaptor = adaptor
2408 self.adaptor = CommonTreeAdaptor()
2425 isNil = self.adaptor.isNil(t)
2431 while idx < self.adaptor.getChildCount(t):
2432 child = self.adaptor.getChild(t, idx)
2455 def __init__(self, tree, adaptor=None):
2456 if adaptor is None:
2457 adaptor = CommonTreeAdaptor()
2460 self.adaptor = adaptor
2470 self.down = adaptor.createFromType(DOWN, "DOWN")
2471 self.up = adaptor.createFromType(UP, "UP")
2472 self.eof = adaptor.createFromType(EOF, "EOF")
2495 if self.adaptor.getChildCount(self.tree) > 0:
2499 return self.adaptor.getParent(self.tree) is not None
2509 if self.adaptor.getChildCount(self.tree) == 0:
2525 if self.adaptor.getChildCount(self.tree) > 0:
2526 self.tree = self.adaptor.getChild(self.tree, 0)
2532 parent = self.adaptor.getParent(self.tree)
2535 and self.adaptor.getChildIndex(self.tree)+1 >= self.adaptor.getChildCount(parent)):
2539 parent = self.adaptor.getParent(self.tree)
2549 nextSiblingIndex = self.adaptor.getChildIndex(self.tree) + 1
2550 self.tree = self.adaptor.getChild(parent, nextSiblingIndex)
2580 def __init__(self, adaptor, elementDescription, elements=None):
2602 self.adaptor = adaptor
2700 around it. For trees, you must call the adaptor.dupTree() unless
2753 return self.adaptor.createWithPayload(t)
2789 return self.adaptor.dupNode(el)
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)
2801 return self.adaptor.dupTree(el)
2816 return self.adaptor.dupNode(el)