Skip to content

feat(#4533): remove last $ usage from regex matched block#5240

Open
asmirnov-backend wants to merge 1 commit into
objectionary:masterfrom
asmirnov-backend:4533-remove-dollar-from-regex
Open

feat(#4533): remove last $ usage from regex matched block#5240
asmirnov-backend wants to merge 1 commit into
objectionary:masterfrom
asmirnov-backend:4533-remove-dollar-from-regex

Conversation

@asmirnov-backend

@asmirnov-backend asmirnov-backend commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Closes #4533 (runtime part).

regex.eo's $ > matched was the only remaining $ (self/ξ) usage in the whole runtime library. Removed it by routing the next recursion through ^ (the block's ρ, which is match) and dropping the now-redundant .matched accessor — no Java atom or parser changes.

The idempotency sugar the original @todo waited on was dropped in the parser rewrite (769675b1a), so this approach uses no sugar at all.

Parser-level grammar removal of $ is left as a follow-up.

…ch.matched

Drop the `$ > matched` self-binding from `regex.eo`: route the recursion
through `^` (the block's rho, which is `match`) and remove the now-redundant
`.matched` accessor. No change to the Java atom or the parser.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@asmirnov-backend

Copy link
Copy Markdown
Contributor Author

@yegor256, could you please take a look

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Performance Analysis

All benchmarks are within the acceptable range. No critical degradation detected (threshold is 100%). Please refer to the detailed report for more information.

Click to see the detailed report
Test Base Score PR Score Change % Change Unit Mode
benchmarks.XmirBench.xmirToEO 13684.645 13592.258 -92.386 -0.68% ms/op Average Time

✅ Performance gain: benchmarks.XmirBench.xmirToEO is faster by 92.386 ms/op (0.68%)

@maxonfjvipon

Copy link
Copy Markdown
Member

@asmirnov-backend let's wait with this PR until #5165 is resolved

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.

Unnecessary Dollar Sign Remains in Grammar Post-#4411 Fix

2 participants