Skip to content

docs: design executable regex callbacks - #907

Merged
fglock merged 1 commit into
masterfrom
docs/executable-regex-callbacks-design
Aug 9, 2026
Merged

docs: design executable regex callbacks#907
fglock merged 1 commit into
masterfrom
docs/executable-regex-callbacks-design

Conversation

@fglock

@fglock fglock commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a focused design for executable regex callbacks
  • define the structured callback template and generic Joni callout architecture
  • specify Perl backtracking, dynamic-local, provisional-capture, caching, and safety requirements
  • lay out differential, core-suite, and CPAN policy-removal gates across seven phases
  • link the older broad Joni migration sketch to the focused callback design

Key decisions

  • keep ordinary regexes on the existing fast path
  • preserve callback bodies as lexical RuntimeCode closures instead of flattening them into pattern strings
  • extend Joni with runtime-neutral callout opcodes rather than adding regex-preprocessor approximations
  • restore dynamically localized state on backtracking without rolling back ordinary callback side effects
  • require (??{ ... }) nested alternatives to participate in outer backtracking before enabling the feature

Verification

  • git diff --check
  • full make (BUILD SUCCESSFUL, 5m42s)

Generated with Codex

Co-Authored-By: Codex codex@openai.com

Define the compiler, runtime, Joni callout, backtracking, testing, and
delivery plan for executable regex callbacks. Link the older Joni migration
sketch to the focused design.

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

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock merged commit e22f328 into master Aug 9, 2026
2 checks passed
@fglock
fglock deleted the docs/executable-regex-callbacks-design branch August 9, 2026 20:30
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