Lines Matching +full:repeat +full:- +full:string
29 """Tokenizes a string suppressing significant whitespace."""
56 """Compiles a pattern string to a nested pytree.*Pattern object."""
72 # XXX Optimize certain Wildcard-containing-Wildcard patterns
104 repeat = None
105 if len(nodes) >= 2 and nodes[-1].type == self.syms.Repeater:
106 repeat = nodes[-1]
107 nodes = nodes[:-1]
109 # Now we've reduced it to: STRING | NAME [Details] | (...) | [...]
110 pattern = self.compile_basic(nodes, repeat)
112 if repeat is not None:
113 assert repeat.type == self.syms.Repeater
114 children = repeat.children
123 assert children[-1].type == token.RBRACE
138 def compile_basic(self, nodes, repeat=None): argument
139 # Compile STRING | NAME [Details] | (...) | [...]
142 if node.type == token.STRING:
168 assert repeat is None
180 "STRING": token.STRING,