feat(regex): implement (*ACCEPT) in vendored Joni - #972
Merged
Conversation
Parse (*ACCEPT) as a native matcher-control opcode and preserve Perl's top-level, subpattern-call, positive-lookahead, and dynamic-program boundaries. Close captures at the accepted endpoint, discard abandoned backtracking continuations, and route ACCEPT-bearing patterns to Joni. Disable mandatory-suffix optimization for control-verb programs because the accepted control-flow path can make that suffix unreachable. Extend positive-lookahead frames with their continuation target so ACCEPT can resume the enclosing matcher correctly. Add standard-Perl differential coverage and vendored-Joni unit coverage. Update the Joni design and regex feature matrix. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(*ACCEPT)as a native vendored-Joni control-verb AST node and opcodeAll new vendored-Joni sources retain the upstream MIT notice. Existing
org.jonisource namespaces remain unchanged; standalone packaging continues to relocate them toorg.perlonjava.internal.joni.Validation
prove src/test/resources/unit/regex/accept_control_verb.t: 13/13 on standard Perlmake: pass, no warningsperl dev/tools/perl_test_runner.pl perl5_t/t/re/: 80 files, 50,718 passing assertions, zero timeoutsBaseline comparison
Compared file-by-file with
../PerlOnJava/logs/test_20260815_080000_958.log:regexp_unicode_prop.tis 1019/1110 versus the historical 1031/1110; a detached, cleanorigin/masterbuild reproduces the same 1019/1110 result, so this is inherited from merged main and is not introduced by this branchThe ACCEPT-specific gain is visible in both
pat_re_eval.tandpat_re_eval_thr.t, which move from the PR 970 postbase 22/555 to 24/555.Generated with Codex