yargy icon indicating copy to clipboard operation
yargy copied to clipboard

repeatable и RecursionError

Open kuk opened this issue 6 years ago • 0 comments

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 
...

kuk avatar Sep 15 '17 09:09 kuk