Skip to content

Support lookbehind: (?<= (?<! #17

Description

@halotukozak

Currently rejected at parse time (see RegexParser.scala, group-header parsing: case '=' | '!' => unsupported("lookahead") and the lookbehind branch).

Like anchors, lookaround is a zero-width assertion that doesn't map cleanly onto plain Brzozowski derivatives — matching at a position needs to inspect surrounding text without consuming it. Needs design work on how this interacts with Subset's derivative/subset-containment model (lookaround changes what "language equivalence" even means for containment checks).

Consider starting with lookahead ((?=, (?!) since it only needs to inspect the remaining input, which fits the derivative direction; lookbehind ((?<=, (?<!) needs the consumed prefix and is harder.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions