fix(regex): preserve control-verb trie boundaries - #1363
Merged
Conversation
Keep PRUNE and SKIP within their innermost syntactic branch, make COMMIT discard all pending alternatives, and preserve the original branch position when THEN crosses a common-prefix trie boundary. Fixes perl5_t/t/re/regexp.t control-verb cases on JVM and interpreter. Generated with [OpenAI Codex](https://openai.com/codex) Co-Authored-By: OpenAI Codex <codex@openai.com>
Mark source alternatives that contain PRUNE or SKIP so those verbs preserve only enclosing alternatives. Continue cutting ordinary alternatives and quantifier retries after a completed nested group. Restores re/pat_advanced.t and re/pat_advanced_thr.t on both backends. Generated with [OpenAI Codex](https://openai.com/codex) Co-Authored-By: OpenAI Codex <codex@openai.com>
Do not mark enclosing alternations merely because a nested branch contains PRUNE or SKIP. Preserve the immediate source alternation boundary so a nested SKIP reaches the enclosing COMMIT without skipping to a false positive. Restores perl5_t/t/re/regexp.t to 2290/2290 on both backends. Generated with [OpenAI Codex](https://openai.com/codex) Co-Authored-By: OpenAI 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
PRUNE/SKIP/COMMITboundaries through nested regex alternativesTHENcrosses a common-prefix trie boundaryperl5_t/t/re/regexp.tValidation
makemake check-linksprove src/test/resources/unit/regex/control_verb_trie_boundary.t./jperl src/test/resources/unit/regex/control_verb_trie_boundary.t./jperl --interpreter src/test/resources/unit/regex/control_verb_trie_boundary.tcd perl5_t && ../jperl t/re/regexp.tcd perl5_t && ../jperl --interpreter t/re/regexp.t