Skip to content

Regexp pipeline - #4409

Merged
kddnewton merged 60 commits into
mainfrom
regexp-pipeline
Nov 18, 2026
Merged

kddnewton merged 60 commits into
mainfrom
regexp-pipeline

Conversation

@kddnewton

Copy link
Copy Markdown
Collaborator

This is a full overhaul of the way we parse regular expressions.

For the uninitiated, you have to parse regular expressions in Ruby because named captures can introduce local variables, and an identifier being a local variable can change the way an expression is lexed. As such, we have to get this right.

Previously we got just enough working to get the CRuby specs to pass, but left a lot on the table. In particular we did not match a lot of Onigmo validation, and as such a lot of things that should have been parse time errors ended up being compile time errors. Not a huge difference for a lot of people, but much worse from the perspective of tooling.

This stack of commits brings a lot of Onigmo's frontend validation into Prism, and gets us largely to parity. It also cleans up a fairly large number of small, difficult to hit bugs in edge cases. The remaining disparities are mostly tiny, and I've opened up redmine tickets for almost all of them. The only other one that isn't really an issue per-se but is something I'm intentionally leaving out of this is validating \p{} syntax, because I don't want to take on the massive list of valid UCD properties.

Fixes #4398
Fixes #4399
Fixes #4400
Fixes #4401
Fixes #4402
Fixes #4403
Fixes #4404
Fixes #4405
Fixes #4406
Fixes #4407
Fixes #4408

@kddnewton
kddnewton merged commit f7c06dc into main Nov 18, 2026
121 of 122 checks passed
@kddnewton
kddnewton deleted the regexp-pipeline branch November 18, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment