Skip to content

using the negate character (^) in a grammar with a sequence #2888

@pacmanincarnate

Description

@pacmanincarnate

In a grammar, the negate symbol does not work as anticipated with a sequence of characters (a string). Rather than negating the combination, it negates each letter individually. For instance [^”chapter”]+ will allow generation of any characters other than c, h, a, p, t, e, or r, rather than the tokens that make up “chapter” in order. This makes it impossible to negate a specific word or phrase.
Ideally, we would be able to negate a sequence of characters rather than just a range or individual characters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions