Skip to content

SkipTo removes ignored expression since v3.1.0 #500

Closed
@catcombo

Description

def parse(tokens):
    # pyparsing 3.0.9 -> ['a_*_a']
    # pyparsing 3.1.0 -> ['']
    print(tokens)


wrapper = "a" + SkipTo("a") + "a"
expr = "*" + SkipTo("*", ignore=wrapper).set_parse_action(parse) + "*"

# pyparsing 3.0.9 -> ['*', 'a_*_a', '*']
# pyparsing 3.1.0 -> ['*', '', '*']
print(expr.parse_string("*a_*_a*"))

The code example works correctly on pyparsing 3.0.9. But since 3.1.0 it's no longer possible to get access to the ignored expression and parse it differently.

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