Skip to content

Commit 08775ee

Browse files
Sync autogenerated files #noupdate
1 parent 3a9bd7b commit 08775ee

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

doc/html/pcre2compat.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ <h2>
4848
<p>
4949
4. If a braced quantifier such as {1,2} appears where there is nothing to
5050
repeat (for example, at the start of a branch), PCRE2 raises an error whereas
51-
Perl treats the quantifier characters as literal.
51+
Perl treats the quantifier characters as literal. When a braced quantifier
52+
(...){min,max} has min &#62; max, Perl treats it as an item which fails to match
53+
any portion of the subject (as no number of repetitions can meet the
54+
condition), and additionally issues a warning when in warning mode. PCRE2 has
55+
no warning features, so it gives an error in this case.
5256
</p>
5357
<p>
5458
5. Capture groups that occur inside negative lookaround assertions are counted,

doc/pcre2.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5510,7 +5510,12 @@ DIFFERENCES BETWEEN PCRE2 AND PERL
55105510

55115511
4. If a braced quantifier such as {1,2} appears where there is nothing
55125512
to repeat (for example, at the start of a branch), PCRE2 raises an er-
5513-
ror whereas Perl treats the quantifier characters as literal.
5513+
ror whereas Perl treats the quantifier characters as literal. When a
5514+
braced quantifier (...){min,max} has min > max, Perl treats it as an
5515+
item which fails to match any portion of the subject (as no number of
5516+
repetitions can meet the condition), and additionally issues a warning
5517+
when in warning mode. PCRE2 has no warning features, so it gives an er-
5518+
ror in this case.
55145519

55155520
5. Capture groups that occur inside negative lookaround assertions are
55165521
counted, but their entries in the offsets vector are set only when a

src/pcre2.h.generic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ pcre2_pattern_convert(). */
345345
#define PCRE2_ERROR_PERL_ECLASS_UNEXPECTED_CHAR 216
346346
#define PCRE2_ERROR_EXPECTED_CAPTURE_GROUP 217
347347
#define PCRE2_ERROR_MISSING_OPENING_PARENTHESIS 218
348+
#define PCRE2_ERROR_MISSING_NUMBER_TERMINATOR 219
348349

349350
/* "Expected" matching error codes: no match and partial match. */
350351

0 commit comments

Comments
 (0)