Closed
Description
Summary
It seems to me that there is a regression in Pyparsing 3.1.0 at least for the min
argument of the Word
class. I quickly tested the max
one that seems to work but I didn't test all the combinations between min
, max
and exact
.
Versions
- Python 3.11.3
- Pyaprsing 3.1.0
Repro code
>>> import pyparsing
>>> grammar = pyparsing.Word('abc', min=2)('key')
>>> grammar.parseString('a'.strip(), parseAll=True)
ParseResults(['a'], {'key': 'a'})
With version 3.0.9
that raises as expected:
pyparsing.exceptions.ParseException: Expected W:(abc){2,...}, found end of text (at char 1), (line:1, col:2)
Metadata
Assignees
Labels
No labels