fix(regex): advance native Joni diagnostics and strict policy - #1082
Merged
Conversation
Treat empty input as having no grapheme, sentence, word, or line boundary, so the positive assertions fail and their negations match. Accept Perl's surrounding whitespace in boundary names without weakening unknown-name diagnostics. Generated with Codex (https://openai.com/codex) Co-Authored-By: OpenAI Codex <codex@openai.com>
Suppress Ruby-style unescaped closing-bracket warnings under PerlNG syntax while retaining Joni's existing parsing semantics. Add a system-Perl-validated fixture covering literal, class, negated-class, and backreference contexts. This closes nine unchanged regexp.t rows with no introduced failures. Generated with [OpenAI Codex](https://openai.com/codex/) Co-Authored-By: OpenAI Codex <codex@openai.com>
Give PerlNG and PerlOnJava syntax descending character ranges Perl's diagnostic while preserving upstream Joni behavior for other syntaxes. Align the temporary Java differential route and add system-Perl and direct-Joni coverage for byte and wide ranges. This closes two unchanged regexp.t rows with no introduced failures. Generated with [OpenAI Codex](https://openai.com/codex/) Co-Authored-By: OpenAI Codex <codex@openai.com>
Retain unknown POSIX class spelling in PerlNG diagnostics, including negated class names, while preserving upstream Joni messages for other syntaxes. Add system-Perl and direct-Joni coverage. This closes four unchanged regexp.t rows with no introduced failures. Generated with [OpenAI Codex](https://openai.com/codex/) Co-Authored-By: OpenAI Codex <codex@openai.com>
Carry lexical use re 'strict' context through literal validation, runtime compilation, regex caching, cloning, and deferred recompilation. Apply that context to Perl's unescaped-left-brace warning-versus-fatal policy while preserving always-fatal and explicitly allowed brace contexts. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
Make malformed non-hex escapes fatal under lexical use re 'strict', retain exactly one default warning for qr construction and match use, and preserve the source spelling of resolved braced hex digits. Exclude extended-class grammar from this source-policy correction. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
Exclude uppercase \\B{...} boundary constructs from literal-left-brace
classification so their dedicated empty, missing-brace, unknown-boundary,
and /a warning diagnostics remain authoritative.
Generated with [Codex](https://openai.com/codex)
Co-Authored-By: Codex <codex@openai.com>
Give PerlNG empty classes Perl's unmatched-opening-bracket diagnostic and source position. Route this Perl spelling to Joni even in temporary explicit Java differential mode, and add system-Perl and direct-Joni coverage. This closes two unchanged regexp.t rows with no introduced failures. Generated with [OpenAI Codex](https://openai.com/codex/) Co-Authored-By: OpenAI Codex <codex@openai.com>
Keep underscore-separated braced hexadecimal escapes and omitted-lower-bound quantifiers out of lexical re-strict warning detection. Match Joni's accepted interval whitespace and add a system-Perl-validated quantifier fixture. This restores the full-build wide-scalar gate and prevents seven unchanged regexp.t regressions introduced by the lexical-policy tranche. Generated with [OpenAI Codex](https://openai.com/codex/) Co-Authored-By: OpenAI Codex <codex@openai.com>
Use Perl's leading-quantifier diagnostic under PerlNG syntax while preserving upstream Joni wording for other syntaxes. Add system-Perl and direct-Joni coverage for top-level, alternation, and case-insensitive forms. This closes four unchanged regexp.t rows with no introduced failures. 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
and leading-quantifier behavior with Perl
use re 'strict'through literal, runtime, cached, cloned,and deferred regex compilation
legal wide escapes or omitted-lower-bound quantifiers
copyright/authorship notices
Semantic results
re/regexp.t: +35 passing assertions across the native Jonifamilies in this batch, with zero introduced assertion failures
re/reg_mesg.t: 43 normalized failures removed on both JVM andinterpreter, zero introduced; corrected plans execute 28 additional passing
follow-up assertions
Validation
makeatc0db1f56d: passed all 17 tasks in 3m48s(
/tmp/make-phase36-post1081-c0db1f56d.log)makeat exact PR head4da58459c:/tmp/make-phase36-post1081-4da58459c.log/tmp/make-phase36-boundary-empty-whitespace.log,/tmp/make-phase36-close-bracket-policy.log,/tmp/make-phase36-range-diagnostic-3.log,/tmp/make-phase36-posix-diagnostic.log,/tmp/make-phase36-empty-class-diagnostic-3.log,/tmp/make-phase36-wide-strict-regression.log,/tmp/make-phase36-quantifier-omitted.log, and/tmp/make-phase36-quantifier-nothing.logRelates to
dev/design/phase36-regex-parity.md.