Home | History | Annotate | Download | only in antlr3

Lines Matching refs:elements

63     This signifies a case where the cardinality of two or more elements
78 """@brief No elements within a (...)+ in a rewrite rule"""
764 """Add all elements of kids list as children of this node"""
1828 # It is built upon ctor invocation. The elements are type
2565 A generic list of elements tracked in an alternative to be used in
2570 Once you start next()ing, do not try to add more elements. It will
2580 def __init__(self, adaptor, elementDescription, elements=None):
2582 # which bumps it to 1 meaning no more elements.
2585 # Track single elements w/o creating a list. Upon 2nd add, alloc list
2589 self.elements = None
2604 if isinstance(elements, (list, tuple)):
2607 self.elements = elements
2611 self.add(elements)
2617 not consumed any of its elements. Elements themselves are untouched.
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
2639 self.elements = []
2640 self.elements.append(self.singleElement)
2642 self.elements.append(el)
2647 Return the next element in the stream. If out of elements, throw
2648 an exception unless size()==1. If size is 1, then return elements[0].
2650 Return a duplicate node/subtree if stream is out of elements and
2657 # if out of elements and size is 1, dup
2671 if the stream is empty or we're out of elements and size>1.
2678 if self.cursor >= len(self): # out of elements?
2682 # out of elements and size was not 1, so we can't dup
2685 # we have elements
2690 # must have more than one in list, pull from elements
2691 o = self.toTree(self.elements[self.cursor])
2718 or (self.elements is not None
2719 and self.cursor < len(self.elements)
2728 if self.elements is not None:
2729 return len(self.elements)
2786 # if out of elements and size is 1, dup (at most a single node