yargy
yargy copied to clipboard
repeatable и RecursionError
RULE = rule(
'a',
rule('b').repeatable(),
'c'
)
parser = Parser(RULE)
text = ' '.join(['a'] + ['b'] * 1000 + ['c'])
list(parser.match(text))
RecursionError Traceback (most recent call last)
<ipython-input-40-a75887a32205> in <module>()
1 parser = Parser(RULE)
2 text = ' '.join(['a'] + ['b'] * 1000 + ['c'])
----> 3 list(parser.match(text))
/Users/alexkuk/natasha/yargy/yargy/parser.py in match(self, text)
224 # NOTE Not an optimal
...