Skip to content

Word min argument regression in Pyparsing 3.1.0 #502

@volans-

Description

@volans-

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

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy