vlasovskikh / funcparserlib

Recursive descent parsing library for Python based on functional combinators
https://funcparserlib.pirx.ru
MIT License
338 stars 38 forks source link

TypeError in `oneplus` when applying it `parser + parser` #66

Closed vlasovskikh closed 3 years ago

vlasovskikh commented 3 years ago

I expect this parser to return:

>>> x = a('x')
>>> y = a('y')
>>> expr = oneplus(x + y)
>>> expr.parse('xyxyxy')
[('x', 'y'), ('x', 'y'), ('x', 'y')]

But I get a TypeError instead:

>>> expr.parse('xyxyxy')
Traceback (most recent call last):
    ...
TypeError: can only concatenate list (not "str") to list
vlasovskikh commented 3 years ago

Fixed by 10f4017287b88fc85a67a6e13760f915a137a8e4.