-
-
Notifications
You must be signed in to change notification settings - Fork 16
Implement a strictly compliant I-RegExp parsing mode #2620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -73,7 +73,13 @@ enum class RegexIndex : std::uint8_t { | |||||
| /// The dialects that a regular expression pattern can be interpreted with. | ||||||
| enum class RegexDialect : std::uint8_t { | ||||||
| /// A permissive superset of ECMA 262 with PCRE2 extensions | ||||||
| Permissive | ||||||
| Permissive, | ||||||
| /// Strict RFC 9485 I-Regexp, where any pattern outside the grammar is | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The docstring describes this dialect as "Strict RFC 9485 I-Regexp" but the implementation intentionally deviates from the RFC for Prompt for AI agents
Suggested change
|
||||||
| /// rejected and matching considers the whole input. Patterns are | ||||||
| /// interpreted through the RFC 9485 Section 5.4 engine mapping, so an | ||||||
| /// unescaped caret or dollar acts as an assertion instead of a literal | ||||||
| /// and rejects quantification | ||||||
| IRegexp | ||||||
| }; | ||||||
|
|
||||||
| /// @ingroup regex | ||||||
|
|
@@ -83,6 +89,7 @@ enum class RegexDialect : std::uint8_t { | |||||
| /// | ||||||
| /// - Permissive regexes are NOT automatically anchored | ||||||
| /// - Permissive regexes assume `DOTALL` | ||||||
| /// - RFC 9485 regexes match the whole input | ||||||
| /// - Regexes assume Unicode | ||||||
| /// - Regexes are case sensitive | ||||||
| /// - No matching happens (only boolean validation) | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.