Skip to content

fix(regex): preserve lexical branch-reset calls - #1069

Draft
fglock wants to merge 5 commits into
fix/phase36-joni-multifold-ascii-strictfrom
fix/phase36-joni-branch-reset-calls-v2
Draft

fix(regex): preserve lexical branch-reset calls#1069
fglock wants to merge 5 commits into
fix/phase36-joni-multifold-ascii-strictfrom
fix/phase36-joni-branch-reset-calls-v2

Conversation

@fglock

@fglock fglock commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve the physical capture target of backward relative subpattern calls inside branch-reset alternatives
  • keep absolute and named calls on the existing logical-number path
  • avoid treating an exact lexical target as recursive merely because its logical number is multiplexed
  • add direct-Joni and product reducers for named, Python, absolute, and relative calls

Validation

  • Homebrew Perl 5.42.2 oracle: 31/31 (the relative-call semantics are pinned from Perl 5.44 upstream behavior)
  • auto and forced-Joni on JVM/interpreter: 10/10 in every relative-call cell
  • full make: warning-free in 3m28, 17 tasks, exit 0
  • direct Joni suite and all unit shards: green

Stack

This draft is stacked on fix/phase36-joni-multifold-ascii-strict at exact
parent 6bfb6f1fd43f76650ddf54a5145a5ad2ab55130d.

References dev/design/phase36-regex-parity.md.

fglock and others added 5 commits August 18, 2026 23:04
Cover duplicate named branch-reset calls through Perl and Python spellings and
absolute numeric branch-reset calls. The oracle passes under system Perl and
forced Joni on both execution backends while exposing the temporary Java
routing regression.

Generated with [Codex](https://openai.com/codex/)

Co-Authored-By: Codex <codex@openai.com>
Encode Perl 5.44 re_tests 2128-2130 directly in the forked Joni suite so each
relative subexpression call must target its lexical branch-reset capture rather
than the leftmost capture sharing that logical number.

Generated with [Codex](https://openai.com/codex/)

Co-Authored-By: Codex <codex@openai.com>
Record the physical capture visible when a backward relative subexpression
call is parsed so branch-reset alternatives do not collapse onto the shared
logical capture node. The analyser hookup and validation follow after its
current owner releases the file.

References dev/design/phase36-regex-parity.md.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Add an end-to-end Perl spelling reducer for the physical lexical target used by
relative subexpression calls in later branch-reset alternatives.

References dev/design/phase36-regex-parity.md.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Resolve backward relative subpattern calls to the physical capture visible at
their parse location. Do not apply the logical-number multiplex recursion
workaround when that exact lexical target is available, preserving captures
already visible to the caller.

References dev/design/phase36-regex-parity.md.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant