76 lines
7.8 KiB
Markdown
76 lines
7.8 KiB
Markdown
# Flavour support
|
|
|
|
| Flavour | Syntax | Execution | Replacement | Captures | Trace | Analysis | Generated cases | Native offsets |
|
|
| ---------------------- | ------------------------------------------------------------ | --------------------------------------------------------- | ---------------------------------------- | -------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------- | -------------- |
|
|
| ECMAScript | regexpp 4.12.2; explanations partial/feature-matrix tested | Current browser `RegExp`; conformance tested | Bounded ECMAScript `GetSubstitution` | Named/numbered; final repeated capture; no history | Unavailable | Experimental static heuristics + bounded native probes | Bounded normalized-AST sampling; actual-engine verified | UTF-16 |
|
|
| PCRE2 10.47 | Application lexical provider partial; compiler authoritative | Pinned 8-bit WASM; bounded/killable/conformance tested | Native bounded `pcre2_substitute()` loop | Native named/numbered records; no capture history | Bounded reported automatic callouts; derived movement labels | Unavailable; ECMAScript heuristics are never applied | Unavailable; structural syntax provider is partial | UTF-8 bytes |
|
|
| Python `re` | Application lexical provider partial; compiler authoritative | CPython 3.14.2 in self-hosted Pyodide 314.0.3 | Native bounded `re` expansion | Native named/numbered spans; no capture history | Unavailable | Unavailable; ECMAScript heuristics are never applied | Unavailable; structural syntax provider is partial | Code points |
|
|
| Java `java.util.regex` | Application lexical provider partial; compiler authoritative | TeaVM 0.15.0 class library; bounded/killable; not OpenJDK | TeaVM single-digit `$n`; no `${name}` | Native numbered ranges; lexical names; no history | Unavailable | Unavailable; ECMAScript heuristics are never applied | Unavailable; structural syntax provider is partial | UTF-16 |
|
|
| PCRE | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable |
|
|
| Go `regexp` | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Planned bytes |
|
|
| Rust `regex` | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Unavailable | Planned bytes |
|
|
| .NET | Unavailable | Unavailable | Unavailable | Planned capture history | Unavailable | Unavailable | Unavailable | Planned UTF-16 |
|
|
|
|
ECMAScript tests cover its complete exposed flag matrix, internal indices,
|
|
zero-length iteration, captures, lookbehind, backreferences, Unicode properties
|
|
and bounded replacement.
|
|
|
|
PCRE2 tests cover `g`, `i`, `m`, `s`, `x`, `U`, `J`, mandatory UTF/UCP,
|
|
branch-reset groups, recursion, `\K`, duplicate names, native substitution,
|
|
astral byte/UTF-16 ranges, zero-length iteration, compile errors, match limits
|
|
and result/output truncation. Trace tests cover reported automatic callouts,
|
|
bounded mark copying, native stop at the complete-event cap, compile ranges,
|
|
worker loading and browser rendering.
|
|
|
|
Python tests cover application-level `g`, CPython flags `a`, `i`, `m`, `s` and
|
|
`x`, Python-only named-group/replacement syntax, native `re` substitution,
|
|
astral code-point/UTF-16 normalization, zero-length iteration, compile errors,
|
|
result limits, runtime identity and worker recovery.
|
|
|
|
Java tests cover application-level `g`, TeaVM `Pattern` flags, Java named-group
|
|
syntax, TeaVM's native single-digit `$n` `Matcher` replacement, explicit
|
|
rejection of unsupported `${name}`, astral UTF-16 ranges, zero-length
|
|
iteration, compile errors, result limits, module identity and worker recovery.
|
|
The runtime and UI explicitly report that TeaVM 0.15.0 is not OpenJDK and does
|
|
not implement OpenJDK `Pattern.UNICODE_CHARACTER_CLASS`; `U` is a compatibility
|
|
request rather than an exact implementation of that flag.
|
|
|
|
ECMAScript static findings and generated-input timing observations are
|
|
advisory. They describe only the selected ECMAScript 2025 pattern, browser
|
|
runtime and bounded inputs; they are not proofs of safety or general
|
|
complexity.
|
|
|
|
ECMAScript generated-case version 1 uses only a complete accepted normalized
|
|
AST, an explicit deterministic seed and bounded sampling strategies. Every
|
|
retained positive or negative label is confirmed by the actual selected
|
|
browser engine. PCRE2, Python and Java generation are unavailable because
|
|
their current lexical providers are intentionally partial; ECMAScript behavior
|
|
is never relabelled as another flavour.
|
|
|
|
The PCRE2, Python and Java explanation providers deliberately do not invent
|
|
full structural coverage. PCRE2 branch-reset numbering is omitted from the
|
|
syntax tree, while actual capture numbers, names and ranges still come from the
|
|
selected runtime result.
|
|
|
|
ECMAScript and PCRE2 support exact-request comparison for syntax acceptance,
|
|
engine compilation, matches, captures and engine-native replacement. Results
|
|
align by normalized UTF-16 ranges while retaining each native offset model.
|
|
Timeout, cancellation, rejection and truncation are never presented as
|
|
equivalent results.
|
|
|
|
Pattern formatting is available only for an exact accepted ECMAScript regexpp
|
|
snapshot. It canonicalizes literal slashes and raw control/line-separator
|
|
representations, then requires paired actual-engine and applicable exact-test
|
|
validation before apply. PCRE2, Python and Java formatting is unavailable
|
|
because those providers are deliberately partial; their syntax is never
|
|
treated as ECMAScript.
|
|
|
|
Subject minimization accepts only the verified ECMAScript and PCRE2 paths.
|
|
Python and Java selections are disabled rather than being minimized through a
|
|
different flavour. Semantic comparison is likewise an explicit
|
|
ECMAScript/PCRE2 operation; it is not a generic four-way equivalence checker.
|
|
|
|
PCRE2 is the only current code-generation target. The reviewed C17 generator is
|
|
pinned to the PCRE2 10.47 8-bit API; other language generators remain
|
|
unavailable until they pass equivalent escaping and named-toolchain gates.
|