Skip to content

Better repetition operator #23

@johndeighan

Description

@johndeighan

I think that Peggy allows this. Instead of having to write:
Part ( "," Part )* for "one or more Parts separated by a comma", you could write, e.g.:
(Part / ",")+ Now, I'm sure you won't be able to use a slash there - you just need something to separate the item(s) from the separator. You'd also be allowed to use
(Part / ",")* to mean "zero or more Parts separated by a comma"
Where you see Part, you could, in fact, put any expression at all. Personally, I think it's much clearer what you're expecting to see. The separator is usually something with no semantic meaning - it's just there to make parsing easier - for both the software and the brain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions