diff --git a/doc/html/pcre2pattern.html b/doc/html/pcre2pattern.html index bb9ba30d6..afa2dc0c7 100644 --- a/doc/html/pcre2pattern.html +++ b/doc/html/pcre2pattern.html @@ -3147,8 +3147,7 @@

(?(VERSION>=10.4)yes|no) This pattern matches "yes" if the PCRE2 version is greater or equal to 10.4, or -"no" otherwise. The fractional part of the version number may not contain more -than two digits. +"no" otherwise. The fractional part of the version number could be ommited.

Assertion conditions @@ -4184,7 +4183,7 @@

AUTHOR

REVISION

-Last updated: 29 August 2025 +Last updated: 2 September 2025
Copyright © 1997-2024 University of Cambridge.
diff --git a/doc/html/pcre2syntax.html b/doc/html/pcre2syntax.html index 39b3a4223..6ffd3a1ee 100644 --- a/doc/html/pcre2syntax.html +++ b/doc/html/pcre2syntax.html @@ -650,22 +650,26 @@

CONDITIONAL PATTERNS

(?(condition)yes-pattern) (?(condition)yes-pattern|no-pattern) - (?(n) absolute reference condition - (?(+n) relative reference condition (PCRE2 extension) - (?(-n) relative reference condition (PCRE2 extension) - (?(<name>) named reference condition (Perl) - (?('name') named reference condition (Perl) - (?(name) named reference condition (PCRE2, deprecated) - (?(R) overall recursion condition - (?(Rn) specific numbered group recursion condition - (?(R&name) specific named group recursion condition - (?(DEFINE) define groups for reference - (?(VERSION[>]=n.m) test PCRE2 version - (?(assert) assertion condition + (?(n) absolute reference condition + (?(+n) relative reference condition (PCRE2 extension) + (?(-n) relative reference condition (PCRE2 extension) + (?(<name>) named reference condition (Perl) + (?('name') named reference condition (Perl) + (?(name) named reference condition (PCRE2, deprecated) + (?(R) overall recursion condition + (?(Rn) specific numbered group recursion condition + (?(R&name) specific named group recursion condition + (?(DEFINE) define groups for reference + (?(VERSION[>]=n[.m]) test PCRE2 version + (?(assert) assertion condition Note the ambiguity of (?(R) and (?(Rn) which might be named reference conditions or recursion tests. Such a condition is interpreted as a reference condition if the relevant named group exists. +
+
+The parts within brackets for the VERSION conditional syntax could be ommited. +The fractional part of the version number defaults to 0 in that case.

BACKTRACKING CONTROL

@@ -727,16 +731,16 @@

REPLACEMENT STRINGS

1. Backslash is an escape character, and the forms described in "ESCAPED CHARACTERS" above are recognized. Also:
-  \Q...\E   can be used to suppress interpretation
-  \l        force the next character to lower case
-  \u        force the next character to upper case
-  \L        force subsequent characters to lower case
-  \U        force subsequent characters to upper case
-  \u\L      force next character to upper case, then all lower
-  \l\U      force next character to lower case, then all upper
-  \E        end \L or \U case forcing
-  \b        backspace character (note: as in character class in pattern)
-  \v        vertical tab character (note: not the same as in a pattern)
+  \Q...\E can be used to suppress interpretation
+  \l      force the next character to lower case
+  \u      force the next character to upper case
+  \L      force subsequent characters to lower case
+  \U      force subsequent characters to upper case
+  \u\L    force next character to upper case, then all lower
+  \l\U    force next character to lower case, then all upper
+  \E      end \L or \U case forcing
+  \b      backspace character (note: as in character class in pattern)
+  \v      vertical tab character (note: not the same as in a pattern)
 
2. The Python form \g<n>, where the angle brackets are part of the syntax and n is either a group name or a number, is recognized as an alternative way @@ -767,7 +771,7 @@

AUTHOR

REVISION

-Last updated: 28 March 2025 +Last updated: 2 September 2025
Copyright © 1997-2024 University of Cambridge.
diff --git a/doc/pcre2.txt b/doc/pcre2.txt index fb4f84e15..7ec3771fe 100644 --- a/doc/pcre2.txt +++ b/doc/pcre2.txt @@ -9792,8 +9792,8 @@ CONDITIONAL GROUPS (?(VERSION>=10.4)yes|no) This pattern matches "yes" if the PCRE2 version is greater or equal to - 10.4, or "no" otherwise. The fractional part of the version number may - not contain more than two digits. + 10.4, or "no" otherwise. The fractional part of the version number + could be ommited. Assertion conditions @@ -10757,11 +10757,11 @@ AUTHOR REVISION - Last updated: 29 August 2025 + Last updated: 2 September 2025 Copyright (c) 1997-2024 University of Cambridge. -PCRE2 10.47-DEV 29 August 2025 PCRE2PATTERN(3) +PCRE2 10.47-DEV 2 September 2025 PCRE2PATTERN(3) ------------------------------------------------------------------------------ @@ -12262,23 +12262,27 @@ CONDITIONAL PATTERNS (?(condition)yes-pattern) (?(condition)yes-pattern|no-pattern) - (?(n) absolute reference condition - (?(+n) relative reference condition (PCRE2 extension) - (?(-n) relative reference condition (PCRE2 extension) - (?() named reference condition (Perl) - (?('name') named reference condition (Perl) - (?(name) named reference condition (PCRE2, deprecated) - (?(R) overall recursion condition - (?(Rn) specific numbered group recursion condition - (?(R&name) specific named group recursion condition - (?(DEFINE) define groups for reference - (?(VERSION[>]=n.m) test PCRE2 version - (?(assert) assertion condition + (?(n) absolute reference condition + (?(+n) relative reference condition (PCRE2 extension) + (?(-n) relative reference condition (PCRE2 extension) + (?() named reference condition (Perl) + (?('name') named reference condition (Perl) + (?(name) named reference condition (PCRE2, deprecated) + (?(R) overall recursion condition + (?(Rn) specific numbered group recursion condition + (?(R&name) specific named group recursion condition + (?(DEFINE) define groups for reference + (?(VERSION[>]=n[.m]) test PCRE2 version + (?(assert) assertion condition Note the ambiguity of (?(R) and (?(Rn) which might be named reference conditions or recursion tests. Such a condition is interpreted as a reference condition if the relevant named group exists. + The parts within brackets for the VERSION conditional syntax could be + ommited. The fractional part of the version number defaults to 0 in + that case. + BACKTRACKING CONTROL @@ -12342,20 +12346,19 @@ REPLACEMENT STRINGS 1. Backslash is an escape character, and the forms described in "ES- CAPED CHARACTERS" above are recognized. Also: - \Q...\E can be used to suppress interpretation - \l force the next character to lower case - \u force the next character to upper case - \L force subsequent characters to lower case - \U force subsequent characters to upper case - \u\L force next character to upper case, then all lower - \l\U force next character to lower case, then all upper - \E end \L or \U case forcing - \b backspace character (note: as in character class in pat- - tern) - \v vertical tab character (note: not the same as in a pattern) + \Q...\E can be used to suppress interpretation + \l force the next character to lower case + \u force the next character to upper case + \L force subsequent characters to lower case + \U force subsequent characters to upper case + \u\L force next character to upper case, then all lower + \l\U force next character to lower case, then all upper + \E end \L or \U case forcing + \b backspace character (note: as in character class in pattern) + \v vertical tab character (note: not the same as in a pattern) 2. The Python form \g, where the angle brackets are part of the syn- - tax and n is either a group name or a number, is recognized as an al- + tax and n is either a group name or a number, is recognized as an al- ternative way of inserting the contents of a group, for example \g<3>. 3. Capture substitution supports the following additional forms: @@ -12369,7 +12372,7 @@ REPLACEMENT STRINGS SEE ALSO - pcre2pattern(3), pcre2api(3), pcre2callout(3), pcre2matching(3), + pcre2pattern(3), pcre2api(3), pcre2callout(3), pcre2matching(3), pcre2(3). @@ -12382,11 +12385,11 @@ AUTHOR REVISION - Last updated: 28 March 2025 + Last updated: 2 September 2025 Copyright (c) 1997-2024 University of Cambridge. -PCRE2 10.47-DEV 28 March 2025 PCRE2SYNTAX(3) +PCRE2 10.47-DEV 2 September 2025 PCRE2SYNTAX(3) ------------------------------------------------------------------------------ diff --git a/doc/pcre2pattern.3 b/doc/pcre2pattern.3 index 943e3de2e..8956fa7a0 100644 --- a/doc/pcre2pattern.3 +++ b/doc/pcre2pattern.3 @@ -1,4 +1,4 @@ -.TH PCRE2PATTERN 3 "29 August 2025" "PCRE2 10.47-DEV" +.TH PCRE2PATTERN 3 "2 September 2025" "PCRE2 10.47-DEV" .SH NAME PCRE2 - Perl-compatible regular expressions (revised API) .SH "PCRE2 REGULAR EXPRESSION DETAILS" @@ -3186,8 +3186,7 @@ For example: (?(VERSION>=10.4)yes|no) .sp This pattern matches "yes" if the PCRE2 version is greater or equal to 10.4, or -"no" otherwise. The fractional part of the version number may not contain more -than two digits. +"no" otherwise. The fractional part of the version number could be ommited. . . .SS "Assertion conditions" @@ -4231,6 +4230,6 @@ Cambridge, England. .rs .sp .nf -Last updated: 29 August 2025 +Last updated: 2 September 2025 Copyright (c) 1997-2024 University of Cambridge. .fi diff --git a/doc/pcre2syntax.3 b/doc/pcre2syntax.3 index 87f92fce5..4d24f80b3 100644 --- a/doc/pcre2syntax.3 +++ b/doc/pcre2syntax.3 @@ -1,4 +1,4 @@ -.TH PCRE2SYNTAX 3 "28 March 2025" "PCRE2 10.47-DEV" +.TH PCRE2SYNTAX 3 "2 September 2025" "PCRE2 10.47-DEV" .SH NAME PCRE2 - Perl-compatible regular expressions (revised API) .SH "PCRE2 REGULAR EXPRESSION SYNTAX SUMMARY" @@ -627,22 +627,25 @@ following ways: (?(condition)yes-pattern) (?(condition)yes-pattern|no-pattern) .sp - (?(n) absolute reference condition - (?(+n) relative reference condition (PCRE2 extension) - (?(-n) relative reference condition (PCRE2 extension) - (?() named reference condition (Perl) - (?('name') named reference condition (Perl) - (?(name) named reference condition (PCRE2, deprecated) - (?(R) overall recursion condition - (?(Rn) specific numbered group recursion condition - (?(R&name) specific named group recursion condition - (?(DEFINE) define groups for reference - (?(VERSION[>]=n.m) test PCRE2 version - (?(assert) assertion condition + (?(n) absolute reference condition + (?(+n) relative reference condition (PCRE2 extension) + (?(-n) relative reference condition (PCRE2 extension) + (?() named reference condition (Perl) + (?('name') named reference condition (Perl) + (?(name) named reference condition (PCRE2, deprecated) + (?(R) overall recursion condition + (?(Rn) specific numbered group recursion condition + (?(R&name) specific named group recursion condition + (?(DEFINE) define groups for reference + (?(VERSION[>]=n[.m]) test PCRE2 version + (?(assert) assertion condition .sp Note the ambiguity of (?(R) and (?(Rn) which might be named reference conditions or recursion tests. Such a condition is interpreted as a reference condition if the relevant named group exists. +.sp +The parts within brackets for the VERSION conditional syntax could be ommited. +The fractional part of the version number defaults to 0 in that case. . . .SH "BACKTRACKING CONTROL" @@ -708,16 +711,16 @@ there is additional interpretation: 1. Backslash is an escape character, and the forms described in "ESCAPED CHARACTERS" above are recognized. Also: .sp - \eQ...\eE can be used to suppress interpretation - \el force the next character to lower case - \eu force the next character to upper case - \eL force subsequent characters to lower case - \eU force subsequent characters to upper case - \eu\eL force next character to upper case, then all lower - \el\eU force next character to lower case, then all upper - \eE end \eL or \eU case forcing - \eb backspace character (note: as in character class in pattern) - \ev vertical tab character (note: not the same as in a pattern) + \eQ...\eE can be used to suppress interpretation + \el force the next character to lower case + \eu force the next character to upper case + \eL force subsequent characters to lower case + \eU force subsequent characters to upper case + \eu\eL force next character to upper case, then all lower + \el\eU force next character to lower case, then all upper + \eE end \eL or \eU case forcing + \eb backspace character (note: as in character class in pattern) + \ev vertical tab character (note: not the same as in a pattern) .sp 2. The Python form \eg, where the angle brackets are part of the syntax and \fIn\fP is either a group name or a number, is recognized as an alternative way @@ -753,6 +756,6 @@ Cambridge, England. .rs .sp .nf -Last updated: 28 March 2025 +Last updated: 2 September 2025 Copyright (c) 1997-2024 University of Cambridge. .fi diff --git a/src/pcre2_printint_inc.h b/src/pcre2_printint_inc.h index 49319a2a5..3aae71fac 100644 --- a/src/pcre2_printint_inc.h +++ b/src/pcre2_printint_inc.h @@ -734,31 +734,22 @@ for(;;) fprintf(f, "%s", OP_names[*code]); break; - case OP_REVERSE: - if (print_lengths) fprintf(f, "%3d ", GET2(code, 1)); - else fprintf(f, " "); - fprintf(f, "%s", OP_names[*code]); - break; - - case OP_VREVERSE: - if (print_lengths) fprintf(f, "%3d %d ", GET2(code, 1), - GET2(code, 1 + IMM2_SIZE)); - else fprintf(f, " "); - fprintf(f, "%s", OP_names[*code]); - break; - case OP_CLOSE: fprintf(f, " %s %d", OP_names[*code], GET2(code, 1)); break; case OP_CREF: - fprintf(f, "%3d %s", GET2(code,1), OP_names[*code]); + case OP_REVERSE: + case OP_VREVERSE: + fprintf(f, "%3d %s", GET2(code, 1), OP_names[*code]); + if (*code == OP_VREVERSE) fprintf(f, " %d", GET2(code, 1 + IMM2_SIZE)); break; case OP_DNCREF: + case OP_DNRREF: { PCRE2_SPTR entry = nametable + (GET2(code, 1) * nesize) + IMM2_SIZE; - fprintf(f, " %s Capture ref <", flag); + fprintf(f, " %s %s<", flag, OP_names[*code]); print_custring(f, entry); fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); } @@ -767,26 +758,9 @@ for(;;) case OP_RREF: c = GET2(code, 1); if (c == RREF_ANY) - fprintf(f, " Cond recurse any"); + fprintf(f, " %s any", OP_names[*code]); else - fprintf(f, " Cond recurse %d", c); - break; - - case OP_DNRREF: - { - PCRE2_SPTR entry = nametable + (GET2(code, 1) * nesize) + IMM2_SIZE; - fprintf(f, " %s Cond recurse <", flag); - print_custring(f, entry); - fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); - } - break; - - case OP_FALSE: - fprintf(f, " Cond false"); - break; - - case OP_TRUE: - fprintf(f, " Cond true"); + fprintf(f, " %s %d", OP_names[*code], c); break; case OP_STARI: @@ -936,7 +910,7 @@ for(;;) flag = "/i"; /* Fall through */ case OP_REF: - fprintf(f, " %s \\%d", flag, GET2(code,1)); + fprintf(f, " %s \\g{%d}", flag, GET2(code, 1)); i = (*code == OP_REFI)? code[1 + IMM2_SIZE] : 0; if (i != 0) fprintf(f, " 0x%02x", i); ccode = code + OP_lengths[*code]; @@ -1104,10 +1078,6 @@ for(;;) extra += code[1]; break; - case OP_THEN: - fprintf(f, " %s", OP_names[*code]); - break; - case OP_CIRCM: case OP_DOLLM: flag = "/m"; @@ -1121,7 +1091,7 @@ for(;;) } code += OP_lengths[*code] + extra; - fprintf(f, "\n"); + putc('\n', f); } } diff --git a/testdata/testinput2 b/testdata/testinput2 index ebc0b91d1..e2612ab9f 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -6146,6 +6146,8 @@ a)"xI /(?(VERSION=10.3)b)((?<=b).*)/B +/(?(VERSION>=10.3)b)((?<=b).*)/B + /[aA]b[cC]/IB /[cc]abcd/I diff --git a/testdata/testoutput2 b/testdata/testoutput2 index 9f9658c2c..ab34890f6 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -4330,7 +4330,7 @@ Subject length lower bound = 4 Any Any Any - \1 + \g{1} bbb Recurse d @@ -10082,7 +10082,7 @@ No match Ket c Cond - Capture ref 2 + Capture dnref2 d Alt e @@ -10126,7 +10126,7 @@ No match Ket Ket Cond - Capture ref 2 + Capture dnref2 X Alt Y @@ -10173,7 +10173,7 @@ No match CBra 4 d Cond - Cond recurse 2 + Cond dnrec2 $ Alt Recurse @@ -10331,7 +10331,7 @@ No match ab CBra 2 c - \1 + \g{1} Ket d Alt @@ -10341,7 +10341,7 @@ No match ab CBra 2 c - \1 + \g{1} Ket d Alt @@ -10754,7 +10754,7 @@ Failed: error 102 at offset 3: \c at end of pattern ------------------------------------------------------------------ Bra CBra 1 - \1 + \g{1} xxx Ket Ket @@ -10766,7 +10766,7 @@ Failed: error 102 at offset 3: \c at end of pattern Bra CBra 1 a - \1 + \g{1} z Ket Ket @@ -10785,7 +10785,7 @@ Failed: error 115 at offset 12: reference to non-existent subpattern ------------------------------------------------------------------ Bra CBra 1 - \2 + \g{2} xxx Ket CBra 2 @@ -11408,7 +11408,7 @@ Matched, but too many substrings Bra Brazero Assert back - Reverse + 3 Reverse CBra 1 abc Ket @@ -11588,7 +11588,7 @@ No match ------------------------------------------------------------------ Bra CBra 1 - \1 + \g{1} xxx Ket Ket @@ -11600,7 +11600,7 @@ No match Bra CBra 1 a - \1 + \g{1} z Ket Ket @@ -13662,7 +13662,7 @@ Failed: error 144 at offset 6: subpattern name must start with a non-digit CBra 2 CBra 3 a - \2 + \g{2} Ket Alt CBra 4 @@ -13688,7 +13688,7 @@ Failed: error 144 at offset 6: subpattern name must start with a non-digit red \b Assert back - Reverse + 1 Reverse \w Ket Ket @@ -13769,7 +13769,7 @@ Failed: error 133 at offset 0: parentheses are too deeply nested (stack check) \s*+ Ket Assert back - Reverse + 1 Reverse \w Ket Ket @@ -14724,7 +14724,7 @@ Matched, but too many substrings CBra 1 Recurse CBra 2 - \1 + \g{1} Ket Ket Ket @@ -15271,7 +15271,7 @@ Subject length lower bound = 1 Recurse Recurse Alt - \1 + \g{1} Alt $ Ket @@ -15292,7 +15292,7 @@ Subject length lower bound = 1 Ket Recurse Alt - \1 + \g{1} Alt $ Ket @@ -15372,7 +15372,7 @@ Failed: error 162 at offset 10: subpattern name expected Braposzero SBraPos SCond - Cond recurse any + Cond rec any Ket KetRpos Ket @@ -15415,7 +15415,7 @@ Failed: error 106 at offset 353: missing terminating ] for character class Braposzero SBraPos SCond - Cond recurse any + Cond rec any 0 Ket KetRpos @@ -16478,7 +16478,7 @@ Failed: error 150 at offset 5: invalid range in character class abc Ket Cond - Cond recurse any + Cond rec any xyz Ket Ket @@ -17694,7 +17694,7 @@ No match ------------------------------------------------------------------ Bra Assert back - Reverse + 1 Reverse Assert Any Ket @@ -18362,7 +18362,7 @@ No match ------------------------------------------------------------------ Bra Non-atomic assert back - Reverse + 2 Reverse ab Ket Ket @@ -18537,7 +18537,7 @@ Subject length lower bound = 1 Ket CBra 2 Assert back - Reverse + 1 Reverse b Ket Any*+ @@ -18555,7 +18555,7 @@ Subject length lower bound = 1 Ket CBra 1 Assert back - Reverse + 1 Reverse b Ket Any*+ @@ -18568,12 +18568,12 @@ Subject length lower bound = 1 ------------------------------------------------------------------ Bra Cond - Cond recurse 1 + Cond rec 1 b Ket CBra 1 Assert back - Reverse + 1 Reverse b Ket Any*+ @@ -18591,7 +18591,7 @@ Subject length lower bound = 1 Ket CBra 1 Assert back - Reverse + 1 Reverse b Ket Any*+ @@ -18609,7 +18609,25 @@ Subject length lower bound = 1 Ket CBra 1 Assert back - Reverse + 1 Reverse + b + Ket + Any*+ + Ket + Ket + End +------------------------------------------------------------------ + +/(?(VERSION>=10.3)b)((?<=b).*)/B +------------------------------------------------------------------ + Bra + Cond + Cond true + b + Ket + CBra 1 + Assert back + 1 Reverse b Ket Any*+ @@ -19303,7 +19321,7 @@ No match Bra Assert back Alt - VReverse + 0 VReverse 1 b? Ket Any @@ -19339,15 +19357,15 @@ No match ------------------------------------------------------------------ Bra Assert back - Reverse + 2 Reverse xy Alt - VReverse + 2 VReverse 3 a Any b? Alt - Reverse + 2 Reverse cd Ket Ket @@ -19713,7 +19731,7 @@ No match Ket $ Ket - \2 + \g{2} Ket End ------------------------------------------------------------------ @@ -20167,7 +20185,7 @@ No match mno Ket Scan substring - Capture ref 2 + Capture dnref2 3 Capture ref 4 Capture ref Any @@ -20341,7 +20359,7 @@ No match Scan substring 2 Capture ref 1 Capture ref - Capture ref 3 + Capture dnref3 abc Ket Ket @@ -20370,10 +20388,10 @@ No match f Ket Scan substring - Capture ref 3 + Capture dnref3 5 Capture ref 4 Capture ref - Capture ref 2 + Capture dnref2 abc Ket Ket @@ -21166,7 +21184,7 @@ No match CBra 1 [a-mo-z] Ket - \1 + \g{1} Ket End ------------------------------------------------------------------ @@ -21190,7 +21208,7 @@ No match [a-mo-z] y Ket - \1 + \g{1} Ket End ------------------------------------------------------------------ @@ -21209,7 +21227,7 @@ No match Bra Bra _ - \1 + \g{1} Alt CBra 1 [a-mo-z] @@ -21217,7 +21235,7 @@ No match Ket Bra _ - \1 + \g{1} Alt CBra 1 [a-mo-z] @@ -21243,7 +21261,7 @@ No match Bra Bra _ - \1 + \g{1} Alt CBra 1 [a-mo-z] @@ -22717,7 +22735,7 @@ Failed: error 115 at offset 3: reference to non-existent subpattern ^ Recurse 2 Capture ref - \2 + \g{2} Cond Cond false CBra 1 diff --git a/testdata/testoutput5 b/testdata/testoutput5 index 6892e844e..fd36974dd 100644 --- a/testdata/testoutput5 +++ b/testdata/testoutput5 @@ -1395,7 +1395,7 @@ Partial match: X /\g{A}xxx#bXX(?'A'123) (?'A'456)/Bx,newline=any,utf ------------------------------------------------------------------ Bra - \1 + \g{1} xxx CBra 1 456 @@ -1407,7 +1407,7 @@ Partial match: X /\g{A}xxx#bх(?'A'123) (?'A'456)/Bx,newline=any,utf ------------------------------------------------------------------ Bra - \1 + \g{1} xxx CBra 1 456 @@ -4089,7 +4089,7 @@ MK: a\x{12345}b\x{09}(d)c Bra \b (ucp) Assert back - Reverse + 1 Reverse prop Xwd Ket X @@ -4892,7 +4892,7 @@ MK: ABC ------------------------------------------------------------------ Bra Assert back - Reverse + 10 Reverse abc Assert X @@ -5323,7 +5323,7 @@ No match Any Ket /i - /i \1 0x01 + /i \g{1} 0x01 /i z Ket End @@ -7209,7 +7209,7 @@ No match CBra 1 [a-mo-z] Ket - \1 + \g{1} Ket End ------------------------------------------------------------------ @@ -7233,7 +7233,7 @@ No match [a-mo-z] y Ket - \1 + \g{1} Ket End ------------------------------------------------------------------ @@ -7252,7 +7252,7 @@ No match Bra Bra _ - \1 + \g{1} Alt CBra 1 [a-mo-z] @@ -7260,7 +7260,7 @@ No match Ket Bra _ - \1 + \g{1} Alt CBra 1 [a-mo-z] @@ -7286,7 +7286,7 @@ No match Bra Bra _ - \1 + \g{1} Alt CBra 1 [a-mo-z] diff --git a/testdata/testoutput8-16-2 b/testdata/testoutput8-16-2 index 076dd5d2c..b8dba9871 100644 --- a/testdata/testoutput8-16-2 +++ b/testdata/testoutput8-16-2 @@ -247,7 +247,7 @@ Memory allocation - data size : 6 9 Any 10 Any 11 Any - 12 \1 + 12 \g{1} 14 bbb 20 2 Recurse 22 d @@ -731,7 +731,7 @@ Memory allocation - code size : 14 6 12 CBra 2 9 7 CBra 3 12 a - 14 \2 + 14 \g{2} 16 7 Ket 18 11 Alt 20 5 CBra 4 @@ -751,7 +751,7 @@ Memory allocation - code size : 14 2 12 CBra 1 5 7 Recurse 7 5 CBra 2 - 10 \1 + 10 \g{1} 12 5 Ket 14 12 Ket 16 16 Ket @@ -778,7 +778,7 @@ Memory allocation - code size : 14 6 19 Recurse 8 0 Recurse 10 4 Alt - 12 \1 + 12 \g{1} 14 3 Alt 16 $ 17 14 Ket @@ -799,7 +799,7 @@ Memory allocation - code size : 14 13 3 Ket 15 10 Recurse 17 4 Alt - 19 \1 + 19 \g{1} 21 3 Alt 23 $ 24 21 Ket @@ -822,7 +822,7 @@ Memory allocation - code size : 14 21 15 CBra 6 24 10 CBra 7 27 5 Once - 29 \1+ + 29 \g{1}+ 32 5 Ket 34 10 Ket 36 15 Ket diff --git a/testdata/testoutput8-16-4 b/testdata/testoutput8-16-4 index 1ca7532ed..f2c2d2d46 100644 --- a/testdata/testoutput8-16-4 +++ b/testdata/testoutput8-16-4 @@ -247,7 +247,7 @@ Memory allocation - data size : 6 12 Any 13 Any 14 Any - 15 \1 + 15 \g{1} 17 bbb 23 3 Recurse 26 d @@ -731,7 +731,7 @@ Memory allocation - code size : 18 8 15 CBra 2 12 8 CBra 3 16 a - 18 \2 + 18 \g{2} 20 8 Ket 23 15 Alt 26 6 CBra 4 @@ -751,7 +751,7 @@ Memory allocation - code size : 18 3 16 CBra 1 7 10 Recurse 10 6 CBra 2 - 14 \1 + 14 \g{1} 16 6 Ket 19 16 Ket 22 22 Ket @@ -778,7 +778,7 @@ Memory allocation - code size : 18 8 26 Recurse 11 0 Recurse 14 5 Alt - 17 \1 + 17 \g{1} 19 4 Alt 22 $ 23 19 Ket @@ -799,7 +799,7 @@ Memory allocation - code size : 18 18 4 Ket 21 14 Recurse 24 5 Alt - 27 \1 + 27 \g{1} 29 4 Alt 32 $ 33 29 Ket @@ -822,7 +822,7 @@ Memory allocation - code size : 18 29 20 CBra 6 33 13 CBra 7 37 6 Once - 40 \1+ + 40 \g{1}+ 43 6 Ket 46 13 Ket 49 20 Ket diff --git a/testdata/testoutput8-32-4 b/testdata/testoutput8-32-4 index fa7d1b7ff..670e55ad5 100644 --- a/testdata/testoutput8-32-4 +++ b/testdata/testoutput8-32-4 @@ -247,7 +247,7 @@ Memory allocation - data size : 12 9 Any 10 Any 11 Any - 12 \1 + 12 \g{1} 14 bbb 20 2 Recurse 22 d @@ -731,7 +731,7 @@ Memory allocation - code size : 28 6 12 CBra 2 9 7 CBra 3 12 a - 14 \2 + 14 \g{2} 16 7 Ket 18 11 Alt 20 5 CBra 4 @@ -751,7 +751,7 @@ Memory allocation - code size : 28 2 12 CBra 1 5 7 Recurse 7 5 CBra 2 - 10 \1 + 10 \g{1} 12 5 Ket 14 12 Ket 16 16 Ket @@ -778,7 +778,7 @@ Memory allocation - code size : 28 6 19 Recurse 8 0 Recurse 10 4 Alt - 12 \1 + 12 \g{1} 14 3 Alt 16 $ 17 14 Ket @@ -799,7 +799,7 @@ Memory allocation - code size : 28 13 3 Ket 15 10 Recurse 17 4 Alt - 19 \1 + 19 \g{1} 21 3 Alt 23 $ 24 21 Ket @@ -822,7 +822,7 @@ Memory allocation - code size : 28 21 15 CBra 6 24 10 CBra 7 27 5 Once - 29 \1+ + 29 \g{1}+ 32 5 Ket 34 10 Ket 36 15 Ket diff --git a/testdata/testoutput8-8-2 b/testdata/testoutput8-8-2 index 3a6f2ca27..13b976e01 100644 --- a/testdata/testoutput8-8-2 +++ b/testdata/testoutput8-8-2 @@ -247,7 +247,7 @@ Memory allocation - data size : 4 13 Any 14 Any 15 Any - 16 \1 + 16 \g{1} 19 bbb 25 3 Recurse 28 d @@ -731,7 +731,7 @@ Memory allocation - code size : 10 9 18 CBra 2 14 10 CBra 3 19 a - 21 \2 + 21 \g{2} 24 10 Ket 27 16 Alt 30 7 CBra 4 @@ -751,7 +751,7 @@ Memory allocation - code size : 10 3 19 CBra 1 8 11 Recurse 11 8 CBra 2 - 16 \1 + 16 \g{1} 19 8 Ket 22 19 Ket 25 25 Ket @@ -778,7 +778,7 @@ Memory allocation - code size : 10 9 28 Recurse 12 0 Recurse 15 6 Alt - 18 \1 + 18 \g{1} 21 4 Alt 24 $ 25 21 Ket @@ -799,7 +799,7 @@ Memory allocation - code size : 10 20 5 Ket 23 15 Recurse 26 6 Alt - 29 \1 + 29 \g{1} 32 4 Alt 35 $ 36 32 Ket @@ -822,7 +822,7 @@ Memory allocation - code size : 10 34 23 CBra 6 39 15 CBra 7 44 7 Once - 47 \1+ + 47 \g{1}+ 51 7 Ket 54 15 Ket 57 23 Ket diff --git a/testdata/testoutput8-8-3 b/testdata/testoutput8-8-3 index c7406c079..8c0abe1a2 100644 --- a/testdata/testoutput8-8-3 +++ b/testdata/testoutput8-8-3 @@ -247,7 +247,7 @@ Memory allocation - data size : 4 16 Any 17 Any 18 Any - 19 \1 + 19 \g{1} 22 bbb 28 4 Recurse 32 d @@ -731,7 +731,7 @@ Memory allocation - code size : 12 11 21 CBra 2 17 11 CBra 3 23 a - 25 \2 + 25 \g{2} 28 11 Ket 32 20 Alt 36 8 CBra 4 @@ -751,7 +751,7 @@ Memory allocation - code size : 12 4 23 CBra 1 10 14 Recurse 14 9 CBra 2 - 20 \1 + 20 \g{1} 23 9 Ket 27 23 Ket 31 31 Ket @@ -778,7 +778,7 @@ Memory allocation - code size : 12 11 35 Recurse 15 0 Recurse 19 7 Alt - 23 \1 + 23 \g{1} 26 5 Alt 30 $ 31 26 Ket @@ -799,7 +799,7 @@ Memory allocation - code size : 12 25 6 Ket 29 19 Recurse 33 7 Alt - 37 \1 + 37 \g{1} 40 5 Alt 44 $ 45 40 Ket @@ -822,7 +822,7 @@ Memory allocation - code size : 12 42 28 CBra 6 48 18 CBra 7 54 8 Once - 58 \1+ + 58 \g{1}+ 62 8 Ket 66 18 Ket 70 28 Ket diff --git a/testdata/testoutput8-8-4 b/testdata/testoutput8-8-4 index 532f9cbcb..337784596 100644 --- a/testdata/testoutput8-8-4 +++ b/testdata/testoutput8-8-4 @@ -247,7 +247,7 @@ Memory allocation - data size : 4 19 Any 20 Any 21 Any - 22 \1 + 22 \g{1} 25 bbb 31 5 Recurse 36 d @@ -731,7 +731,7 @@ Memory allocation - code size : 14 13 24 CBra 2 20 12 CBra 3 27 a - 29 \2 + 29 \g{2} 32 12 Ket 37 24 Alt 42 9 CBra 4 @@ -751,7 +751,7 @@ Memory allocation - code size : 14 5 27 CBra 1 12 17 Recurse 17 10 CBra 2 - 24 \1 + 24 \g{1} 27 10 Ket 32 27 Ket 37 37 Ket @@ -778,7 +778,7 @@ Memory allocation - code size : 14 13 42 Recurse 18 0 Recurse 23 8 Alt - 28 \1 + 28 \g{1} 31 6 Alt 36 $ 37 31 Ket @@ -799,7 +799,7 @@ Memory allocation - code size : 14 30 7 Ket 35 23 Recurse 40 8 Alt - 45 \1 + 45 \g{1} 48 6 Alt 53 $ 54 48 Ket @@ -822,7 +822,7 @@ Memory allocation - code size : 14 50 33 CBra 6 57 21 CBra 7 64 9 Once - 69 \1+ + 69 \g{1}+ 73 9 Ket 78 21 Ket 83 33 Ket