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.
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.