Lines Matching full:children
24 self.children = []
42 if len(node.alternatives) == len(node.children):
56 if len(node.group) == len(node.children):
98 for child in self.children:
101 if not self.children:
116 node = node.children[0]
120 if len(node.children) <= 2:
122 new_node = reduce_tree(node.children[0], parent)
126 #skip odd children('|' tokens)
127 for child in node.children:
128 if node.children.index(child)%2:
132 new_node.children.append(reduced)
134 if len(node.children) > 1:
137 for child in node.children:
140 new_node.children.append(reduced)
141 if not new_node.children:
142 # delete the group if all of the children were reduced to None
146 new_node = reduce_tree(node.children[0], parent)
149 if (isinstance(node.children[0], pytree.Leaf) and
150 node.children[0].value == '('):
152 return reduce_tree(node.children[1], parent)
153 if ((isinstance(node.children[0], pytree.Leaf) and
154 node.children[0].value == '[')
156 (len(node.children)>1 and
157 hasattr(node.children[1], "value") and
158 node.children[1].value == '[')):
169 for child in node.children:
184 name_leaf = node.children[2]
187 name_leaf = node.children[3]
189 name_leaf = node.children[0]
215 if repeater_node.children[0].value == '*':
218 elif repeater_node.children[0].value == '+':
226 #add children
228 for child in details_node.children[1:-1]:
232 new_node.children.append(reduced)