summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2015-11-14 13:22:34 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2015-11-14 13:22:34 +0000
commit718b04a5c32ce7335b15a1c1628d9fd37fad132c (patch)
tree43f696e91485b1f4747883423b4a0d8a4049a980
parentca720a4ecf24b397b11980c58ebfb5fa3738c967 (diff)
downloadpcre2-718b04a5c32ce7335b15a1c1628d9fd37fad132c.tar.gz
Run test 8 (sizes and offsets and mode-specific things) for link size 3 and 4
as well as for link size 2, with different output files in each case. git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@433 6239d852-aaf2-0410-a92c-79f79f948069
-rw-r--r--ChangeLog3
-rwxr-xr-xRunTest18
-rw-r--r--testdata/testinput829
-rw-r--r--testdata/testoutput8-16-2 (renamed from testdata/testoutput8-16)32
-rw-r--r--testdata/testoutput8-16-31026
-rw-r--r--testdata/testoutput8-16-41026
-rw-r--r--testdata/testoutput8-32-2 (renamed from testdata/testoutput8-32)31
-rw-r--r--testdata/testoutput8-32-31026
-rw-r--r--testdata/testoutput8-32-41026
-rw-r--r--testdata/testoutput8-8-2 (renamed from testdata/testoutput8-8)32
-rw-r--r--testdata/testoutput8-8-31027
-rw-r--r--testdata/testoutput8-8-41025
12 files changed, 6251 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index 32dbb3d..f46af9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -301,6 +301,9 @@ newline sequence.
89. Paranoid check in regcomp() for bad error code from pcre2_compile().
+90. Run test 8 (internal offsets and code sizes) for link sizes 3 and 4 as well
+as for link size 2.
+
Version 10.20 30-June-2015
--------------------------
diff --git a/RunTest b/RunTest
index fc3e5d7..d0903cd 100755
--- a/RunTest
+++ b/RunTest
@@ -631,22 +631,20 @@ for bmode in "$test8" "$test16" "$test32"; do
fi
# Test of internal offsets and code sizes. This test is run only when there
- # is UTF/UCP support and the link size is 2. The actual tests are
- # mostly the same as in some of the above, but in this test we inspect some
- # offsets and sizes that require a known link size. This is a doublecheck for
- # the maintainer, just in case something changes unexpectely. The output from
- # this test is different in 8-bit, 16-bit, and 32-bit modes, so there are
- # mode-specific output files.
+ # is UTF/UCP support. The actual tests are mostly the same as in some of the
+ # above, but in this test we inspect some offsets and sizes. This is a
+ # doublecheck for the maintainer, just in case something changes unexpectely.
+ # The output from this test is different in 8-bit, 16-bit, and 32-bit modes
+ # and for different link sizes, so there are different output files for each
+ # mode and link size.
if [ $do8 = yes ] ; then
echo $title8
- if [ $link_size -ne 2 ] ; then
- echo " Skipped because link size is not 2"
- elif [ $utf -eq 0 ] ; then
+ if [ $utf -eq 0 ] ; then
echo " Skipped because UTF-$bits support is not available"
else
$sim $valgrind ./pcre2test -q $defaultstack $bmode $testdata/testinput8 testtry
- checkresult $? 8-$bits ""
+ checkresult $? 8-$bits-$link_size ""
fi
fi
diff --git a/testdata/testinput8 b/testdata/testinput8
index 8a74f9e..ca3b1b9 100644
--- a/testdata/testinput8
+++ b/testdata/testinput8
@@ -1,9 +1,11 @@
-# These are a few representative patterns whose lengths and offsets are to be
-# shown when the link size is 2. This is just a doublecheck test to ensure the
-# sizes don't go horribly wrong when something is changed. The pattern contents
-# are all themselves checked in other tests. Unicode, including property
-# support, is required for these tests. There are separate output files for
-# each code unit size.
+# There are two sorts of patterns in this test. A number of them are
+# representative patterns whose lengths and offsets are checked. This is just a
+# doublecheck test to ensure the sizes don't go horribly wrong when something
+# is changed. The operation of these patterns is checked in other tests.
+#
+# This file also contains tests whose output varies with code unit size and/or
+# link size. Unicode support is required for these tests. There are separate
+# output files for each code unit size and link size.
#pattern fullbincode,memory
@@ -68,7 +70,7 @@
/\xff/utf
/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
-
+
/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
/\x{65e5}\x{672c}\x{8a9e}/I,utf
@@ -151,20 +153,27 @@
# Check the absolute limit on nesting (?| etc. This varies with code unit
# width because the workspace is a different number of bytes. It will fail
-# in 8-bit and 16-bit but not in 32-bit.
-
+# with link size 2 in 8-bit and 16-bit but not in 32-bit.
+
/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
/parens_nest_limit=1000,-fullbincode
# Use "expand" to create some very long patterns with nested parentheses, in
# order to test workspace overflow. Again, this varies with code unit width,
-# and even with it fails in two modes, the error offset differs.
+# and even with it fails in two modes, the error offset differs. It also varies
+# with link size - hence multiple tests with different values.
/(?'ABC'\[[bar](]{105}*THEN:\[A]{255}\[)]{106}/expand,-fullbincode
/(?'ABC'\[[bar](]{106}*THEN:\[A]{255}\[)]{107}/expand,-fullbincode
+/(?'ABC'\[[bar](]{159}*THEN:\[A]{255}\[)]{160}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{199}*THEN:\[A]{255}\[)]{200}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{299}*THEN:\[A]{255}\[)]{300}/expand,-fullbincode
+
/(?(1)(?1)){8,}+()/debug
abcd
diff --git a/testdata/testoutput8-16 b/testdata/testoutput8-16-2
index 4df774f..05669bb 100644
--- a/testdata/testoutput8-16
+++ b/testdata/testoutput8-16-2
@@ -1,9 +1,11 @@
-# These are a few representative patterns whose lengths and offsets are to be
-# shown when the link size is 2. This is just a doublecheck test to ensure the
-# sizes don't go horribly wrong when something is changed. The pattern contents
-# are all themselves checked in other tests. Unicode, including property
-# support, is required for these tests. There are separate output files for
-# each code unit size.
+# There are two sorts of patterns in this test. A number of them are
+# representative patterns whose lengths and offsets are checked. This is just a
+# doublecheck test to ensure the sizes don't go horribly wrong when something
+# is changed. The operation of these patterns is checked in other tests.
+#
+# This file also contains tests whose output varies with code unit size and/or
+# link size. Unicode support is required for these tests. There are separate
+# output files for each code unit size and link size.
#pattern fullbincode,memory
@@ -379,7 +381,7 @@ Options: utf
First code unit = 'A'
Last code unit = '.'
Subject length lower bound = 4
-
+
/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
Memory allocation (code space): 22
------------------------------------------------------------------
@@ -843,8 +845,8 @@ Memory allocation (code space): 14
# Check the absolute limit on nesting (?| etc. This varies with code unit
# width because the workspace is a different number of bytes. It will fail
-# in 8-bit and 16-bit but not in 32-bit.
-
+# with link size 2 in 8-bit and 16-bit but not in 32-bit.
+
/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
/parens_nest_limit=1000,-fullbincode
@@ -852,7 +854,8 @@ Failed: error 184 at offset 1540: (?| and/or (?J: or (?x: parentheses are too de
# Use "expand" to create some very long patterns with nested parentheses, in
# order to test workspace overflow. Again, this varies with code unit width,
-# and even with it fails in two modes, the error offset differs.
+# and even with it fails in two modes, the error offset differs. It also varies
+# with link size - hence multiple tests with different values.
/(?'ABC'\[[bar](]{105}*THEN:\[A]{255}\[)]{106}/expand,-fullbincode
Failed: error 186 at offset 594: regular expression is too complicated
@@ -860,6 +863,15 @@ Failed: error 186 at offset 594: regular expression is too complicated
/(?'ABC'\[[bar](]{106}*THEN:\[A]{255}\[)]{107}/expand,-fullbincode
Failed: error 186 at offset 594: regular expression is too complicated
+/(?'ABC'\[[bar](]{159}*THEN:\[A]{255}\[)]{160}/expand,-fullbincode
+Failed: error 186 at offset 594: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{199}*THEN:\[A]{255}\[)]{200}/expand,-fullbincode
+Failed: error 186 at offset 594: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{299}*THEN:\[A]{255}\[)]{300}/expand,-fullbincode
+Failed: error 186 at offset 594: regular expression is too complicated
+
/(?(1)(?1)){8,}+()/debug
------------------------------------------------------------------
0 79 Bra
diff --git a/testdata/testoutput8-16-3 b/testdata/testoutput8-16-3
new file mode 100644
index 0000000..31884e1
--- /dev/null
+++ b/testdata/testoutput8-16-3
@@ -0,0 +1,1026 @@
+# There are two sorts of patterns in this test. A number of them are
+# representative patterns whose lengths and offsets are checked. This is just a
+# doublecheck test to ensure the sizes don't go horribly wrong when something
+# is changed. The operation of these patterns is checked in other tests.
+#
+# This file also contains tests whose output varies with code unit size and/or
+# link size. Unicode support is required for these tests. There are separate
+# output files for each code unit size and link size.
+
+#pattern fullbincode,memory
+
+/((?i)b)/
+Memory allocation (code space): 32
+------------------------------------------------------------------
+ 0 12 Bra
+ 3 6 CBra 1
+ 7 /i b
+ 9 6 Ket
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+
+/(?s)(.*X|^B)/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 20 Bra
+ 3 8 CBra 1
+ 7 AllAny*
+ 9 X
+ 11 6 Alt
+ 14 ^
+ 15 B
+ 17 14 Ket
+ 20 20 Ket
+ 23 End
+------------------------------------------------------------------
+
+/(?s:.*X|^B)/
+Memory allocation (code space): 46
+------------------------------------------------------------------
+ 0 19 Bra
+ 3 7 Bra
+ 6 AllAny*
+ 8 X
+ 10 6 Alt
+ 13 ^
+ 14 B
+ 16 13 Ket
+ 19 19 Ket
+ 22 End
+------------------------------------------------------------------
+
+/^[[:alnum:]]/
+Memory allocation (code space): 50
+------------------------------------------------------------------
+ 0 21 Bra
+ 3 ^
+ 4 [0-9A-Za-z]
+ 21 21 Ket
+ 24 End
+------------------------------------------------------------------
+
+/#/Ix
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 3 Bra
+ 3 3 Ket
+ 6 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+May match empty string
+Options: extended
+Subject length lower bound = 0
+
+/a#/Ix
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 a
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: extended
+First code unit = 'a'
+Subject length lower bound = 1
+
+/x?+/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 x?+
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/x++/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 x++
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/x{1,3}+/
+Memory allocation (code space): 24
+------------------------------------------------------------------
+ 0 8 Bra
+ 3 x
+ 5 x{0,2}+
+ 8 8 Ket
+ 11 End
+------------------------------------------------------------------
+
+/(x)*+/
+Memory allocation (code space): 34
+------------------------------------------------------------------
+ 0 13 Bra
+ 3 Braposzero
+ 4 6 CBraPos 1
+ 8 x
+ 10 6 KetRpos
+ 13 13 Ket
+ 16 End
+------------------------------------------------------------------
+
+/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
+Memory allocation (code space): 166
+------------------------------------------------------------------
+ 0 79 Bra
+ 3 ^
+ 4 72 CBra 1
+ 8 6 CBra 2
+ 12 a+
+ 14 6 Ket
+ 17 22 CBra 3
+ 21 [ab]+?
+ 39 22 Ket
+ 42 22 CBra 4
+ 46 [bc]+
+ 64 22 Ket
+ 67 6 CBra 5
+ 71 \w*+
+ 73 6 Ket
+ 76 72 Ket
+ 79 79 Ket
+ 82 End
+------------------------------------------------------------------
+
+"8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 1652
+------------------------------------------------------------------
+ 0 822 Bra
+ 3 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+821 \b
+822 822 Ket
+825 End
+------------------------------------------------------------------
+
+"\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 1632
+------------------------------------------------------------------
+ 0 812 Bra
+ 3 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+811 \b
+812 812 Ket
+815 End
+------------------------------------------------------------------
+
+/(a(?1)b)/
+Memory allocation (code space): 42
+------------------------------------------------------------------
+ 0 17 Bra
+ 3 11 CBra 1
+ 7 a
+ 9 3 Recurse
+ 12 b
+ 14 11 Ket
+ 17 17 Ket
+ 20 End
+------------------------------------------------------------------
+
+/(a(?1)+b)/
+Memory allocation (code space): 54
+------------------------------------------------------------------
+ 0 23 Bra
+ 3 17 CBra 1
+ 7 a
+ 9 6 Once
+ 12 3 Recurse
+ 15 6 KetRmax
+ 18 b
+ 20 17 Ket
+ 23 23 Ket
+ 26 End
+------------------------------------------------------------------
+
+/a(?P<name1>b|c)d(?P<longername2>e)/
+Memory allocation (code space): 68
+------------------------------------------------------------------
+ 0 30 Bra
+ 3 a
+ 5 6 CBra 1
+ 9 b
+ 11 5 Alt
+ 14 c
+ 16 11 Ket
+ 19 d
+ 21 6 CBra 2
+ 25 e
+ 27 6 Ket
+ 30 30 Ket
+ 33 End
+------------------------------------------------------------------
+
+/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/
+Memory allocation (code space): 84
+------------------------------------------------------------------
+ 0 38 Bra
+ 3 23 Bra
+ 6 a
+ 8 15 CBra 1
+ 12 c
+ 14 6 CBra 2
+ 18 d
+ 20 6 Ket
+ 23 15 Ket
+ 26 23 Ket
+ 29 6 CBra 3
+ 33 a
+ 35 6 Ket
+ 38 38 Ket
+ 41 End
+------------------------------------------------------------------
+
+/(?P<a>a)...(?P=a)bbb(?P>a)d/
+Memory allocation (code space): 64
+------------------------------------------------------------------
+ 0 28 Bra
+ 3 6 CBra 1
+ 7 a
+ 9 6 Ket
+ 12 Any
+ 13 Any
+ 14 Any
+ 15 \1
+ 17 bbb
+ 23 3 Recurse
+ 26 d
+ 28 28 Ket
+ 31 End
+------------------------------------------------------------------
+
+/abc(?C255)de(?C)f/
+Memory allocation (code space): 62
+------------------------------------------------------------------
+ 0 27 Bra
+ 3 abc
+ 9 Callout 255 10 1
+ 15 de
+ 19 Callout 0 16 1
+ 25 f
+ 27 27 Ket
+ 30 End
+------------------------------------------------------------------
+
+/abcde/auto_callout
+Memory allocation (code space): 106
+------------------------------------------------------------------
+ 0 49 Bra
+ 3 Callout 255 0 1
+ 9 a
+ 11 Callout 255 1 1
+ 17 b
+ 19 Callout 255 2 1
+ 25 c
+ 27 Callout 255 3 1
+ 33 d
+ 35 Callout 255 4 1
+ 41 e
+ 43 Callout 255 5 0
+ 49 49 Ket
+ 52 End
+------------------------------------------------------------------
+
+/\x{100}/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{100}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/\x{1000}/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{1000}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/\x{10000}/utf
+Memory allocation (code space): 20
+------------------------------------------------------------------
+ 0 6 Bra
+ 3 \x{10000}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+
+/\x{100000}/utf
+Memory allocation (code space): 20
+------------------------------------------------------------------
+ 0 6 Bra
+ 3 \x{100000}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+
+/\x{10ffff}/utf
+Memory allocation (code space): 20
+------------------------------------------------------------------
+ 0 6 Bra
+ 3 \x{10ffff}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+
+/\x{110000}/utf
+Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
+
+/[\x{ff}]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{ff}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[\x{100}]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{100}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/\x80/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{80}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/\xff/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{ff}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 A\x{2262}\x{391}.
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = 'A'
+Last code unit = '.'
+Subject length lower bound = 4
+
+/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
+Memory allocation (code space): 26
+------------------------------------------------------------------
+ 0 9 Bra
+ 3 \x{d55c}\x{ad6d}\x{c5b4}
+ 9 9 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \x{d55c}
+Last code unit = \x{c5b4}
+Subject length lower bound = 3
+
+/\x{65e5}\x{672c}\x{8a9e}/I,utf
+Memory allocation (code space): 26
+------------------------------------------------------------------
+ 0 9 Bra
+ 3 \x{65e5}\x{672c}\x{8a9e}
+ 9 9 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \x{65e5}
+Last code unit = \x{8a9e}
+Subject length lower bound = 3
+
+/[\x{100}]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{100}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[Z\x{100}]/utf
+Memory allocation (code space): 60
+------------------------------------------------------------------
+ 0 26 Bra
+ 3 [Z\x{100}]
+ 26 26 Ket
+ 29 End
+------------------------------------------------------------------
+
+/^[\x{100}\E-\Q\E\x{150}]/utf
+Memory allocation (code space): 32
+------------------------------------------------------------------
+ 0 12 Bra
+ 3 ^
+ 4 [\x{100}-\x{150}]
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E]/utf
+Memory allocation (code space): 32
+------------------------------------------------------------------
+ 0 12 Bra
+ 3 ^
+ 4 [\x{100}-\x{150}]
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E/utf
+Failed: error 106 at offset 13: missing terminating ] for character class
+
+/[\p{L}]/
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\p{L}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[\p{^L}]/
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\P{L}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[\P{L}]/
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\P{L}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[\P{^L}]/
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\p{L}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[abc\p{L}\x{0660}]/utf
+Memory allocation (code space): 66
+------------------------------------------------------------------
+ 0 29 Bra
+ 3 [a-c\p{L}\x{660}]
+ 29 29 Ket
+ 32 End
+------------------------------------------------------------------
+
+/[\p{Nd}]/utf
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\p{Nd}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[\p{Nd}+-]+/utf
+Memory allocation (code space): 64
+------------------------------------------------------------------
+ 0 28 Bra
+ 3 [+\-\p{Nd}]++
+ 28 28 Ket
+ 31 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
+Memory allocation (code space): 36
+------------------------------------------------------------------
+ 0 14 Bra
+ 3 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 14 14 Ket
+ 17 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
+Memory allocation (code space): 36
+------------------------------------------------------------------
+ 0 14 Bra
+ 3 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 14 14 Ket
+ 17 End
+------------------------------------------------------------------
+
+/[\x{105}-\x{109}]/i,utf
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\x{104}-\x{109}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/( ( (?(1)0|) )* )/x
+Memory allocation (code space): 70
+------------------------------------------------------------------
+ 0 31 Bra
+ 3 25 CBra 1
+ 7 Brazero
+ 8 17 SCBra 2
+ 12 7 Cond
+ 15 1 Cond ref
+ 17 0
+ 19 3 Alt
+ 22 10 Ket
+ 25 17 KetRmax
+ 28 25 Ket
+ 31 31 Ket
+ 34 End
+------------------------------------------------------------------
+
+/( (?(1)0|)* )/x
+Memory allocation (code space): 56
+------------------------------------------------------------------
+ 0 24 Bra
+ 3 18 CBra 1
+ 7 Brazero
+ 8 7 SCond
+ 11 1 Cond ref
+ 13 0
+ 15 3 Alt
+ 18 10 KetRmax
+ 21 18 Ket
+ 24 24 Ket
+ 27 End
+------------------------------------------------------------------
+
+/[a]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 a
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[a]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 a
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[\xaa]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{aa}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[\xaa]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{aa}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[^a]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 [^a]
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[^a]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 [^a]
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[^\xaa]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 [^\x{aa}]
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[^\xaa]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 [^\x{aa}]
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+#pattern -memory
+
+/[^\d]/utf,ucp
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [^\p{Nd}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[[:^alpha:][:^cntrl:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 15 Bra
+ 3 [\P{L}\P{Cc}]++
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+
+/[[:^cntrl:][:^alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 15 Bra
+ 3 [\P{Cc}\P{L}]++
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+
+/[[:alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 12 Bra
+ 3 [\p{L}]++
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+
+/[[:^alpha:]\S]+/utf,ucp
+------------------------------------------------------------------
+ 0 15 Bra
+ 3 [\P{L}\P{Xsp}]++
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/
+------------------------------------------------------------------
+ 0 70 Bra
+ 3 abc
+ 9 6 CBra 1
+ 13 d
+ 15 5 Alt
+ 18 e
+ 20 11 Ket
+ 23 *THEN
+ 24 x
+ 26 13 CBra 2
+ 30 123
+ 36 *THEN
+ 37 4
+ 39 28 Alt
+ 42 567
+ 48 6 CBra 3
+ 52 b
+ 54 5 Alt
+ 57 q
+ 59 11 Ket
+ 62 *THEN
+ 63 xx
+ 67 41 Ket
+ 70 70 Ket
+ 73 End
+------------------------------------------------------------------
+
+/(((a\2)|(a*)\g<-1>))*a?/
+------------------------------------------------------------------
+ 0 52 Bra
+ 3 Brazero
+ 4 43 SCBra 1
+ 8 36 Once
+ 11 15 CBra 2
+ 15 8 CBra 3
+ 19 a
+ 21 \2
+ 23 8 Ket
+ 26 15 Alt
+ 29 6 CBra 4
+ 33 a*
+ 35 6 Ket
+ 38 29 Recurse
+ 41 30 Ket
+ 44 36 Ket
+ 47 43 KetRmax
+ 50 a?+
+ 52 52 Ket
+ 55 End
+------------------------------------------------------------------
+
+/((?+1)(\1))/
+------------------------------------------------------------------
+ 0 28 Bra
+ 3 22 Once
+ 6 16 CBra 1
+ 10 13 Recurse
+ 13 6 CBra 2
+ 17 \1
+ 19 6 Ket
+ 22 16 Ket
+ 25 22 Ket
+ 28 28 Ket
+ 31 End
+------------------------------------------------------------------
+
+"(?1)(?#?'){2}(a)"
+------------------------------------------------------------------
+ 0 30 Bra
+ 3 6 Once
+ 6 21 Recurse
+ 9 6 Ket
+ 12 6 Once
+ 15 21 Recurse
+ 18 6 Ket
+ 21 6 CBra 1
+ 25 a
+ 27 6 Ket
+ 30 30 Ket
+ 33 End
+------------------------------------------------------------------
+
+/.((?2)(?R)|\1|$)()/
+------------------------------------------------------------------
+ 0 39 Bra
+ 3 Any
+ 4 25 Once
+ 7 10 CBra 1
+ 11 32 Recurse
+ 14 0 Recurse
+ 17 5 Alt
+ 20 \1
+ 22 4 Alt
+ 25 $
+ 26 19 Ket
+ 29 25 Ket
+ 32 4 CBra 2
+ 36 4 Ket
+ 39 39 Ket
+ 42 End
+------------------------------------------------------------------
+
+/.((?3)(?R)()(?2)|\1|$)()/
+------------------------------------------------------------------
+ 0 49 Bra
+ 3 Any
+ 4 35 Once
+ 7 20 CBra 1
+ 11 42 Recurse
+ 14 0 Recurse
+ 17 4 CBra 2
+ 21 4 Ket
+ 24 17 Recurse
+ 27 5 Alt
+ 30 \1
+ 32 4 Alt
+ 35 $
+ 36 29 Ket
+ 39 35 Ket
+ 42 4 CBra 3
+ 46 4 Ket
+ 49 49 Ket
+ 52 End
+------------------------------------------------------------------
+
+/(?1)()((((((\1++))\x85)+)|))/
+------------------------------------------------------------------
+ 0 69 Bra
+ 3 6 Recurse
+ 6 4 CBra 1
+ 10 4 Ket
+ 13 53 CBra 2
+ 17 43 CBra 3
+ 21 36 CBra 4
+ 25 29 CBra 5
+ 29 20 CBra 6
+ 33 13 CBra 7
+ 37 6 Once
+ 40 \1+
+ 43 6 Ket
+ 46 13 Ket
+ 49 20 Ket
+ 52 \x{85}
+ 54 29 KetRmax
+ 57 36 Ket
+ 60 3 Alt
+ 63 46 Ket
+ 66 53 Ket
+ 69 69 Ket
+ 72 End
+------------------------------------------------------------------
+
+# Check the absolute limit on nesting (?| etc. This varies with code unit
+# width because the workspace is a different number of bytes. It will fail
+# with link size 2 in 8-bit and 16-bit but not in 32-bit.
+
+/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+/parens_nest_limit=1000,-fullbincode
+
+# Use "expand" to create some very long patterns with nested parentheses, in
+# order to test workspace overflow. Again, this varies with code unit width,
+# and even with it fails in two modes, the error offset differs. It also varies
+# with link size - hence multiple tests with different values.
+
+/(?'ABC'\[[bar](]{105}*THEN:\[A]{255}\[)]{106}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{106}*THEN:\[A]{255}\[)]{107}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{159}*THEN:\[A]{255}\[)]{160}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{199}*THEN:\[A]{255}\[)]{200}/expand,-fullbincode
+Failed: error 186 at offset 1147: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{299}*THEN:\[A]{255}\[)]{300}/expand,-fullbincode
+Failed: error 186 at offset 1147: regular expression is too complicated
+
+/(?(1)(?1)){8,}+()/debug
+------------------------------------------------------------------
+ 0 110 Bra
+ 3 97 Once
+ 6 8 Cond
+ 9 1 Cond ref
+ 11 103 Recurse
+ 14 8 Ket
+ 17 8 Cond
+ 20 1 Cond ref
+ 22 103 Recurse
+ 25 8 Ket
+ 28 8 Cond
+ 31 1 Cond ref
+ 33 103 Recurse
+ 36 8 Ket
+ 39 8 Cond
+ 42 1 Cond ref
+ 44 103 Recurse
+ 47 8 Ket
+ 50 8 Cond
+ 53 1 Cond ref
+ 55 103 Recurse
+ 58 8 Ket
+ 61 8 Cond
+ 64 1 Cond ref
+ 66 103 Recurse
+ 69 8 Ket
+ 72 8 Cond
+ 75 1 Cond ref
+ 77 103 Recurse
+ 80 8 Ket
+ 83 14 SBraPos
+ 86 8 SCond
+ 89 1 Cond ref
+ 91 103 Recurse
+ 94 8 Ket
+ 97 14 KetRpos
+100 97 Ket
+103 4 CBra 1
+107 4 Ket
+110 110 Ket
+113 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcd
+ 0:
+ 1:
+
+/(?(1)|a(?1)b){2,}+()/debug
+------------------------------------------------------------------
+ 0 58 Bra
+ 3 45 Once
+ 6 5 Cond
+ 9 1 Cond ref
+ 11 10 Alt
+ 14 a
+ 16 51 Recurse
+ 19 b
+ 21 15 Ket
+ 24 21 SBraPos
+ 27 5 SCond
+ 30 1 Cond ref
+ 32 10 Alt
+ 35 a
+ 37 51 Recurse
+ 40 b
+ 42 15 Ket
+ 45 21 KetRpos
+ 48 45 Ket
+ 51 4 CBra 1
+ 55 4 Ket
+ 58 58 Ket
+ 61 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcde
+No match
+
+/((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
+------------------------------------------------------------------
+ 0 194 Bra
+ 3 61 CBra 1
+ 7 3 Recurse
+ 10 131 Recurse
+ 13 138 Recurse
+ 16 145 Recurse
+ 19 152 Recurse
+ 22 159 Recurse
+ 25 166 Recurse
+ 28 173 Recurse
+ 31 180 Recurse
+ 34 180 Recurse
+ 37 173 Recurse
+ 40 166 Recurse
+ 43 159 Recurse
+ 46 152 Recurse
+ 49 145 Recurse
+ 52 138 Recurse
+ 55 131 Recurse
+ 58 3 Recurse
+ 61 0 Recurse
+ 64 61 Ket
+ 67 61 SCBra 1
+ 71 3 Recurse
+ 74 131 Recurse
+ 77 138 Recurse
+ 80 145 Recurse
+ 83 152 Recurse
+ 86 159 Recurse
+ 89 166 Recurse
+ 92 173 Recurse
+ 95 180 Recurse
+ 98 180 Recurse
+101 173 Recurse
+104 166 Recurse
+107 159 Recurse
+110 152 Recurse
+113 145 Recurse
+116 138 Recurse
+119 131 Recurse
+122 3 Recurse
+125 0 Recurse
+128 61 KetRmax
+131 4 CBra 2
+135 4 Ket
+138 4 CBra 3
+142 4 Ket
+145 4 CBra 4
+149 4 Ket
+152 4 CBra 5
+156 4 Ket
+159 4 CBra 6
+163 4 Ket
+166 4 CBra 7
+170 4 Ket
+173 4 CBra 8
+177 4 Ket
+180 4 CBra 9
+184 4 Ket
+187 4 CBra 10
+191 4 Ket
+194 194 Ket
+197 End
+------------------------------------------------------------------
+Capturing subpattern count = 10
+May match empty string
+Subject length lower bound = 0
+
+# End of testinput8
diff --git a/testdata/testoutput8-16-4 b/testdata/testoutput8-16-4
new file mode 100644
index 0000000..31884e1
--- /dev/null
+++ b/testdata/testoutput8-16-4
@@ -0,0 +1,1026 @@
+# There are two sorts of patterns in this test. A number of them are
+# representative patterns whose lengths and offsets are checked. This is just a
+# doublecheck test to ensure the sizes don't go horribly wrong when something
+# is changed. The operation of these patterns is checked in other tests.
+#
+# This file also contains tests whose output varies with code unit size and/or
+# link size. Unicode support is required for these tests. There are separate
+# output files for each code unit size and link size.
+
+#pattern fullbincode,memory
+
+/((?i)b)/
+Memory allocation (code space): 32
+------------------------------------------------------------------
+ 0 12 Bra
+ 3 6 CBra 1
+ 7 /i b
+ 9 6 Ket
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+
+/(?s)(.*X|^B)/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 20 Bra
+ 3 8 CBra 1
+ 7 AllAny*
+ 9 X
+ 11 6 Alt
+ 14 ^
+ 15 B
+ 17 14 Ket
+ 20 20 Ket
+ 23 End
+------------------------------------------------------------------
+
+/(?s:.*X|^B)/
+Memory allocation (code space): 46
+------------------------------------------------------------------
+ 0 19 Bra
+ 3 7 Bra
+ 6 AllAny*
+ 8 X
+ 10 6 Alt
+ 13 ^
+ 14 B
+ 16 13 Ket
+ 19 19 Ket
+ 22 End
+------------------------------------------------------------------
+
+/^[[:alnum:]]/
+Memory allocation (code space): 50
+------------------------------------------------------------------
+ 0 21 Bra
+ 3 ^
+ 4 [0-9A-Za-z]
+ 21 21 Ket
+ 24 End
+------------------------------------------------------------------
+
+/#/Ix
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 3 Bra
+ 3 3 Ket
+ 6 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+May match empty string
+Options: extended
+Subject length lower bound = 0
+
+/a#/Ix
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 a
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: extended
+First code unit = 'a'
+Subject length lower bound = 1
+
+/x?+/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 x?+
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/x++/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 x++
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/x{1,3}+/
+Memory allocation (code space): 24
+------------------------------------------------------------------
+ 0 8 Bra
+ 3 x
+ 5 x{0,2}+
+ 8 8 Ket
+ 11 End
+------------------------------------------------------------------
+
+/(x)*+/
+Memory allocation (code space): 34
+------------------------------------------------------------------
+ 0 13 Bra
+ 3 Braposzero
+ 4 6 CBraPos 1
+ 8 x
+ 10 6 KetRpos
+ 13 13 Ket
+ 16 End
+------------------------------------------------------------------
+
+/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
+Memory allocation (code space): 166
+------------------------------------------------------------------
+ 0 79 Bra
+ 3 ^
+ 4 72 CBra 1
+ 8 6 CBra 2
+ 12 a+
+ 14 6 Ket
+ 17 22 CBra 3
+ 21 [ab]+?
+ 39 22 Ket
+ 42 22 CBra 4
+ 46 [bc]+
+ 64 22 Ket
+ 67 6 CBra 5
+ 71 \w*+
+ 73 6 Ket
+ 76 72 Ket
+ 79 79 Ket
+ 82 End
+------------------------------------------------------------------
+
+"8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 1652
+------------------------------------------------------------------
+ 0 822 Bra
+ 3 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+821 \b
+822 822 Ket
+825 End
+------------------------------------------------------------------
+
+"\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 1632
+------------------------------------------------------------------
+ 0 812 Bra
+ 3 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+811 \b
+812 812 Ket
+815 End
+------------------------------------------------------------------
+
+/(a(?1)b)/
+Memory allocation (code space): 42
+------------------------------------------------------------------
+ 0 17 Bra
+ 3 11 CBra 1
+ 7 a
+ 9 3 Recurse
+ 12 b
+ 14 11 Ket
+ 17 17 Ket
+ 20 End
+------------------------------------------------------------------
+
+/(a(?1)+b)/
+Memory allocation (code space): 54
+------------------------------------------------------------------
+ 0 23 Bra
+ 3 17 CBra 1
+ 7 a
+ 9 6 Once
+ 12 3 Recurse
+ 15 6 KetRmax
+ 18 b
+ 20 17 Ket
+ 23 23 Ket
+ 26 End
+------------------------------------------------------------------
+
+/a(?P<name1>b|c)d(?P<longername2>e)/
+Memory allocation (code space): 68
+------------------------------------------------------------------
+ 0 30 Bra
+ 3 a
+ 5 6 CBra 1
+ 9 b
+ 11 5 Alt
+ 14 c
+ 16 11 Ket
+ 19 d
+ 21 6 CBra 2
+ 25 e
+ 27 6 Ket
+ 30 30 Ket
+ 33 End
+------------------------------------------------------------------
+
+/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/
+Memory allocation (code space): 84
+------------------------------------------------------------------
+ 0 38 Bra
+ 3 23 Bra
+ 6 a
+ 8 15 CBra 1
+ 12 c
+ 14 6 CBra 2
+ 18 d
+ 20 6 Ket
+ 23 15 Ket
+ 26 23 Ket
+ 29 6 CBra 3
+ 33 a
+ 35 6 Ket
+ 38 38 Ket
+ 41 End
+------------------------------------------------------------------
+
+/(?P<a>a)...(?P=a)bbb(?P>a)d/
+Memory allocation (code space): 64
+------------------------------------------------------------------
+ 0 28 Bra
+ 3 6 CBra 1
+ 7 a
+ 9 6 Ket
+ 12 Any
+ 13 Any
+ 14 Any
+ 15 \1
+ 17 bbb
+ 23 3 Recurse
+ 26 d
+ 28 28 Ket
+ 31 End
+------------------------------------------------------------------
+
+/abc(?C255)de(?C)f/
+Memory allocation (code space): 62
+------------------------------------------------------------------
+ 0 27 Bra
+ 3 abc
+ 9 Callout 255 10 1
+ 15 de
+ 19 Callout 0 16 1
+ 25 f
+ 27 27 Ket
+ 30 End
+------------------------------------------------------------------
+
+/abcde/auto_callout
+Memory allocation (code space): 106
+------------------------------------------------------------------
+ 0 49 Bra
+ 3 Callout 255 0 1
+ 9 a
+ 11 Callout 255 1 1
+ 17 b
+ 19 Callout 255 2 1
+ 25 c
+ 27 Callout 255 3 1
+ 33 d
+ 35 Callout 255 4 1
+ 41 e
+ 43 Callout 255 5 0
+ 49 49 Ket
+ 52 End
+------------------------------------------------------------------
+
+/\x{100}/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{100}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/\x{1000}/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{1000}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/\x{10000}/utf
+Memory allocation (code space): 20
+------------------------------------------------------------------
+ 0 6 Bra
+ 3 \x{10000}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+
+/\x{100000}/utf
+Memory allocation (code space): 20
+------------------------------------------------------------------
+ 0 6 Bra
+ 3 \x{100000}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+
+/\x{10ffff}/utf
+Memory allocation (code space): 20
+------------------------------------------------------------------
+ 0 6 Bra
+ 3 \x{10ffff}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+
+/\x{110000}/utf
+Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
+
+/[\x{ff}]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{ff}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[\x{100}]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{100}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/\x80/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{80}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/\xff/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{ff}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 A\x{2262}\x{391}.
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = 'A'
+Last code unit = '.'
+Subject length lower bound = 4
+
+/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
+Memory allocation (code space): 26
+------------------------------------------------------------------
+ 0 9 Bra
+ 3 \x{d55c}\x{ad6d}\x{c5b4}
+ 9 9 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \x{d55c}
+Last code unit = \x{c5b4}
+Subject length lower bound = 3
+
+/\x{65e5}\x{672c}\x{8a9e}/I,utf
+Memory allocation (code space): 26
+------------------------------------------------------------------
+ 0 9 Bra
+ 3 \x{65e5}\x{672c}\x{8a9e}
+ 9 9 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \x{65e5}
+Last code unit = \x{8a9e}
+Subject length lower bound = 3
+
+/[\x{100}]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{100}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[Z\x{100}]/utf
+Memory allocation (code space): 60
+------------------------------------------------------------------
+ 0 26 Bra
+ 3 [Z\x{100}]
+ 26 26 Ket
+ 29 End
+------------------------------------------------------------------
+
+/^[\x{100}\E-\Q\E\x{150}]/utf
+Memory allocation (code space): 32
+------------------------------------------------------------------
+ 0 12 Bra
+ 3 ^
+ 4 [\x{100}-\x{150}]
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E]/utf
+Memory allocation (code space): 32
+------------------------------------------------------------------
+ 0 12 Bra
+ 3 ^
+ 4 [\x{100}-\x{150}]
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E/utf
+Failed: error 106 at offset 13: missing terminating ] for character class
+
+/[\p{L}]/
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\p{L}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[\p{^L}]/
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\P{L}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[\P{L}]/
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\P{L}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[\P{^L}]/
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\p{L}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[abc\p{L}\x{0660}]/utf
+Memory allocation (code space): 66
+------------------------------------------------------------------
+ 0 29 Bra
+ 3 [a-c\p{L}\x{660}]
+ 29 29 Ket
+ 32 End
+------------------------------------------------------------------
+
+/[\p{Nd}]/utf
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\p{Nd}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[\p{Nd}+-]+/utf
+Memory allocation (code space): 64
+------------------------------------------------------------------
+ 0 28 Bra
+ 3 [+\-\p{Nd}]++
+ 28 28 Ket
+ 31 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
+Memory allocation (code space): 36
+------------------------------------------------------------------
+ 0 14 Bra
+ 3 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 14 14 Ket
+ 17 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
+Memory allocation (code space): 36
+------------------------------------------------------------------
+ 0 14 Bra
+ 3 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 14 14 Ket
+ 17 End
+------------------------------------------------------------------
+
+/[\x{105}-\x{109}]/i,utf
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [\x{104}-\x{109}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/( ( (?(1)0|) )* )/x
+Memory allocation (code space): 70
+------------------------------------------------------------------
+ 0 31 Bra
+ 3 25 CBra 1
+ 7 Brazero
+ 8 17 SCBra 2
+ 12 7 Cond
+ 15 1 Cond ref
+ 17 0
+ 19 3 Alt
+ 22 10 Ket
+ 25 17 KetRmax
+ 28 25 Ket
+ 31 31 Ket
+ 34 End
+------------------------------------------------------------------
+
+/( (?(1)0|)* )/x
+Memory allocation (code space): 56
+------------------------------------------------------------------
+ 0 24 Bra
+ 3 18 CBra 1
+ 7 Brazero
+ 8 7 SCond
+ 11 1 Cond ref
+ 13 0
+ 15 3 Alt
+ 18 10 KetRmax
+ 21 18 Ket
+ 24 24 Ket
+ 27 End
+------------------------------------------------------------------
+
+/[a]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 a
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[a]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 a
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[\xaa]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{aa}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[\xaa]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 \x{aa}
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[^a]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 [^a]
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[^a]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 [^a]
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[^\xaa]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 [^\x{aa}]
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+/[^\xaa]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 5 Bra
+ 3 [^\x{aa}]
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+
+#pattern -memory
+
+/[^\d]/utf,ucp
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [^\p{Nd}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[[:^alpha:][:^cntrl:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 15 Bra
+ 3 [\P{L}\P{Cc}]++
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+
+/[[:^cntrl:][:^alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 15 Bra
+ 3 [\P{Cc}\P{L}]++
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+
+/[[:alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 12 Bra
+ 3 [\p{L}]++
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+
+/[[:^alpha:]\S]+/utf,ucp
+------------------------------------------------------------------
+ 0 15 Bra
+ 3 [\P{L}\P{Xsp}]++
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/
+------------------------------------------------------------------
+ 0 70 Bra
+ 3 abc
+ 9 6 CBra 1
+ 13 d
+ 15 5 Alt
+ 18 e
+ 20 11 Ket
+ 23 *THEN
+ 24 x
+ 26 13 CBra 2
+ 30 123
+ 36 *THEN
+ 37 4
+ 39 28 Alt
+ 42 567
+ 48 6 CBra 3
+ 52 b
+ 54 5 Alt
+ 57 q
+ 59 11 Ket
+ 62 *THEN
+ 63 xx
+ 67 41 Ket
+ 70 70 Ket
+ 73 End
+------------------------------------------------------------------
+
+/(((a\2)|(a*)\g<-1>))*a?/
+------------------------------------------------------------------
+ 0 52 Bra
+ 3 Brazero
+ 4 43 SCBra 1
+ 8 36 Once
+ 11 15 CBra 2
+ 15 8 CBra 3
+ 19 a
+ 21 \2
+ 23 8 Ket
+ 26 15 Alt
+ 29 6 CBra 4
+ 33 a*
+ 35 6 Ket
+ 38 29 Recurse
+ 41 30 Ket
+ 44 36 Ket
+ 47 43 KetRmax
+ 50 a?+
+ 52 52 Ket
+ 55 End
+------------------------------------------------------------------
+
+/((?+1)(\1))/
+------------------------------------------------------------------
+ 0 28 Bra
+ 3 22 Once
+ 6 16 CBra 1
+ 10 13 Recurse
+ 13 6 CBra 2
+ 17 \1
+ 19 6 Ket
+ 22 16 Ket
+ 25 22 Ket
+ 28 28 Ket
+ 31 End
+------------------------------------------------------------------
+
+"(?1)(?#?'){2}(a)"
+------------------------------------------------------------------
+ 0 30 Bra
+ 3 6 Once
+ 6 21 Recurse
+ 9 6 Ket
+ 12 6 Once
+ 15 21 Recurse
+ 18 6 Ket
+ 21 6 CBra 1
+ 25 a
+ 27 6 Ket
+ 30 30 Ket
+ 33 End
+------------------------------------------------------------------
+
+/.((?2)(?R)|\1|$)()/
+------------------------------------------------------------------
+ 0 39 Bra
+ 3 Any
+ 4 25 Once
+ 7 10 CBra 1
+ 11 32 Recurse
+ 14 0 Recurse
+ 17 5 Alt
+ 20 \1
+ 22 4 Alt
+ 25 $
+ 26 19 Ket
+ 29 25 Ket
+ 32 4 CBra 2
+ 36 4 Ket
+ 39 39 Ket
+ 42 End
+------------------------------------------------------------------
+
+/.((?3)(?R)()(?2)|\1|$)()/
+------------------------------------------------------------------
+ 0 49 Bra
+ 3 Any
+ 4 35 Once
+ 7 20 CBra 1
+ 11 42 Recurse
+ 14 0 Recurse
+ 17 4 CBra 2
+ 21 4 Ket
+ 24 17 Recurse
+ 27 5 Alt
+ 30 \1
+ 32 4 Alt
+ 35 $
+ 36 29 Ket
+ 39 35 Ket
+ 42 4 CBra 3
+ 46 4 Ket
+ 49 49 Ket
+ 52 End
+------------------------------------------------------------------
+
+/(?1)()((((((\1++))\x85)+)|))/
+------------------------------------------------------------------
+ 0 69 Bra
+ 3 6 Recurse
+ 6 4 CBra 1
+ 10 4 Ket
+ 13 53 CBra 2
+ 17 43 CBra 3
+ 21 36 CBra 4
+ 25 29 CBra 5
+ 29 20 CBra 6
+ 33 13 CBra 7
+ 37 6 Once
+ 40 \1+
+ 43 6 Ket
+ 46 13 Ket
+ 49 20 Ket
+ 52 \x{85}
+ 54 29 KetRmax
+ 57 36 Ket
+ 60 3 Alt
+ 63 46 Ket
+ 66 53 Ket
+ 69 69 Ket
+ 72 End
+------------------------------------------------------------------
+
+# Check the absolute limit on nesting (?| etc. This varies with code unit
+# width because the workspace is a different number of bytes. It will fail
+# with link size 2 in 8-bit and 16-bit but not in 32-bit.
+
+/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+/parens_nest_limit=1000,-fullbincode
+
+# Use "expand" to create some very long patterns with nested parentheses, in
+# order to test workspace overflow. Again, this varies with code unit width,
+# and even with it fails in two modes, the error offset differs. It also varies
+# with link size - hence multiple tests with different values.
+
+/(?'ABC'\[[bar](]{105}*THEN:\[A]{255}\[)]{106}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{106}*THEN:\[A]{255}\[)]{107}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{159}*THEN:\[A]{255}\[)]{160}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{199}*THEN:\[A]{255}\[)]{200}/expand,-fullbincode
+Failed: error 186 at offset 1147: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{299}*THEN:\[A]{255}\[)]{300}/expand,-fullbincode
+Failed: error 186 at offset 1147: regular expression is too complicated
+
+/(?(1)(?1)){8,}+()/debug
+------------------------------------------------------------------
+ 0 110 Bra
+ 3 97 Once
+ 6 8 Cond
+ 9 1 Cond ref
+ 11 103 Recurse
+ 14 8 Ket
+ 17 8 Cond
+ 20 1 Cond ref
+ 22 103 Recurse
+ 25 8 Ket
+ 28 8 Cond
+ 31 1 Cond ref
+ 33 103 Recurse
+ 36 8 Ket
+ 39 8 Cond
+ 42 1 Cond ref
+ 44 103 Recurse
+ 47 8 Ket
+ 50 8 Cond
+ 53 1 Cond ref
+ 55 103 Recurse
+ 58 8 Ket
+ 61 8 Cond
+ 64 1 Cond ref
+ 66 103 Recurse
+ 69 8 Ket
+ 72 8 Cond
+ 75 1 Cond ref
+ 77 103 Recurse
+ 80 8 Ket
+ 83 14 SBraPos
+ 86 8 SCond
+ 89 1 Cond ref
+ 91 103 Recurse
+ 94 8 Ket
+ 97 14 KetRpos
+100 97 Ket
+103 4 CBra 1
+107 4 Ket
+110 110 Ket
+113 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcd
+ 0:
+ 1:
+
+/(?(1)|a(?1)b){2,}+()/debug
+------------------------------------------------------------------
+ 0 58 Bra
+ 3 45 Once
+ 6 5 Cond
+ 9 1 Cond ref
+ 11 10 Alt
+ 14 a
+ 16 51 Recurse
+ 19 b
+ 21 15 Ket
+ 24 21 SBraPos
+ 27 5 SCond
+ 30 1 Cond ref
+ 32 10 Alt
+ 35 a
+ 37 51 Recurse
+ 40 b
+ 42 15 Ket
+ 45 21 KetRpos
+ 48 45 Ket
+ 51 4 CBra 1
+ 55 4 Ket
+ 58 58 Ket
+ 61 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcde
+No match
+
+/((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
+------------------------------------------------------------------
+ 0 194 Bra
+ 3 61 CBra 1
+ 7 3 Recurse
+ 10 131 Recurse
+ 13 138 Recurse
+ 16 145 Recurse
+ 19 152 Recurse
+ 22 159 Recurse
+ 25 166 Recurse
+ 28 173 Recurse
+ 31 180 Recurse
+ 34 180 Recurse
+ 37 173 Recurse
+ 40 166 Recurse
+ 43 159 Recurse
+ 46 152 Recurse
+ 49 145 Recurse
+ 52 138 Recurse
+ 55 131 Recurse
+ 58 3 Recurse
+ 61 0 Recurse
+ 64 61 Ket
+ 67 61 SCBra 1
+ 71 3 Recurse
+ 74 131 Recurse
+ 77 138 Recurse
+ 80 145 Recurse
+ 83 152 Recurse
+ 86 159 Recurse
+ 89 166 Recurse
+ 92 173 Recurse
+ 95 180 Recurse
+ 98 180 Recurse
+101 173 Recurse
+104 166 Recurse
+107 159 Recurse
+110 152 Recurse
+113 145 Recurse
+116 138 Recurse
+119 131 Recurse
+122 3 Recurse
+125 0 Recurse
+128 61 KetRmax
+131 4 CBra 2
+135 4 Ket
+138 4 CBra 3
+142 4 Ket
+145 4 CBra 4
+149 4 Ket
+152 4 CBra 5
+156 4 Ket
+159 4 CBra 6
+163 4 Ket
+166 4 CBra 7
+170 4 Ket
+173 4 CBra 8
+177 4 Ket
+180 4 CBra 9
+184 4 Ket
+187 4 CBra 10
+191 4 Ket
+194 194 Ket
+197 End
+------------------------------------------------------------------
+Capturing subpattern count = 10
+May match empty string
+Subject length lower bound = 0
+
+# End of testinput8
diff --git a/testdata/testoutput8-32 b/testdata/testoutput8-32-2
index d9b0a46..babd0c7 100644
--- a/testdata/testoutput8-32
+++ b/testdata/testoutput8-32-2
@@ -1,9 +1,11 @@
-# These are a few representative patterns whose lengths and offsets are to be
-# shown when the link size is 2. This is just a doublecheck test to ensure the
-# sizes don't go horribly wrong when something is changed. The pattern contents
-# are all themselves checked in other tests. Unicode, including property
-# support, is required for these tests. There are separate output files for
-# each code unit size.
+# There are two sorts of patterns in this test. A number of them are
+# representative patterns whose lengths and offsets are checked. This is just a
+# doublecheck test to ensure the sizes don't go horribly wrong when something
+# is changed. The operation of these patterns is checked in other tests.
+#
+# This file also contains tests whose output varies with code unit size and/or
+# link size. Unicode support is required for these tests. There are separate
+# output files for each code unit size and link size.
#pattern fullbincode,memory
@@ -379,7 +381,7 @@ Options: utf
First code unit = 'A'
Last code unit = '.'
Subject length lower bound = 4
-
+
/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
Memory allocation (code space): 44
------------------------------------------------------------------
@@ -843,20 +845,29 @@ Memory allocation (code space): 28
# Check the absolute limit on nesting (?| etc. This varies with code unit
# width because the workspace is a different number of bytes. It will fail
-# in 8-bit and 16-bit but not in 32-bit.
-
+# with link size 2 in 8-bit and 16-bit but not in 32-bit.
+
/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
/parens_nest_limit=1000,-fullbincode
# Use "expand" to create some very long patterns with nested parentheses, in
# order to test workspace overflow. Again, this varies with code unit width,
-# and even with it fails in two modes, the error offset differs.
+# and even with it fails in two modes, the error offset differs. It also varies
+# with link size - hence multiple tests with different values.
/(?'ABC'\[[bar](]{105}*THEN:\[A]{255}\[)]{106}/expand,-fullbincode
/(?'ABC'\[[bar](]{106}*THEN:\[A]{255}\[)]{107}/expand,-fullbincode
+/(?'ABC'\[[bar](]{159}*THEN:\[A]{255}\[)]{160}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{199}*THEN:\[A]{255}\[)]{200}/expand,-fullbincode
+Failed: error 186 at offset 979: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{299}*THEN:\[A]{255}\[)]{300}/expand,-fullbincode
+Failed: error 186 at offset 979: regular expression is too complicated
+
/(?(1)(?1)){8,}+()/debug
------------------------------------------------------------------
0 79 Bra
diff --git a/testdata/testoutput8-32-3 b/testdata/testoutput8-32-3
new file mode 100644
index 0000000..babd0c7
--- /dev/null
+++ b/testdata/testoutput8-32-3
@@ -0,0 +1,1026 @@
+# There are two sorts of patterns in this test. A number of them are
+# representative patterns whose lengths and offsets are checked. This is just a
+# doublecheck test to ensure the sizes don't go horribly wrong when something
+# is changed. The operation of these patterns is checked in other tests.
+#
+# This file also contains tests whose output varies with code unit size and/or
+# link size. Unicode support is required for these tests. There are separate
+# output files for each code unit size and link size.
+
+#pattern fullbincode,memory
+
+/((?i)b)/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 5 CBra 1
+ 5 /i b
+ 7 5 Ket
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/(?s)(.*X|^B)/
+Memory allocation (code space): 76
+------------------------------------------------------------------
+ 0 16 Bra
+ 2 7 CBra 1
+ 5 AllAny*
+ 7 X
+ 9 5 Alt
+ 11 ^
+ 12 B
+ 14 12 Ket
+ 16 16 Ket
+ 18 End
+------------------------------------------------------------------
+
+/(?s:.*X|^B)/
+Memory allocation (code space): 72
+------------------------------------------------------------------
+ 0 15 Bra
+ 2 6 Bra
+ 4 AllAny*
+ 6 X
+ 8 5 Alt
+ 10 ^
+ 11 B
+ 13 11 Ket
+ 15 15 Ket
+ 17 End
+------------------------------------------------------------------
+
+/^[[:alnum:]]/
+Memory allocation (code space): 60
+------------------------------------------------------------------
+ 0 12 Bra
+ 2 ^
+ 3 [0-9A-Za-z]
+ 12 12 Ket
+ 14 End
+------------------------------------------------------------------
+
+/#/Ix
+Memory allocation (code space): 20
+------------------------------------------------------------------
+ 0 2 Bra
+ 2 2 Ket
+ 4 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+May match empty string
+Options: extended
+Subject length lower bound = 0
+
+/a#/Ix
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 a
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: extended
+First code unit = 'a'
+Subject length lower bound = 1
+
+/x?+/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 x?+
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/x++/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 x++
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/x{1,3}+/
+Memory allocation (code space): 40
+------------------------------------------------------------------
+ 0 7 Bra
+ 2 x
+ 4 x{0,2}+
+ 7 7 Ket
+ 9 End
+------------------------------------------------------------------
+
+/(x)*+/
+Memory allocation (code space): 52
+------------------------------------------------------------------
+ 0 10 Bra
+ 2 Braposzero
+ 3 5 CBraPos 1
+ 6 x
+ 8 5 KetRpos
+ 10 10 Ket
+ 12 End
+------------------------------------------------------------------
+
+/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
+Memory allocation (code space): 220
+------------------------------------------------------------------
+ 0 52 Bra
+ 2 ^
+ 3 47 CBra 1
+ 6 5 CBra 2
+ 9 a+
+ 11 5 Ket
+ 13 13 CBra 3
+ 16 [ab]+?
+ 26 13 Ket
+ 28 13 CBra 4
+ 31 [bc]+
+ 41 13 Ket
+ 43 5 CBra 5
+ 46 \w*+
+ 48 5 Ket
+ 50 47 Ket
+ 52 52 Ket
+ 54 End
+------------------------------------------------------------------
+
+"8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 3296
+------------------------------------------------------------------
+ 0 821 Bra
+ 2 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+820 \b
+821 821 Ket
+823 End
+------------------------------------------------------------------
+
+"\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 3256
+------------------------------------------------------------------
+ 0 811 Bra
+ 2 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+810 \b
+811 811 Ket
+813 End
+------------------------------------------------------------------
+
+/(a(?1)b)/
+Memory allocation (code space): 64
+------------------------------------------------------------------
+ 0 13 Bra
+ 2 9 CBra 1
+ 5 a
+ 7 2 Recurse
+ 9 b
+ 11 9 Ket
+ 13 13 Ket
+ 15 End
+------------------------------------------------------------------
+
+/(a(?1)+b)/
+Memory allocation (code space): 80
+------------------------------------------------------------------
+ 0 17 Bra
+ 2 13 CBra 1
+ 5 a
+ 7 4 Once
+ 9 2 Recurse
+ 11 4 KetRmax
+ 13 b
+ 15 13 Ket
+ 17 17 Ket
+ 19 End
+------------------------------------------------------------------
+
+/a(?P<name1>b|c)d(?P<longername2>e)/
+Memory allocation (code space): 108
+------------------------------------------------------------------
+ 0 24 Bra
+ 2 a
+ 4 5 CBra 1
+ 7 b
+ 9 4 Alt
+ 11 c
+ 13 9 Ket
+ 15 d
+ 17 5 CBra 2
+ 20 e
+ 22 5 Ket
+ 24 24 Ket
+ 26 End
+------------------------------------------------------------------
+
+/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/
+Memory allocation (code space): 128
+------------------------------------------------------------------
+ 0 29 Bra
+ 2 18 Bra
+ 4 a
+ 6 12 CBra 1
+ 9 c
+ 11 5 CBra 2
+ 14 d
+ 16 5 Ket
+ 18 12 Ket
+ 20 18 Ket
+ 22 5 CBra 3
+ 25 a
+ 27 5 Ket
+ 29 29 Ket
+ 31 End
+------------------------------------------------------------------
+
+/(?P<a>a)...(?P=a)bbb(?P>a)d/
+Memory allocation (code space): 108
+------------------------------------------------------------------
+ 0 24 Bra
+ 2 5 CBra 1
+ 5 a
+ 7 5 Ket
+ 9 Any
+ 10 Any
+ 11 Any
+ 12 \1
+ 14 bbb
+ 20 2 Recurse
+ 22 d
+ 24 24 Ket
+ 26 End
+------------------------------------------------------------------
+
+/abc(?C255)de(?C)f/
+Memory allocation (code space): 100
+------------------------------------------------------------------
+ 0 22 Bra
+ 2 abc
+ 8 Callout 255 10 1
+ 12 de
+ 16 Callout 0 16 1
+ 20 f
+ 22 22 Ket
+ 24 End
+------------------------------------------------------------------
+
+/abcde/auto_callout
+Memory allocation (code space): 156
+------------------------------------------------------------------
+ 0 36 Bra
+ 2 Callout 255 0 1
+ 6 a
+ 8 Callout 255 1 1
+ 12 b
+ 14 Callout 255 2 1
+ 18 c
+ 20 Callout 255 3 1
+ 24 d
+ 26 Callout 255 4 1
+ 30 e
+ 32 Callout 255 5 0
+ 36 36 Ket
+ 38 End
+------------------------------------------------------------------
+
+/\x{100}/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{100}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{1000}/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{1000}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{10000}/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{10000}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{100000}/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{100000}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{10ffff}/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{10ffff}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{110000}/utf
+Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
+
+/[\x{ff}]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{ff}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[\x{100}]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{100}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x80/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{80}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\xff/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{ff}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
+Memory allocation (code space): 52
+------------------------------------------------------------------
+ 0 10 Bra
+ 2 A\x{2262}\x{391}.
+ 10 10 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = 'A'
+Last code unit = '.'
+Subject length lower bound = 4
+
+/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
+Memory allocation (code space): 44
+------------------------------------------------------------------
+ 0 8 Bra
+ 2 \x{d55c}\x{ad6d}\x{c5b4}
+ 8 8 Ket
+ 10 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \x{d55c}
+Last code unit = \x{c5b4}
+Subject length lower bound = 3
+
+/\x{65e5}\x{672c}\x{8a9e}/I,utf
+Memory allocation (code space): 44
+------------------------------------------------------------------
+ 0 8 Bra
+ 2 \x{65e5}\x{672c}\x{8a9e}
+ 8 8 Ket
+ 10 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \x{65e5}
+Last code unit = \x{8a9e}
+Subject length lower bound = 3
+
+/[\x{100}]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{100}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[Z\x{100}]/utf
+Memory allocation (code space): 76
+------------------------------------------------------------------
+ 0 16 Bra
+ 2 [Z\x{100}]
+ 16 16 Ket
+ 18 End
+------------------------------------------------------------------
+
+/^[\x{100}\E-\Q\E\x{150}]/utf
+Memory allocation (code space): 52
+------------------------------------------------------------------
+ 0 10 Bra
+ 2 ^
+ 3 [\x{100}-\x{150}]
+ 10 10 Ket
+ 12 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E]/utf
+Memory allocation (code space): 52
+------------------------------------------------------------------
+ 0 10 Bra
+ 2 ^
+ 3 [\x{100}-\x{150}]
+ 10 10 Ket
+ 12 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E/utf
+Failed: error 106 at offset 13: missing terminating ] for character class
+
+/[\p{L}]/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\p{L}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[\p{^L}]/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\P{L}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[\P{L}]/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\P{L}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[\P{^L}]/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\p{L}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[abc\p{L}\x{0660}]/utf
+Memory allocation (code space): 88
+------------------------------------------------------------------
+ 0 19 Bra
+ 2 [a-c\p{L}\x{660}]
+ 19 19 Ket
+ 21 End
+------------------------------------------------------------------
+
+/[\p{Nd}]/utf
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\p{Nd}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[\p{Nd}+-]+/utf
+Memory allocation (code space): 84
+------------------------------------------------------------------
+ 0 18 Bra
+ 2 [+\-\p{Nd}]++
+ 18 18 Ket
+ 20 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
+Memory allocation (code space): 60
+------------------------------------------------------------------
+ 0 12 Bra
+ 2 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 12 12 Ket
+ 14 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
+Memory allocation (code space): 60
+------------------------------------------------------------------
+ 0 12 Bra
+ 2 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 12 12 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[\x{105}-\x{109}]/i,utf
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\x{104}-\x{109}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/( ( (?(1)0|) )* )/x
+Memory allocation (code space): 104
+------------------------------------------------------------------
+ 0 23 Bra
+ 2 19 CBra 1
+ 5 Brazero
+ 6 13 SCBra 2
+ 9 6 Cond
+ 11 1 Cond ref
+ 13 0
+ 15 2 Alt
+ 17 8 Ket
+ 19 13 KetRmax
+ 21 19 Ket
+ 23 23 Ket
+ 25 End
+------------------------------------------------------------------
+
+/( (?(1)0|)* )/x
+Memory allocation (code space): 84
+------------------------------------------------------------------
+ 0 18 Bra
+ 2 14 CBra 1
+ 5 Brazero
+ 6 6 SCond
+ 8 1 Cond ref
+ 10 0
+ 12 2 Alt
+ 14 8 KetRmax
+ 16 14 Ket
+ 18 18 Ket
+ 20 End
+------------------------------------------------------------------
+
+/[a]/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 a
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[a]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 a
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[\xaa]/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{aa}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[\xaa]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{aa}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[^a]/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 [^a]
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[^a]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 [^a]
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[^\xaa]/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 [^\x{aa}]
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[^\xaa]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 [^\x{aa}]
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+#pattern -memory
+
+/[^\d]/utf,ucp
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [^\p{Nd}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[[:^alpha:][:^cntrl:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 13 Bra
+ 2 [\P{L}\P{Cc}]++
+ 13 13 Ket
+ 15 End
+------------------------------------------------------------------
+
+/[[:^cntrl:][:^alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 13 Bra
+ 2 [\P{Cc}\P{L}]++
+ 13 13 Ket
+ 15 End
+------------------------------------------------------------------
+
+/[[:alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 10 Bra
+ 2 [\p{L}]++
+ 10 10 Ket
+ 12 End
+------------------------------------------------------------------
+
+/[[:^alpha:]\S]+/utf,ucp
+------------------------------------------------------------------
+ 0 13 Bra
+ 2 [\P{L}\P{Xsp}]++
+ 13 13 Ket
+ 15 End
+------------------------------------------------------------------
+
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/
+------------------------------------------------------------------
+ 0 60 Bra
+ 2 abc
+ 8 5 CBra 1
+ 11 d
+ 13 4 Alt
+ 15 e
+ 17 9 Ket
+ 19 *THEN
+ 20 x
+ 22 12 CBra 2
+ 25 123
+ 31 *THEN
+ 32 4
+ 34 24 Alt
+ 36 567
+ 42 5 CBra 3
+ 45 b
+ 47 4 Alt
+ 49 q
+ 51 9 Ket
+ 53 *THEN
+ 54 xx
+ 58 36 Ket
+ 60 60 Ket
+ 62 End
+------------------------------------------------------------------
+
+/(((a\2)|(a*)\g<-1>))*a?/
+------------------------------------------------------------------
+ 0 39 Bra
+ 2 Brazero
+ 3 32 SCBra 1
+ 6 27 Once
+ 8 12 CBra 2
+ 11 7 CBra 3
+ 14 a
+ 16 \2
+ 18 7 Ket
+ 20 11 Alt
+ 22 5 CBra 4
+ 25 a*
+ 27 5 Ket
+ 29 22 Recurse
+ 31 23 Ket
+ 33 27 Ket
+ 35 32 KetRmax
+ 37 a?+
+ 39 39 Ket
+ 41 End
+------------------------------------------------------------------
+
+/((?+1)(\1))/
+------------------------------------------------------------------
+ 0 20 Bra
+ 2 16 Once
+ 4 12 CBra 1
+ 7 9 Recurse
+ 9 5 CBra 2
+ 12 \1
+ 14 5 Ket
+ 16 12 Ket
+ 18 16 Ket
+ 20 20 Ket
+ 22 End
+------------------------------------------------------------------
+
+"(?1)(?#?'){2}(a)"
+------------------------------------------------------------------
+ 0 21 Bra
+ 2 4 Once
+ 4 14 Recurse
+ 6 4 Ket
+ 8 4 Once
+ 10 14 Recurse
+ 12 4 Ket
+ 14 5 CBra 1
+ 17 a
+ 19 5 Ket
+ 21 21 Ket
+ 23 End
+------------------------------------------------------------------
+
+/.((?2)(?R)|\1|$)()/
+------------------------------------------------------------------
+ 0 28 Bra
+ 2 Any
+ 3 18 Once
+ 5 7 CBra 1
+ 8 23 Recurse
+ 10 0 Recurse
+ 12 4 Alt
+ 14 \1
+ 16 3 Alt
+ 18 $
+ 19 14 Ket
+ 21 18 Ket
+ 23 3 CBra 2
+ 26 3 Ket
+ 28 28 Ket
+ 30 End
+------------------------------------------------------------------
+
+/.((?3)(?R)()(?2)|\1|$)()/
+------------------------------------------------------------------
+ 0 35 Bra
+ 2 Any
+ 3 25 Once
+ 5 14 CBra 1
+ 8 30 Recurse
+ 10 0 Recurse
+ 12 3 CBra 2
+ 15 3 Ket
+ 17 12 Recurse
+ 19 4 Alt
+ 21 \1
+ 23 3 Alt
+ 25 $
+ 26 21 Ket
+ 28 25 Ket
+ 30 3 CBra 3
+ 33 3 Ket
+ 35 35 Ket
+ 37 End
+------------------------------------------------------------------
+
+/(?1)()((((((\1++))\x85)+)|))/
+------------------------------------------------------------------
+ 0 50 Bra
+ 2 4 Recurse
+ 4 3 CBra 1
+ 7 3 Ket
+ 9 39 CBra 2
+ 12 32 CBra 3
+ 15 27 CBra 4
+ 18 22 CBra 5
+ 21 15 CBra 6
+ 24 10 CBra 7
+ 27 5 Once
+ 29 \1+
+ 32 5 Ket
+ 34 10 Ket
+ 36 15 Ket
+ 38 \x{85}
+ 40 22 KetRmax
+ 42 27 Ket
+ 44 2 Alt
+ 46 34 Ket
+ 48 39 Ket
+ 50 50 Ket
+ 52 End
+------------------------------------------------------------------
+
+# Check the absolute limit on nesting (?| etc. This varies with code unit
+# width because the workspace is a different number of bytes. It will fail
+# with link size 2 in 8-bit and 16-bit but not in 32-bit.
+
+/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+/parens_nest_limit=1000,-fullbincode
+
+# Use "expand" to create some very long patterns with nested parentheses, in
+# order to test workspace overflow. Again, this varies with code unit width,
+# and even with it fails in two modes, the error offset differs. It also varies
+# with link size - hence multiple tests with different values.
+
+/(?'ABC'\[[bar](]{105}*THEN:\[A]{255}\[)]{106}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{106}*THEN:\[A]{255}\[)]{107}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{159}*THEN:\[A]{255}\[)]{160}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{199}*THEN:\[A]{255}\[)]{200}/expand,-fullbincode
+Failed: error 186 at offset 979: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{299}*THEN:\[A]{255}\[)]{300}/expand,-fullbincode
+Failed: error 186 at offset 979: regular expression is too complicated
+
+/(?(1)(?1)){8,}+()/debug
+------------------------------------------------------------------
+ 0 79 Bra
+ 2 70 Once
+ 4 6 Cond
+ 6 1 Cond ref
+ 8 74 Recurse
+ 10 6 Ket
+ 12 6 Cond
+ 14 1 Cond ref
+ 16 74 Recurse
+ 18 6 Ket
+ 20 6 Cond
+ 22 1 Cond ref
+ 24 74 Recurse
+ 26 6 Ket
+ 28 6 Cond
+ 30 1 Cond ref
+ 32 74 Recurse
+ 34 6 Ket
+ 36 6 Cond
+ 38 1 Cond ref
+ 40 74 Recurse
+ 42 6 Ket
+ 44 6 Cond
+ 46 1 Cond ref
+ 48 74 Recurse
+ 50 6 Ket
+ 52 6 Cond
+ 54 1 Cond ref
+ 56 74 Recurse
+ 58 6 Ket
+ 60 10 SBraPos
+ 62 6 SCond
+ 64 1 Cond ref
+ 66 74 Recurse
+ 68 6 Ket
+ 70 10 KetRpos
+ 72 70 Ket
+ 74 3 CBra 1
+ 77 3 Ket
+ 79 79 Ket
+ 81 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcd
+ 0:
+ 1:
+
+/(?(1)|a(?1)b){2,}+()/debug
+------------------------------------------------------------------
+ 0 43 Bra
+ 2 34 Once
+ 4 4 Cond
+ 6 1 Cond ref
+ 8 8 Alt
+ 10 a
+ 12 38 Recurse
+ 14 b
+ 16 12 Ket
+ 18 16 SBraPos
+ 20 4 SCond
+ 22 1 Cond ref
+ 24 8 Alt
+ 26 a
+ 28 38 Recurse
+ 30 b
+ 32 12 Ket
+ 34 16 KetRpos
+ 36 34 Ket
+ 38 3 CBra 1
+ 41 3 Ket
+ 43 43 Ket
+ 45 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcde
+No match
+
+/((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
+------------------------------------------------------------------
+ 0 133 Bra
+ 2 41 CBra 1
+ 5 2 Recurse
+ 7 88 Recurse
+ 9 93 Recurse
+ 11 98 Recurse
+ 13 103 Recurse
+ 15 108 Recurse
+ 17 113 Recurse
+ 19 118 Recurse
+ 21 123 Recurse
+ 23 123 Recurse
+ 25 118 Recurse
+ 27 113 Recurse
+ 29 108 Recurse
+ 31 103 Recurse
+ 33 98 Recurse
+ 35 93 Recurse
+ 37 88 Recurse
+ 39 2 Recurse
+ 41 0 Recurse
+ 43 41 Ket
+ 45 41 SCBra 1
+ 48 2 Recurse
+ 50 88 Recurse
+ 52 93 Recurse
+ 54 98 Recurse
+ 56 103 Recurse
+ 58 108 Recurse
+ 60 113 Recurse
+ 62 118 Recurse
+ 64 123 Recurse
+ 66 123 Recurse
+ 68 118 Recurse
+ 70 113 Recurse
+ 72 108 Recurse
+ 74 103 Recurse
+ 76 98 Recurse
+ 78 93 Recurse
+ 80 88 Recurse
+ 82 2 Recurse
+ 84 0 Recurse
+ 86 41 KetRmax
+ 88 3 CBra 2
+ 91 3 Ket
+ 93 3 CBra 3
+ 96 3 Ket
+ 98 3 CBra 4
+101 3 Ket
+103 3 CBra 5
+106 3 Ket
+108 3 CBra 6
+111 3 Ket
+113 3 CBra 7
+116 3 Ket
+118 3 CBra 8
+121 3 Ket
+123 3 CBra 9
+126 3 Ket
+128 3 CBra 10
+131 3 Ket
+133 133 Ket
+135 End
+------------------------------------------------------------------
+Capturing subpattern count = 10
+May match empty string
+Subject length lower bound = 0
+
+# End of testinput8
diff --git a/testdata/testoutput8-32-4 b/testdata/testoutput8-32-4
new file mode 100644
index 0000000..babd0c7
--- /dev/null
+++ b/testdata/testoutput8-32-4
@@ -0,0 +1,1026 @@
+# There are two sorts of patterns in this test. A number of them are
+# representative patterns whose lengths and offsets are checked. This is just a
+# doublecheck test to ensure the sizes don't go horribly wrong when something
+# is changed. The operation of these patterns is checked in other tests.
+#
+# This file also contains tests whose output varies with code unit size and/or
+# link size. Unicode support is required for these tests. There are separate
+# output files for each code unit size and link size.
+
+#pattern fullbincode,memory
+
+/((?i)b)/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 5 CBra 1
+ 5 /i b
+ 7 5 Ket
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/(?s)(.*X|^B)/
+Memory allocation (code space): 76
+------------------------------------------------------------------
+ 0 16 Bra
+ 2 7 CBra 1
+ 5 AllAny*
+ 7 X
+ 9 5 Alt
+ 11 ^
+ 12 B
+ 14 12 Ket
+ 16 16 Ket
+ 18 End
+------------------------------------------------------------------
+
+/(?s:.*X|^B)/
+Memory allocation (code space): 72
+------------------------------------------------------------------
+ 0 15 Bra
+ 2 6 Bra
+ 4 AllAny*
+ 6 X
+ 8 5 Alt
+ 10 ^
+ 11 B
+ 13 11 Ket
+ 15 15 Ket
+ 17 End
+------------------------------------------------------------------
+
+/^[[:alnum:]]/
+Memory allocation (code space): 60
+------------------------------------------------------------------
+ 0 12 Bra
+ 2 ^
+ 3 [0-9A-Za-z]
+ 12 12 Ket
+ 14 End
+------------------------------------------------------------------
+
+/#/Ix
+Memory allocation (code space): 20
+------------------------------------------------------------------
+ 0 2 Bra
+ 2 2 Ket
+ 4 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+May match empty string
+Options: extended
+Subject length lower bound = 0
+
+/a#/Ix
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 a
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: extended
+First code unit = 'a'
+Subject length lower bound = 1
+
+/x?+/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 x?+
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/x++/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 x++
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/x{1,3}+/
+Memory allocation (code space): 40
+------------------------------------------------------------------
+ 0 7 Bra
+ 2 x
+ 4 x{0,2}+
+ 7 7 Ket
+ 9 End
+------------------------------------------------------------------
+
+/(x)*+/
+Memory allocation (code space): 52
+------------------------------------------------------------------
+ 0 10 Bra
+ 2 Braposzero
+ 3 5 CBraPos 1
+ 6 x
+ 8 5 KetRpos
+ 10 10 Ket
+ 12 End
+------------------------------------------------------------------
+
+/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
+Memory allocation (code space): 220
+------------------------------------------------------------------
+ 0 52 Bra
+ 2 ^
+ 3 47 CBra 1
+ 6 5 CBra 2
+ 9 a+
+ 11 5 Ket
+ 13 13 CBra 3
+ 16 [ab]+?
+ 26 13 Ket
+ 28 13 CBra 4
+ 31 [bc]+
+ 41 13 Ket
+ 43 5 CBra 5
+ 46 \w*+
+ 48 5 Ket
+ 50 47 Ket
+ 52 52 Ket
+ 54 End
+------------------------------------------------------------------
+
+"8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 3296
+------------------------------------------------------------------
+ 0 821 Bra
+ 2 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+820 \b
+821 821 Ket
+823 End
+------------------------------------------------------------------
+
+"\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 3256
+------------------------------------------------------------------
+ 0 811 Bra
+ 2 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+810 \b
+811 811 Ket
+813 End
+------------------------------------------------------------------
+
+/(a(?1)b)/
+Memory allocation (code space): 64
+------------------------------------------------------------------
+ 0 13 Bra
+ 2 9 CBra 1
+ 5 a
+ 7 2 Recurse
+ 9 b
+ 11 9 Ket
+ 13 13 Ket
+ 15 End
+------------------------------------------------------------------
+
+/(a(?1)+b)/
+Memory allocation (code space): 80
+------------------------------------------------------------------
+ 0 17 Bra
+ 2 13 CBra 1
+ 5 a
+ 7 4 Once
+ 9 2 Recurse
+ 11 4 KetRmax
+ 13 b
+ 15 13 Ket
+ 17 17 Ket
+ 19 End
+------------------------------------------------------------------
+
+/a(?P<name1>b|c)d(?P<longername2>e)/
+Memory allocation (code space): 108
+------------------------------------------------------------------
+ 0 24 Bra
+ 2 a
+ 4 5 CBra 1
+ 7 b
+ 9 4 Alt
+ 11 c
+ 13 9 Ket
+ 15 d
+ 17 5 CBra 2
+ 20 e
+ 22 5 Ket
+ 24 24 Ket
+ 26 End
+------------------------------------------------------------------
+
+/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/
+Memory allocation (code space): 128
+------------------------------------------------------------------
+ 0 29 Bra
+ 2 18 Bra
+ 4 a
+ 6 12 CBra 1
+ 9 c
+ 11 5 CBra 2
+ 14 d
+ 16 5 Ket
+ 18 12 Ket
+ 20 18 Ket
+ 22 5 CBra 3
+ 25 a
+ 27 5 Ket
+ 29 29 Ket
+ 31 End
+------------------------------------------------------------------
+
+/(?P<a>a)...(?P=a)bbb(?P>a)d/
+Memory allocation (code space): 108
+------------------------------------------------------------------
+ 0 24 Bra
+ 2 5 CBra 1
+ 5 a
+ 7 5 Ket
+ 9 Any
+ 10 Any
+ 11 Any
+ 12 \1
+ 14 bbb
+ 20 2 Recurse
+ 22 d
+ 24 24 Ket
+ 26 End
+------------------------------------------------------------------
+
+/abc(?C255)de(?C)f/
+Memory allocation (code space): 100
+------------------------------------------------------------------
+ 0 22 Bra
+ 2 abc
+ 8 Callout 255 10 1
+ 12 de
+ 16 Callout 0 16 1
+ 20 f
+ 22 22 Ket
+ 24 End
+------------------------------------------------------------------
+
+/abcde/auto_callout
+Memory allocation (code space): 156
+------------------------------------------------------------------
+ 0 36 Bra
+ 2 Callout 255 0 1
+ 6 a
+ 8 Callout 255 1 1
+ 12 b
+ 14 Callout 255 2 1
+ 18 c
+ 20 Callout 255 3 1
+ 24 d
+ 26 Callout 255 4 1
+ 30 e
+ 32 Callout 255 5 0
+ 36 36 Ket
+ 38 End
+------------------------------------------------------------------
+
+/\x{100}/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{100}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{1000}/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{1000}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{10000}/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{10000}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{100000}/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{100000}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{10ffff}/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{10ffff}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{110000}/utf
+Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
+
+/[\x{ff}]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{ff}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[\x{100}]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{100}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x80/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{80}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\xff/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{ff}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
+Memory allocation (code space): 52
+------------------------------------------------------------------
+ 0 10 Bra
+ 2 A\x{2262}\x{391}.
+ 10 10 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = 'A'
+Last code unit = '.'
+Subject length lower bound = 4
+
+/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
+Memory allocation (code space): 44
+------------------------------------------------------------------
+ 0 8 Bra
+ 2 \x{d55c}\x{ad6d}\x{c5b4}
+ 8 8 Ket
+ 10 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \x{d55c}
+Last code unit = \x{c5b4}
+Subject length lower bound = 3
+
+/\x{65e5}\x{672c}\x{8a9e}/I,utf
+Memory allocation (code space): 44
+------------------------------------------------------------------
+ 0 8 Bra
+ 2 \x{65e5}\x{672c}\x{8a9e}
+ 8 8 Ket
+ 10 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \x{65e5}
+Last code unit = \x{8a9e}
+Subject length lower bound = 3
+
+/[\x{100}]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{100}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[Z\x{100}]/utf
+Memory allocation (code space): 76
+------------------------------------------------------------------
+ 0 16 Bra
+ 2 [Z\x{100}]
+ 16 16 Ket
+ 18 End
+------------------------------------------------------------------
+
+/^[\x{100}\E-\Q\E\x{150}]/utf
+Memory allocation (code space): 52
+------------------------------------------------------------------
+ 0 10 Bra
+ 2 ^
+ 3 [\x{100}-\x{150}]
+ 10 10 Ket
+ 12 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E]/utf
+Memory allocation (code space): 52
+------------------------------------------------------------------
+ 0 10 Bra
+ 2 ^
+ 3 [\x{100}-\x{150}]
+ 10 10 Ket
+ 12 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E/utf
+Failed: error 106 at offset 13: missing terminating ] for character class
+
+/[\p{L}]/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\p{L}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[\p{^L}]/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\P{L}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[\P{L}]/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\P{L}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[\P{^L}]/
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\p{L}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[abc\p{L}\x{0660}]/utf
+Memory allocation (code space): 88
+------------------------------------------------------------------
+ 0 19 Bra
+ 2 [a-c\p{L}\x{660}]
+ 19 19 Ket
+ 21 End
+------------------------------------------------------------------
+
+/[\p{Nd}]/utf
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\p{Nd}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[\p{Nd}+-]+/utf
+Memory allocation (code space): 84
+------------------------------------------------------------------
+ 0 18 Bra
+ 2 [+\-\p{Nd}]++
+ 18 18 Ket
+ 20 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
+Memory allocation (code space): 60
+------------------------------------------------------------------
+ 0 12 Bra
+ 2 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 12 12 Ket
+ 14 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
+Memory allocation (code space): 60
+------------------------------------------------------------------
+ 0 12 Bra
+ 2 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 12 12 Ket
+ 14 End
+------------------------------------------------------------------
+
+/[\x{105}-\x{109}]/i,utf
+Memory allocation (code space): 48
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [\x{104}-\x{109}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/( ( (?(1)0|) )* )/x
+Memory allocation (code space): 104
+------------------------------------------------------------------
+ 0 23 Bra
+ 2 19 CBra 1
+ 5 Brazero
+ 6 13 SCBra 2
+ 9 6 Cond
+ 11 1 Cond ref
+ 13 0
+ 15 2 Alt
+ 17 8 Ket
+ 19 13 KetRmax
+ 21 19 Ket
+ 23 23 Ket
+ 25 End
+------------------------------------------------------------------
+
+/( (?(1)0|)* )/x
+Memory allocation (code space): 84
+------------------------------------------------------------------
+ 0 18 Bra
+ 2 14 CBra 1
+ 5 Brazero
+ 6 6 SCond
+ 8 1 Cond ref
+ 10 0
+ 12 2 Alt
+ 14 8 KetRmax
+ 16 14 Ket
+ 18 18 Ket
+ 20 End
+------------------------------------------------------------------
+
+/[a]/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 a
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[a]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 a
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[\xaa]/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{aa}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[\xaa]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 \x{aa}
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[^a]/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 [^a]
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[^a]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 [^a]
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[^\xaa]/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 [^\x{aa}]
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+/[^\xaa]/utf
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 4 Bra
+ 2 [^\x{aa}]
+ 4 4 Ket
+ 6 End
+------------------------------------------------------------------
+
+#pattern -memory
+
+/[^\d]/utf,ucp
+------------------------------------------------------------------
+ 0 9 Bra
+ 2 [^\p{Nd}]
+ 9 9 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[[:^alpha:][:^cntrl:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 13 Bra
+ 2 [\P{L}\P{Cc}]++
+ 13 13 Ket
+ 15 End
+------------------------------------------------------------------
+
+/[[:^cntrl:][:^alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 13 Bra
+ 2 [\P{Cc}\P{L}]++
+ 13 13 Ket
+ 15 End
+------------------------------------------------------------------
+
+/[[:alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 10 Bra
+ 2 [\p{L}]++
+ 10 10 Ket
+ 12 End
+------------------------------------------------------------------
+
+/[[:^alpha:]\S]+/utf,ucp
+------------------------------------------------------------------
+ 0 13 Bra
+ 2 [\P{L}\P{Xsp}]++
+ 13 13 Ket
+ 15 End
+------------------------------------------------------------------
+
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/
+------------------------------------------------------------------
+ 0 60 Bra
+ 2 abc
+ 8 5 CBra 1
+ 11 d
+ 13 4 Alt
+ 15 e
+ 17 9 Ket
+ 19 *THEN
+ 20 x
+ 22 12 CBra 2
+ 25 123
+ 31 *THEN
+ 32 4
+ 34 24 Alt
+ 36 567
+ 42 5 CBra 3
+ 45 b
+ 47 4 Alt
+ 49 q
+ 51 9 Ket
+ 53 *THEN
+ 54 xx
+ 58 36 Ket
+ 60 60 Ket
+ 62 End
+------------------------------------------------------------------
+
+/(((a\2)|(a*)\g<-1>))*a?/
+------------------------------------------------------------------
+ 0 39 Bra
+ 2 Brazero
+ 3 32 SCBra 1
+ 6 27 Once
+ 8 12 CBra 2
+ 11 7 CBra 3
+ 14 a
+ 16 \2
+ 18 7 Ket
+ 20 11 Alt
+ 22 5 CBra 4
+ 25 a*
+ 27 5 Ket
+ 29 22 Recurse
+ 31 23 Ket
+ 33 27 Ket
+ 35 32 KetRmax
+ 37 a?+
+ 39 39 Ket
+ 41 End
+------------------------------------------------------------------
+
+/((?+1)(\1))/
+------------------------------------------------------------------
+ 0 20 Bra
+ 2 16 Once
+ 4 12 CBra 1
+ 7 9 Recurse
+ 9 5 CBra 2
+ 12 \1
+ 14 5 Ket
+ 16 12 Ket
+ 18 16 Ket
+ 20 20 Ket
+ 22 End
+------------------------------------------------------------------
+
+"(?1)(?#?'){2}(a)"
+------------------------------------------------------------------
+ 0 21 Bra
+ 2 4 Once
+ 4 14 Recurse
+ 6 4 Ket
+ 8 4 Once
+ 10 14 Recurse
+ 12 4 Ket
+ 14 5 CBra 1
+ 17 a
+ 19 5 Ket
+ 21 21 Ket
+ 23 End
+------------------------------------------------------------------
+
+/.((?2)(?R)|\1|$)()/
+------------------------------------------------------------------
+ 0 28 Bra
+ 2 Any
+ 3 18 Once
+ 5 7 CBra 1
+ 8 23 Recurse
+ 10 0 Recurse
+ 12 4 Alt
+ 14 \1
+ 16 3 Alt
+ 18 $
+ 19 14 Ket
+ 21 18 Ket
+ 23 3 CBra 2
+ 26 3 Ket
+ 28 28 Ket
+ 30 End
+------------------------------------------------------------------
+
+/.((?3)(?R)()(?2)|\1|$)()/
+------------------------------------------------------------------
+ 0 35 Bra
+ 2 Any
+ 3 25 Once
+ 5 14 CBra 1
+ 8 30 Recurse
+ 10 0 Recurse
+ 12 3 CBra 2
+ 15 3 Ket
+ 17 12 Recurse
+ 19 4 Alt
+ 21 \1
+ 23 3 Alt
+ 25 $
+ 26 21 Ket
+ 28 25 Ket
+ 30 3 CBra 3
+ 33 3 Ket
+ 35 35 Ket
+ 37 End
+------------------------------------------------------------------
+
+/(?1)()((((((\1++))\x85)+)|))/
+------------------------------------------------------------------
+ 0 50 Bra
+ 2 4 Recurse
+ 4 3 CBra 1
+ 7 3 Ket
+ 9 39 CBra 2
+ 12 32 CBra 3
+ 15 27 CBra 4
+ 18 22 CBra 5
+ 21 15 CBra 6
+ 24 10 CBra 7
+ 27 5 Once
+ 29 \1+
+ 32 5 Ket
+ 34 10 Ket
+ 36 15 Ket
+ 38 \x{85}
+ 40 22 KetRmax
+ 42 27 Ket
+ 44 2 Alt
+ 46 34 Ket
+ 48 39 Ket
+ 50 50 Ket
+ 52 End
+------------------------------------------------------------------
+
+# Check the absolute limit on nesting (?| etc. This varies with code unit
+# width because the workspace is a different number of bytes. It will fail
+# with link size 2 in 8-bit and 16-bit but not in 32-bit.
+
+/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+/parens_nest_limit=1000,-fullbincode
+
+# Use "expand" to create some very long patterns with nested parentheses, in
+# order to test workspace overflow. Again, this varies with code unit width,
+# and even with it fails in two modes, the error offset differs. It also varies
+# with link size - hence multiple tests with different values.
+
+/(?'ABC'\[[bar](]{105}*THEN:\[A]{255}\[)]{106}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{106}*THEN:\[A]{255}\[)]{107}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{159}*THEN:\[A]{255}\[)]{160}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{199}*THEN:\[A]{255}\[)]{200}/expand,-fullbincode
+Failed: error 186 at offset 979: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{299}*THEN:\[A]{255}\[)]{300}/expand,-fullbincode
+Failed: error 186 at offset 979: regular expression is too complicated
+
+/(?(1)(?1)){8,}+()/debug
+------------------------------------------------------------------
+ 0 79 Bra
+ 2 70 Once
+ 4 6 Cond
+ 6 1 Cond ref
+ 8 74 Recurse
+ 10 6 Ket
+ 12 6 Cond
+ 14 1 Cond ref
+ 16 74 Recurse
+ 18 6 Ket
+ 20 6 Cond
+ 22 1 Cond ref
+ 24 74 Recurse
+ 26 6 Ket
+ 28 6 Cond
+ 30 1 Cond ref
+ 32 74 Recurse
+ 34 6 Ket
+ 36 6 Cond
+ 38 1 Cond ref
+ 40 74 Recurse
+ 42 6 Ket
+ 44 6 Cond
+ 46 1 Cond ref
+ 48 74 Recurse
+ 50 6 Ket
+ 52 6 Cond
+ 54 1 Cond ref
+ 56 74 Recurse
+ 58 6 Ket
+ 60 10 SBraPos
+ 62 6 SCond
+ 64 1 Cond ref
+ 66 74 Recurse
+ 68 6 Ket
+ 70 10 KetRpos
+ 72 70 Ket
+ 74 3 CBra 1
+ 77 3 Ket
+ 79 79 Ket
+ 81 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcd
+ 0:
+ 1:
+
+/(?(1)|a(?1)b){2,}+()/debug
+------------------------------------------------------------------
+ 0 43 Bra
+ 2 34 Once
+ 4 4 Cond
+ 6 1 Cond ref
+ 8 8 Alt
+ 10 a
+ 12 38 Recurse
+ 14 b
+ 16 12 Ket
+ 18 16 SBraPos
+ 20 4 SCond
+ 22 1 Cond ref
+ 24 8 Alt
+ 26 a
+ 28 38 Recurse
+ 30 b
+ 32 12 Ket
+ 34 16 KetRpos
+ 36 34 Ket
+ 38 3 CBra 1
+ 41 3 Ket
+ 43 43 Ket
+ 45 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcde
+No match
+
+/((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
+------------------------------------------------------------------
+ 0 133 Bra
+ 2 41 CBra 1
+ 5 2 Recurse
+ 7 88 Recurse
+ 9 93 Recurse
+ 11 98 Recurse
+ 13 103 Recurse
+ 15 108 Recurse
+ 17 113 Recurse
+ 19 118 Recurse
+ 21 123 Recurse
+ 23 123 Recurse
+ 25 118 Recurse
+ 27 113 Recurse
+ 29 108 Recurse
+ 31 103 Recurse
+ 33 98 Recurse
+ 35 93 Recurse
+ 37 88 Recurse
+ 39 2 Recurse
+ 41 0 Recurse
+ 43 41 Ket
+ 45 41 SCBra 1
+ 48 2 Recurse
+ 50 88 Recurse
+ 52 93 Recurse
+ 54 98 Recurse
+ 56 103 Recurse
+ 58 108 Recurse
+ 60 113 Recurse
+ 62 118 Recurse
+ 64 123 Recurse
+ 66 123 Recurse
+ 68 118 Recurse
+ 70 113 Recurse
+ 72 108 Recurse
+ 74 103 Recurse
+ 76 98 Recurse
+ 78 93 Recurse
+ 80 88 Recurse
+ 82 2 Recurse
+ 84 0 Recurse
+ 86 41 KetRmax
+ 88 3 CBra 2
+ 91 3 Ket
+ 93 3 CBra 3
+ 96 3 Ket
+ 98 3 CBra 4
+101 3 Ket
+103 3 CBra 5
+106 3 Ket
+108 3 CBra 6
+111 3 Ket
+113 3 CBra 7
+116 3 Ket
+118 3 CBra 8
+121 3 Ket
+123 3 CBra 9
+126 3 Ket
+128 3 CBra 10
+131 3 Ket
+133 133 Ket
+135 End
+------------------------------------------------------------------
+Capturing subpattern count = 10
+May match empty string
+Subject length lower bound = 0
+
+# End of testinput8
diff --git a/testdata/testoutput8-8 b/testdata/testoutput8-8-2
index 0500554..6a9aa0a 100644
--- a/testdata/testoutput8-8
+++ b/testdata/testoutput8-8-2
@@ -1,9 +1,11 @@
-# These are a few representative patterns whose lengths and offsets are to be
-# shown when the link size is 2. This is just a doublecheck test to ensure the
-# sizes don't go horribly wrong when something is changed. The pattern contents
-# are all themselves checked in other tests. Unicode, including property
-# support, is required for these tests. There are separate output files for
-# each code unit size.
+# There are two sorts of patterns in this test. A number of them are
+# representative patterns whose lengths and offsets are checked. This is just a
+# doublecheck test to ensure the sizes don't go horribly wrong when something
+# is changed. The operation of these patterns is checked in other tests.
+#
+# This file also contains tests whose output varies with code unit size and/or
+# link size. Unicode support is required for these tests. There are separate
+# output files for each code unit size and link size.
#pattern fullbincode,memory
@@ -379,7 +381,7 @@ Options: utf
First code unit = 'A'
Last code unit = '.'
Subject length lower bound = 4
-
+
/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
Memory allocation (code space): 19
------------------------------------------------------------------
@@ -843,8 +845,8 @@ Memory allocation (code space): 10
# Check the absolute limit on nesting (?| etc. This varies with code unit
# width because the workspace is a different number of bytes. It will fail
-# in 8-bit and 16-bit but not in 32-bit.
-
+# with link size 2 in 8-bit and 16-bit but not in 32-bit.
+
/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
/parens_nest_limit=1000,-fullbincode
@@ -852,13 +854,23 @@ Failed: error 184 at offset 1540: (?| and/or (?J: or (?x: parentheses are too de
# Use "expand" to create some very long patterns with nested parentheses, in
# order to test workspace overflow. Again, this varies with code unit width,
-# and even with it fails in two modes, the error offset differs.
+# and even with it fails in two modes, the error offset differs. It also varies
+# with link size - hence multiple tests with different values.
/(?'ABC'\[[bar](]{105}*THEN:\[A]{255}\[)]{106}/expand,-fullbincode
/(?'ABC'\[[bar](]{106}*THEN:\[A]{255}\[)]{107}/expand,-fullbincode
Failed: error 186 at offset 637: regular expression is too complicated
+/(?'ABC'\[[bar](]{159}*THEN:\[A]{255}\[)]{160}/expand,-fullbincode
+Failed: error 186 at offset 637: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{199}*THEN:\[A]{255}\[)]{200}/expand,-fullbincode
+Failed: error 186 at offset 637: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{299}*THEN:\[A]{255}\[)]{300}/expand,-fullbincode
+Failed: error 186 at offset 637: regular expression is too complicated
+
/(?(1)(?1)){8,}+()/debug
------------------------------------------------------------------
0 119 Bra
diff --git a/testdata/testoutput8-8-3 b/testdata/testoutput8-8-3
new file mode 100644
index 0000000..2fe1168
--- /dev/null
+++ b/testdata/testoutput8-8-3
@@ -0,0 +1,1027 @@
+# There are two sorts of patterns in this test. A number of them are
+# representative patterns whose lengths and offsets are checked. This is just a
+# doublecheck test to ensure the sizes don't go horribly wrong when something
+# is changed. The operation of these patterns is checked in other tests.
+#
+# This file also contains tests whose output varies with code unit size and/or
+# link size. Unicode support is required for these tests. There are separate
+# output files for each code unit size and link size.
+
+#pattern fullbincode,memory
+
+/((?i)b)/
+Memory allocation (code space): 21
+------------------------------------------------------------------
+ 0 16 Bra
+ 4 8 CBra 1
+ 10 /i b
+ 12 8 Ket
+ 16 16 Ket
+ 20 End
+------------------------------------------------------------------
+
+/(?s)(.*X|^B)/
+Memory allocation (code space): 30
+------------------------------------------------------------------
+ 0 25 Bra
+ 4 10 CBra 1
+ 10 AllAny*
+ 12 X
+ 14 7 Alt
+ 18 ^
+ 19 B
+ 21 17 Ket
+ 25 25 Ket
+ 29 End
+------------------------------------------------------------------
+
+/(?s:.*X|^B)/
+Memory allocation (code space): 28
+------------------------------------------------------------------
+ 0 23 Bra
+ 4 8 Bra
+ 8 AllAny*
+ 10 X
+ 12 7 Alt
+ 16 ^
+ 17 B
+ 19 15 Ket
+ 23 23 Ket
+ 27 End
+------------------------------------------------------------------
+
+/^[[:alnum:]]/
+Memory allocation (code space): 43
+------------------------------------------------------------------
+ 0 38 Bra
+ 4 ^
+ 5 [0-9A-Za-z]
+ 38 38 Ket
+ 42 End
+------------------------------------------------------------------
+
+/#/Ix
+Memory allocation (code space): 9
+------------------------------------------------------------------
+ 0 4 Bra
+ 4 4 Ket
+ 8 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+May match empty string
+Options: extended
+Subject length lower bound = 0
+
+/a#/Ix
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 6 Bra
+ 4 a
+ 6 6 Ket
+ 10 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: extended
+First code unit = 'a'
+Subject length lower bound = 1
+
+/x?+/
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 6 Bra
+ 4 x?+
+ 6 6 Ket
+ 10 End
+------------------------------------------------------------------
+
+/x++/
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 6 Bra
+ 4 x++
+ 6 6 Ket
+ 10 End
+------------------------------------------------------------------
+
+/x{1,3}+/
+Memory allocation (code space): 15
+------------------------------------------------------------------
+ 0 10 Bra
+ 4 x
+ 6 x{0,2}+
+ 10 10 Ket
+ 14 End
+------------------------------------------------------------------
+
+/(x)*+/
+Memory allocation (code space): 22
+------------------------------------------------------------------
+ 0 17 Bra
+ 4 Braposzero
+ 5 8 CBraPos 1
+ 11 x
+ 13 8 KetRpos
+ 17 17 Ket
+ 21 End
+------------------------------------------------------------------
+
+/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
+Memory allocation (code space): 132
+------------------------------------------------------------------
+ 0 127 Bra
+ 4 ^
+ 5 118 CBra 1
+ 11 8 CBra 2
+ 17 a+
+ 19 8 Ket
+ 23 40 CBra 3
+ 29 [ab]+?
+ 63 40 Ket
+ 67 40 CBra 4
+ 73 [bc]+
+107 40 Ket
+111 8 CBra 5
+117 \w*+
+119 8 Ket
+123 118 Ket
+127 127 Ket
+131 End
+------------------------------------------------------------------
+
+"8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 828
+------------------------------------------------------------------
+ 0 823 Bra
+ 4 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+822 \b
+823 823 Ket
+827 End
+------------------------------------------------------------------
+
+"\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 818
+------------------------------------------------------------------
+ 0 813 Bra
+ 4 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+812 \b
+813 813 Ket
+817 End
+------------------------------------------------------------------
+
+/(a(?1)b)/
+Memory allocation (code space): 27
+------------------------------------------------------------------
+ 0 22 Bra
+ 4 14 CBra 1
+ 10 a
+ 12 4 Recurse
+ 16 b
+ 18 14 Ket
+ 22 22 Ket
+ 26 End
+------------------------------------------------------------------
+
+/(a(?1)+b)/
+Memory allocation (code space): 35
+------------------------------------------------------------------
+ 0 30 Bra
+ 4 22 CBra 1
+ 10 a
+ 12 8 Once
+ 16 4 Recurse
+ 20 8 KetRmax
+ 24 b
+ 26 22 Ket
+ 30 30 Ket
+ 34 End
+------------------------------------------------------------------
+
+/a(?P<name1>b|c)d(?P<longername2>e)/
+Memory allocation (code space): 43
+------------------------------------------------------------------
+ 0 38 Bra
+ 4 a
+ 6 8 CBra 1
+ 12 b
+ 14 6 Alt
+ 18 c
+ 20 14 Ket
+ 24 d
+ 26 8 CBra 2
+ 32 e
+ 34 8 Ket
+ 38 38 Ket
+ 42 End
+------------------------------------------------------------------
+
+/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/
+Memory allocation (code space): 55
+------------------------------------------------------------------
+ 0 50 Bra
+ 4 30 Bra
+ 8 a
+ 10 20 CBra 1
+ 16 c
+ 18 8 CBra 2
+ 24 d
+ 26 8 Ket
+ 30 20 Ket
+ 34 30 Ket
+ 38 8 CBra 3
+ 44 a
+ 46 8 Ket
+ 50 50 Ket
+ 54 End
+------------------------------------------------------------------
+
+/(?P<a>a)...(?P=a)bbb(?P>a)d/
+Memory allocation (code space): 39
+------------------------------------------------------------------
+ 0 34 Bra
+ 4 8 CBra 1
+ 10 a
+ 12 8 Ket
+ 16 Any
+ 17 Any
+ 18 Any
+ 19 \1
+ 22 bbb
+ 28 4 Recurse
+ 32 d
+ 34 34 Ket
+ 38 End
+------------------------------------------------------------------
+
+/abc(?C255)de(?C)f/
+Memory allocation (code space): 37
+------------------------------------------------------------------
+ 0 32 Bra
+ 4 abc
+ 10 Callout 255 10 1
+ 18 de
+ 22 Callout 0 16 1
+ 30 f
+ 32 32 Ket
+ 36 End
+------------------------------------------------------------------
+
+/abcde/auto_callout
+Memory allocation (code space): 67
+------------------------------------------------------------------
+ 0 62 Bra
+ 4 Callout 255 0 1
+ 12 a
+ 14 Callout 255 1 1
+ 22 b
+ 24 Callout 255 2 1
+ 32 c
+ 34 Callout 255 3 1
+ 42 d
+ 44 Callout 255 4 1
+ 52 e
+ 54 Callout 255 5 0
+ 62 62 Ket
+ 66 End
+------------------------------------------------------------------
+
+/\x{100}/utf
+Memory allocation (code space): 12
+------------------------------------------------------------------
+ 0 7 Bra
+ 4 \x{100}
+ 7 7 Ket
+ 11 End
+------------------------------------------------------------------
+
+/\x{1000}/utf
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 8 Bra
+ 4 \x{1000}
+ 8 8 Ket
+ 12 End
+------------------------------------------------------------------
+
+/\x{10000}/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 9 Bra
+ 4 \x{10000}
+ 9 9 Ket
+ 13 End
+------------------------------------------------------------------
+
+/\x{100000}/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 9 Bra
+ 4 \x{100000}
+ 9 9 Ket
+ 13 End
+------------------------------------------------------------------
+
+/\x{10ffff}/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 9 Bra
+ 4 \x{10ffff}
+ 9 9 Ket
+ 13 End
+------------------------------------------------------------------
+
+/\x{110000}/utf
+Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
+
+/[\x{ff}]/utf
+Memory allocation (code space): 12
+------------------------------------------------------------------
+ 0 7 Bra
+ 4 \x{ff}
+ 7 7 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[\x{100}]/utf
+Memory allocation (code space): 12
+------------------------------------------------------------------
+ 0 7 Bra
+ 4 \x{100}
+ 7 7 Ket
+ 11 End
+------------------------------------------------------------------
+
+/\x80/utf
+Memory allocation (code space): 12
+------------------------------------------------------------------
+ 0 7 Bra
+ 4 \x{80}
+ 7 7 Ket
+ 11 End
+------------------------------------------------------------------
+
+/\xff/utf
+Memory allocation (code space): 12
+------------------------------------------------------------------
+ 0 7 Bra
+ 4 \x{ff}
+ 7 7 Ket
+ 11 End
+------------------------------------------------------------------
+
+/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
+Memory allocation (code space): 20
+------------------------------------------------------------------
+ 0 15 Bra
+ 4 A\x{2262}\x{391}.
+ 15 15 Ket
+ 19 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = 'A'
+Last code unit = '.'
+Subject length lower bound = 4
+
+/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
+Memory allocation (code space): 21
+------------------------------------------------------------------
+ 0 16 Bra
+ 4 \x{d55c}\x{ad6d}\x{c5b4}
+ 16 16 Ket
+ 20 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \xed
+Last code unit = \xb4
+Subject length lower bound = 3
+
+/\x{65e5}\x{672c}\x{8a9e}/I,utf
+Memory allocation (code space): 21
+------------------------------------------------------------------
+ 0 16 Bra
+ 4 \x{65e5}\x{672c}\x{8a9e}
+ 16 16 Ket
+ 20 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \xe6
+Last code unit = \x9e
+Subject length lower bound = 3
+
+/[\x{100}]/utf
+Memory allocation (code space): 12
+------------------------------------------------------------------
+ 0 7 Bra
+ 4 \x{100}
+ 7 7 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[Z\x{100}]/utf
+Memory allocation (code space): 50
+------------------------------------------------------------------
+ 0 45 Bra
+ 4 [Z\x{100}]
+ 45 45 Ket
+ 49 End
+------------------------------------------------------------------
+
+/^[\x{100}\E-\Q\E\x{150}]/utf
+Memory allocation (code space): 21
+------------------------------------------------------------------
+ 0 16 Bra
+ 4 ^
+ 5 [\x{100}-\x{150}]
+ 16 16 Ket
+ 20 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E]/utf
+Memory allocation (code space): 21
+------------------------------------------------------------------
+ 0 16 Bra
+ 4 ^
+ 5 [\x{100}-\x{150}]
+ 16 16 Ket
+ 20 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E/utf
+Failed: error 106 at offset 15: missing terminating ] for character class
+
+/[\p{L}]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 13 Bra
+ 4 [\p{L}]
+ 13 13 Ket
+ 17 End
+------------------------------------------------------------------
+
+/[\p{^L}]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 13 Bra
+ 4 [\P{L}]
+ 13 13 Ket
+ 17 End
+------------------------------------------------------------------
+
+/[\P{L}]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 13 Bra
+ 4 [\P{L}]
+ 13 13 Ket
+ 17 End
+------------------------------------------------------------------
+
+/[\P{^L}]/
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 13 Bra
+ 4 [\p{L}]
+ 13 13 Ket
+ 17 End
+------------------------------------------------------------------
+
+/[abc\p{L}\x{0660}]/utf
+Memory allocation (code space): 53
+------------------------------------------------------------------
+ 0 48 Bra
+ 4 [a-c\p{L}\x{660}]
+ 48 48 Ket
+ 52 End
+------------------------------------------------------------------
+
+/[\p{Nd}]/utf
+Memory allocation (code space): 18
+------------------------------------------------------------------
+ 0 13 Bra
+ 4 [\p{Nd}]
+ 13 13 Ket
+ 17 End
+------------------------------------------------------------------
+
+/[\p{Nd}+-]+/utf
+Memory allocation (code space): 51
+------------------------------------------------------------------
+ 0 46 Bra
+ 4 [+\-\p{Nd}]++
+ 46 46 Ket
+ 50 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
+Memory allocation (code space): 27
+------------------------------------------------------------------
+ 0 22 Bra
+ 4 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 22 22 Ket
+ 26 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
+Memory allocation (code space): 27
+------------------------------------------------------------------
+ 0 22 Bra
+ 4 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 22 22 Ket
+ 26 End
+------------------------------------------------------------------
+
+/[\x{105}-\x{109}]/i,utf
+Memory allocation (code space): 20
+------------------------------------------------------------------
+ 0 15 Bra
+ 4 [\x{104}-\x{109}]
+ 15 15 Ket
+ 19 End
+------------------------------------------------------------------
+
+/( ( (?(1)0|) )* )/x
+Memory allocation (code space): 47
+------------------------------------------------------------------
+ 0 42 Bra
+ 4 34 CBra 1
+ 10 Brazero
+ 11 23 SCBra 2
+ 17 9 Cond
+ 21 1 Cond ref
+ 24 0
+ 26 4 Alt
+ 30 13 Ket
+ 34 23 KetRmax
+ 38 34 Ket
+ 42 42 Ket
+ 46 End
+------------------------------------------------------------------
+
+/( (?(1)0|)* )/x
+Memory allocation (code space): 37
+------------------------------------------------------------------
+ 0 32 Bra
+ 4 24 CBra 1
+ 10 Brazero
+ 11 9 SCond
+ 15 1 Cond ref
+ 18 0
+ 20 4 Alt
+ 24 13 KetRmax
+ 28 24 Ket
+ 32 32 Ket
+ 36 End
+------------------------------------------------------------------
+
+/[a]/
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 6 Bra
+ 4 a
+ 6 6 Ket
+ 10 End
+------------------------------------------------------------------
+
+/[a]/utf
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 6 Bra
+ 4 a
+ 6 6 Ket
+ 10 End
+------------------------------------------------------------------
+
+/[\xaa]/
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 6 Bra
+ 4 \x{aa}
+ 6 6 Ket
+ 10 End
+------------------------------------------------------------------
+
+/[\xaa]/utf
+Memory allocation (code space): 12
+------------------------------------------------------------------
+ 0 7 Bra
+ 4 \x{aa}
+ 7 7 Ket
+ 11 End
+------------------------------------------------------------------
+
+/[^a]/
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 6 Bra
+ 4 [^a]
+ 6 6 Ket
+ 10 End
+------------------------------------------------------------------
+
+/[^a]/utf
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 6 Bra
+ 4 [^a]
+ 6 6 Ket
+ 10 End
+------------------------------------------------------------------
+
+/[^\xaa]/
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 6 Bra
+ 4 [^\x{aa}]
+ 6 6 Ket
+ 10 End
+------------------------------------------------------------------
+
+/[^\xaa]/utf
+Memory allocation (code space): 12
+------------------------------------------------------------------
+ 0 7 Bra
+ 4 [^\x{aa}]
+ 7 7 Ket
+ 11 End
+------------------------------------------------------------------
+
+#pattern -memory
+
+/[^\d]/utf,ucp
+------------------------------------------------------------------
+ 0 13 Bra
+ 4 [^\p{Nd}]
+ 13 13 Ket
+ 17 End
+------------------------------------------------------------------
+
+/[[:^alpha:][:^cntrl:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 17 Bra
+ 4 [\P{L}\P{Cc}]++
+ 17 17 Ket
+ 21 End
+------------------------------------------------------------------
+
+/[[:^cntrl:][:^alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 17 Bra
+ 4 [\P{Cc}\P{L}]++
+ 17 17 Ket
+ 21 End
+------------------------------------------------------------------
+
+/[[:alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 14 Bra
+ 4 [\p{L}]++
+ 14 14 Ket
+ 18 End
+------------------------------------------------------------------
+
+/[[:^alpha:]\S]+/utf,ucp
+------------------------------------------------------------------
+ 0 17 Bra
+ 4 [\P{L}\P{Xsp}]++
+ 17 17 Ket
+ 21 End
+------------------------------------------------------------------
+
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/
+------------------------------------------------------------------
+ 0 83 Bra
+ 4 abc
+ 10 8 CBra 1
+ 16 d
+ 18 6 Alt
+ 22 e
+ 24 14 Ket
+ 28 *THEN
+ 29 x
+ 31 15 CBra 2
+ 37 123
+ 43 *THEN
+ 44 4
+ 46 33 Alt
+ 50 567
+ 56 8 CBra 3
+ 62 b
+ 64 6 Alt
+ 68 q
+ 70 14 Ket
+ 74 *THEN
+ 75 xx
+ 79 48 Ket
+ 83 83 Ket
+ 87 End
+------------------------------------------------------------------
+
+/(((a\2)|(a*)\g<-1>))*a?/
+------------------------------------------------------------------
+ 0 70 Bra
+ 4 Brazero
+ 5 59 SCBra 1
+ 11 49 Once
+ 15 21 CBra 2
+ 21 11 CBra 3
+ 27 a
+ 29 \2
+ 32 11 Ket
+ 36 20 Alt
+ 40 8 CBra 4
+ 46 a*
+ 48 8 Ket
+ 52 40 Recurse
+ 56 41 Ket
+ 60 49 Ket
+ 64 59 KetRmax
+ 68 a?+
+ 70 70 Ket
+ 74 End
+------------------------------------------------------------------
+
+/((?+1)(\1))/
+------------------------------------------------------------------
+ 0 39 Bra
+ 4 31 Once
+ 8 23 CBra 1
+ 14 18 Recurse
+ 18 9 CBra 2
+ 24 \1
+ 27 9 Ket
+ 31 23 Ket
+ 35 31 Ket
+ 39 39 Ket
+ 43 End
+------------------------------------------------------------------
+
+"(?1)(?#?'){2}(a)"
+------------------------------------------------------------------
+ 0 40 Bra
+ 4 8 Once
+ 8 28 Recurse
+ 12 8 Ket
+ 16 8 Once
+ 20 28 Recurse
+ 24 8 Ket
+ 28 8 CBra 1
+ 34 a
+ 36 8 Ket
+ 40 40 Ket
+ 44 End
+------------------------------------------------------------------
+
+/.((?2)(?R)|\1|$)()/
+------------------------------------------------------------------
+ 0 53 Bra
+ 4 Any
+ 5 34 Once
+ 9 14 CBra 1
+ 15 43 Recurse
+ 19 0 Recurse
+ 23 7 Alt
+ 27 \1
+ 30 5 Alt
+ 34 $
+ 35 26 Ket
+ 39 34 Ket
+ 43 6 CBra 2
+ 49 6 Ket
+ 53 53 Ket
+ 57 End
+------------------------------------------------------------------
+
+/.((?3)(?R)()(?2)|\1|$)()/
+------------------------------------------------------------------
+ 0 67 Bra
+ 4 Any
+ 5 48 Once
+ 9 28 CBra 1
+ 15 57 Recurse
+ 19 0 Recurse
+ 23 6 CBra 2
+ 29 6 Ket
+ 33 23 Recurse
+ 37 7 Alt
+ 41 \1
+ 44 5 Alt
+ 48 $
+ 49 40 Ket
+ 53 48 Ket
+ 57 6 CBra 3
+ 63 6 Ket
+ 67 67 Ket
+ 71 End
+------------------------------------------------------------------
+
+/(?1)()((((((\1++))\x85)+)|))/
+------------------------------------------------------------------
+ 0 96 Bra
+ 4 8 Recurse
+ 8 6 CBra 1
+ 14 6 Ket
+ 18 74 CBra 2
+ 24 60 CBra 3
+ 30 50 CBra 4
+ 36 40 CBra 5
+ 42 28 CBra 6
+ 48 18 CBra 7
+ 54 8 Once
+ 58 \1+
+ 62 8 Ket
+ 66 18 Ket
+ 70 28 Ket
+ 74 \x{85}
+ 76 40 KetRmax
+ 80 50 Ket
+ 84 4 Alt
+ 88 64 Ket
+ 92 74 Ket
+ 96 96 Ket
+100 End
+------------------------------------------------------------------
+
+# Check the absolute limit on nesting (?| etc. This varies with code unit
+# width because the workspace is a different number of bytes. It will fail
+# with link size 2 in 8-bit and 16-bit but not in 32-bit.
+
+/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+/parens_nest_limit=1000,-fullbincode
+
+# Use "expand" to create some very long patterns with nested parentheses, in
+# order to test workspace overflow. Again, this varies with code unit width,
+# and even with it fails in two modes, the error offset differs. It also varies
+# with link size - hence multiple tests with different values.
+
+/(?'ABC'\[[bar](]{105}*THEN:\[A]{255}\[)]{106}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{106}*THEN:\[A]{255}\[)]{107}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{159}*THEN:\[A]{255}\[)]{160}/expand,-fullbincode
+Failed: error 186 at offset 936: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{199}*THEN:\[A]{255}\[)]{200}/expand,-fullbincode
+Failed: error 186 at offset 936: regular expression is too complicated
+
+/(?'ABC'\[[bar](]{299}*THEN:\[A]{255}\[)]{300}/expand,-fullbincode
+Failed: error 186 at offset 936: regular expression is too complicated
+
+/(?(1)(?1)){8,}+()/debug
+------------------------------------------------------------------
+ 0 150 Bra
+ 4 132 Once
+ 8 11 Cond
+ 12 1 Cond ref
+ 15 140 Recurse
+ 19 11 Ket
+ 23 11 Cond
+ 27 1 Cond ref
+ 30 140 Recurse
+ 34 11 Ket
+ 38 11 Cond
+ 42 1 Cond ref
+ 45 140 Recurse
+ 49 11 Ket
+ 53 11 Cond
+ 57 1 Cond ref
+ 60 140 Recurse
+ 64 11 Ket
+ 68 11 Cond
+ 72 1 Cond ref
+ 75 140 Recurse
+ 79 11 Ket
+ 83 11 Cond
+ 87 1 Cond ref
+ 90 140 Recurse
+ 94 11 Ket
+ 98 11 Cond
+102 1 Cond ref
+105 140 Recurse
+109 11 Ket
+113 19 SBraPos
+117 11 SCond
+121 1 Cond ref
+124 140 Recurse
+128 11 Ket
+132 19 KetRpos
+136 132 Ket
+140 6 CBra 1
+146 6 Ket
+150 150 Ket
+154 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcd
+ 0:
+ 1:
+
+/(?(1)|a(?1)b){2,}+()/debug
+------------------------------------------------------------------
+ 0 76 Bra
+ 4 58 Once
+ 8 7 Cond
+ 12 1 Cond ref
+ 15 12 Alt
+ 19 a
+ 21 66 Recurse
+ 25 b
+ 27 19 Ket
+ 31 27 SBraPos
+ 35 7 SCond
+ 39 1 Cond ref
+ 42 12 Alt
+ 46 a
+ 48 66 Recurse
+ 52 b
+ 54 19 Ket
+ 58 27 KetRpos
+ 62 58 Ket
+ 66 6 CBra 1
+ 72 6 Ket
+ 76 76 Ket
+ 80 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcde
+No match
+
+/((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
+------------------------------------------------------------------
+ 0 266 Bra
+ 4 82 CBra 1
+ 10 4 Recurse
+ 14 176 Recurse
+ 18 186 Recurse
+ 22 196 Recurse
+ 26 206 Recurse
+ 30 216 Recurse
+ 34 226 Recurse
+ 38 236 Recurse
+ 42 246 Recurse
+ 46 246 Recurse
+ 50 236 Recurse
+ 54 226 Recurse
+ 58 216 Recurse
+ 62 206 Recurse
+ 66 196 Recurse
+ 70 186 Recurse
+ 74 176 Recurse
+ 78 4 Recurse
+ 82 0 Recurse
+ 86 82 Ket
+ 90 82 SCBra 1
+ 96 4 Recurse
+100 176 Recurse
+104 186 Recurse
+108 196 Recurse
+112 206 Recurse
+116 216 Recurse
+120 226 Recurse
+124 236 Recurse
+128 246 Recurse
+132 246 Recurse
+136 236 Recurse
+140 226 Recurse
+144 216 Recurse
+148 206 Recurse
+152 196 Recurse
+156 186 Recurse
+160 176 Recurse
+164 4 Recurse
+168 0 Recurse
+172 82 KetRmax
+176 6 CBra 2
+182 6 Ket
+186 6 CBra 3
+192 6 Ket
+196 6 CBra 4
+202 6 Ket
+206 6 CBra 5
+212 6 Ket
+216 6 CBra 6
+222 6 Ket
+226 6 CBra 7
+232 6 Ket
+236 6 CBra 8
+242 6 Ket
+246 6 CBra 9
+252 6 Ket
+256 6 CBra 10
+262 6 Ket
+266 266 Ket
+270 End
+------------------------------------------------------------------
+Capturing subpattern count = 10
+May match empty string
+Subject length lower bound = 0
+
+# End of testinput8
diff --git a/testdata/testoutput8-8-4 b/testdata/testoutput8-8-4
new file mode 100644
index 0000000..91993b2
--- /dev/null
+++ b/testdata/testoutput8-8-4
@@ -0,0 +1,1025 @@
+# There are two sorts of patterns in this test. A number of them are
+# representative patterns whose lengths and offsets are checked. This is just a
+# doublecheck test to ensure the sizes don't go horribly wrong when something
+# is changed. The operation of these patterns is checked in other tests.
+#
+# This file also contains tests whose output varies with code unit size and/or
+# link size. Unicode support is required for these tests. There are separate
+# output files for each code unit size and link size.
+
+#pattern fullbincode,memory
+
+/((?i)b)/
+Memory allocation (code space): 25
+------------------------------------------------------------------
+ 0 19 Bra
+ 5 9 CBra 1
+ 12 /i b
+ 14 9 Ket
+ 19 19 Ket
+ 24 End
+------------------------------------------------------------------
+
+/(?s)(.*X|^B)/
+Memory allocation (code space): 35
+------------------------------------------------------------------
+ 0 29 Bra
+ 5 11 CBra 1
+ 12 AllAny*
+ 14 X
+ 16 8 Alt
+ 21 ^
+ 22 B
+ 24 19 Ket
+ 29 29 Ket
+ 34 End
+------------------------------------------------------------------
+
+/(?s:.*X|^B)/
+Memory allocation (code space): 33
+------------------------------------------------------------------
+ 0 27 Bra
+ 5 9 Bra
+ 10 AllAny*
+ 12 X
+ 14 8 Alt
+ 19 ^
+ 20 B
+ 22 17 Ket
+ 27 27 Ket
+ 32 End
+------------------------------------------------------------------
+
+/^[[:alnum:]]/
+Memory allocation (code space): 45
+------------------------------------------------------------------
+ 0 39 Bra
+ 5 ^
+ 6 [0-9A-Za-z]
+ 39 39 Ket
+ 44 End
+------------------------------------------------------------------
+
+/#/Ix
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 5 Bra
+ 5 5 Ket
+ 10 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+May match empty string
+Options: extended
+Subject length lower bound = 0
+
+/a#/Ix
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 7 Bra
+ 5 a
+ 7 7 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: extended
+First code unit = 'a'
+Subject length lower bound = 1
+
+/x?+/
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 7 Bra
+ 5 x?+
+ 7 7 Ket
+ 12 End
+------------------------------------------------------------------
+
+/x++/
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 7 Bra
+ 5 x++
+ 7 7 Ket
+ 12 End
+------------------------------------------------------------------
+
+/x{1,3}+/
+Memory allocation (code space): 17
+------------------------------------------------------------------
+ 0 11 Bra
+ 5 x
+ 7 x{0,2}+
+ 11 11 Ket
+ 16 End
+------------------------------------------------------------------
+
+/(x)*+/
+Memory allocation (code space): 26
+------------------------------------------------------------------
+ 0 20 Bra
+ 5 Braposzero
+ 6 9 CBraPos 1
+ 13 x
+ 15 9 KetRpos
+ 20 20 Ket
+ 25 End
+------------------------------------------------------------------
+
+/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
+Memory allocation (code space): 144
+------------------------------------------------------------------
+ 0 138 Bra
+ 5 ^
+ 6 127 CBra 1
+ 13 9 CBra 2
+ 20 a+
+ 22 9 Ket
+ 27 41 CBra 3
+ 34 [ab]+?
+ 68 41 Ket
+ 73 41 CBra 4
+ 80 [bc]+
+114 41 Ket
+119 9 CBra 5
+126 \w*+
+128 9 Ket
+133 127 Ket
+138 138 Ket
+143 End
+------------------------------------------------------------------
+
+"8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 830
+------------------------------------------------------------------
+ 0 824 Bra
+ 5 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+823 \b
+824 824 Ket
+829 End
+------------------------------------------------------------------
+
+"\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
+Memory allocation (code space): 820
+------------------------------------------------------------------
+ 0 814 Bra
+ 5 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+813 \b
+814 814 Ket
+819 End
+------------------------------------------------------------------
+
+/(a(?1)b)/
+Memory allocation (code space): 32
+------------------------------------------------------------------
+ 0 26 Bra
+ 5 16 CBra 1
+ 12 a
+ 14 5 Recurse
+ 19 b
+ 21 16 Ket
+ 26 26 Ket
+ 31 End
+------------------------------------------------------------------
+
+/(a(?1)+b)/
+Memory allocation (code space): 42
+------------------------------------------------------------------
+ 0 36 Bra
+ 5 26 CBra 1
+ 12 a
+ 14 10 Once
+ 19 5 Recurse
+ 24 10 KetRmax
+ 29 b
+ 31 26 Ket
+ 36 36 Ket
+ 41 End
+------------------------------------------------------------------
+
+/a(?P<name1>b|c)d(?P<longername2>e)/
+Memory allocation (code space): 50
+------------------------------------------------------------------
+ 0 44 Bra
+ 5 a
+ 7 9 CBra 1
+ 14 b
+ 16 7 Alt
+ 21 c
+ 23 16 Ket
+ 28 d
+ 30 9 CBra 2
+ 37 e
+ 39 9 Ket
+ 44 44 Ket
+ 49 End
+------------------------------------------------------------------
+
+/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/
+Memory allocation (code space): 65
+------------------------------------------------------------------
+ 0 59 Bra
+ 5 35 Bra
+ 10 a
+ 12 23 CBra 1
+ 19 c
+ 21 9 CBra 2
+ 28 d
+ 30 9 Ket
+ 35 23 Ket
+ 40 35 Ket
+ 45 9 CBra 3
+ 52 a
+ 54 9 Ket
+ 59 59 Ket
+ 64 End
+------------------------------------------------------------------
+
+/(?P<a>a)...(?P=a)bbb(?P>a)d/
+Memory allocation (code space): 44
+------------------------------------------------------------------
+ 0 38 Bra
+ 5 9 CBra 1
+ 12 a
+ 14 9 Ket
+ 19 Any
+ 20 Any
+ 21 Any
+ 22 \1
+ 25 bbb
+ 31 5 Recurse
+ 36 d
+ 38 38 Ket
+ 43 End
+------------------------------------------------------------------
+
+/abc(?C255)de(?C)f/
+Memory allocation (code space): 43
+------------------------------------------------------------------
+ 0 37 Bra
+ 5 abc
+ 11 Callout 255 10 1
+ 21 de
+ 25 Callout 0 16 1
+ 35 f
+ 37 37 Ket
+ 42 End
+------------------------------------------------------------------
+
+/abcde/auto_callout
+Memory allocation (code space): 81
+------------------------------------------------------------------
+ 0 75 Bra
+ 5 Callout 255 0 1
+ 15 a
+ 17 Callout 255 1 1
+ 27 b
+ 29 Callout 255 2 1
+ 39 c
+ 41 Callout 255 3 1
+ 51 d
+ 53 Callout 255 4 1
+ 63 e
+ 65 Callout 255 5 0
+ 75 75 Ket
+ 80 End
+------------------------------------------------------------------
+
+/\x{100}/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 8 Bra
+ 5 \x{100}
+ 8 8 Ket
+ 13 End
+------------------------------------------------------------------
+
+/\x{1000}/utf
+Memory allocation (code space): 15
+------------------------------------------------------------------
+ 0 9 Bra
+ 5 \x{1000}
+ 9 9 Ket
+ 14 End
+------------------------------------------------------------------
+
+/\x{10000}/utf
+Memory allocation (code space): 16
+------------------------------------------------------------------
+ 0 10 Bra
+ 5 \x{10000}
+ 10 10 Ket
+ 15 End
+------------------------------------------------------------------
+
+/\x{100000}/utf
+Memory allocation (code space): 16
+------------------------------------------------------------------
+ 0 10 Bra
+ 5 \x{100000}
+ 10 10 Ket
+ 15 End
+------------------------------------------------------------------
+
+/\x{10ffff}/utf
+Memory allocation (code space): 16
+------------------------------------------------------------------
+ 0 10 Bra
+ 5 \x{10ffff}
+ 10 10 Ket
+ 15 End
+------------------------------------------------------------------
+
+/\x{110000}/utf
+Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
+
+/[\x{ff}]/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 8 Bra
+ 5 \x{ff}
+ 8 8 Ket
+ 13 End
+------------------------------------------------------------------
+
+/[\x{100}]/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 8 Bra
+ 5 \x{100}
+ 8 8 Ket
+ 13 End
+------------------------------------------------------------------
+
+/\x80/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 8 Bra
+ 5 \x{80}
+ 8 8 Ket
+ 13 End
+------------------------------------------------------------------
+
+/\xff/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 8 Bra
+ 5 \x{ff}
+ 8 8 Ket
+ 13 End
+------------------------------------------------------------------
+
+/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
+Memory allocation (code space): 22
+------------------------------------------------------------------
+ 0 16 Bra
+ 5 A\x{2262}\x{391}.
+ 16 16 Ket
+ 21 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = 'A'
+Last code unit = '.'
+Subject length lower bound = 4
+
+/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
+Memory allocation (code space): 23
+------------------------------------------------------------------
+ 0 17 Bra
+ 5 \x{d55c}\x{ad6d}\x{c5b4}
+ 17 17 Ket
+ 22 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \xed
+Last code unit = \xb4
+Subject length lower bound = 3
+
+/\x{65e5}\x{672c}\x{8a9e}/I,utf
+Memory allocation (code space): 23
+------------------------------------------------------------------
+ 0 17 Bra
+ 5 \x{65e5}\x{672c}\x{8a9e}
+ 17 17 Ket
+ 22 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+First code unit = \xe6
+Last code unit = \x9e
+Subject length lower bound = 3
+
+/[\x{100}]/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 8 Bra
+ 5 \x{100}
+ 8 8 Ket
+ 13 End
+------------------------------------------------------------------
+
+/[Z\x{100}]/utf
+Memory allocation (code space): 53
+------------------------------------------------------------------
+ 0 47 Bra
+ 5 [Z\x{100}]
+ 47 47 Ket
+ 52 End
+------------------------------------------------------------------
+
+/^[\x{100}\E-\Q\E\x{150}]/utf
+Memory allocation (code space): 24
+------------------------------------------------------------------
+ 0 18 Bra
+ 5 ^
+ 6 [\x{100}-\x{150}]
+ 18 18 Ket
+ 23 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E]/utf
+Memory allocation (code space): 24
+------------------------------------------------------------------
+ 0 18 Bra
+ 5 ^
+ 6 [\x{100}-\x{150}]
+ 18 18 Ket
+ 23 End
+------------------------------------------------------------------
+
+/^[\QĀ\E-\QŐ\E/utf
+Failed: error 106 at offset 15: missing terminating ] for character class
+
+/[\p{L}]/
+Memory allocation (code space): 21
+------------------------------------------------------------------
+ 0 15 Bra
+ 5 [\p{L}]
+ 15 15 Ket
+ 20 End
+------------------------------------------------------------------
+
+/[\p{^L}]/
+Memory allocation (code space): 21
+------------------------------------------------------------------
+ 0 15 Bra
+ 5 [\P{L}]
+ 15 15 Ket
+ 20 End
+------------------------------------------------------------------
+
+/[\P{L}]/
+Memory allocation (code space): 21
+------------------------------------------------------------------
+ 0 15 Bra
+ 5 [\P{L}]
+ 15 15 Ket
+ 20 End
+------------------------------------------------------------------
+
+/[\P{^L}]/
+Memory allocation (code space): 21
+------------------------------------------------------------------
+ 0 15 Bra
+ 5 [\p{L}]
+ 15 15 Ket
+ 20 End
+------------------------------------------------------------------
+
+/[abc\p{L}\x{0660}]/utf
+Memory allocation (code space): 56
+------------------------------------------------------------------
+ 0 50 Bra
+ 5 [a-c\p{L}\x{660}]
+ 50 50 Ket
+ 55 End
+------------------------------------------------------------------
+
+/[\p{Nd}]/utf
+Memory allocation (code space): 21
+------------------------------------------------------------------
+ 0 15 Bra
+ 5 [\p{Nd}]
+ 15 15 Ket
+ 20 End
+------------------------------------------------------------------
+
+/[\p{Nd}+-]+/utf
+Memory allocation (code space): 54
+------------------------------------------------------------------
+ 0 48 Bra
+ 5 [+\-\p{Nd}]++
+ 48 48 Ket
+ 53 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
+Memory allocation (code space): 29
+------------------------------------------------------------------
+ 0 23 Bra
+ 5 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 23 23 Ket
+ 28 End
+------------------------------------------------------------------
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
+Memory allocation (code space): 29
+------------------------------------------------------------------
+ 0 23 Bra
+ 5 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 23 23 Ket
+ 28 End
+------------------------------------------------------------------
+
+/[\x{105}-\x{109}]/i,utf
+Memory allocation (code space): 23
+------------------------------------------------------------------
+ 0 17 Bra
+ 5 [\x{104}-\x{109}]
+ 17 17 Ket
+ 22 End
+------------------------------------------------------------------
+
+/( ( (?(1)0|) )* )/x
+Memory allocation (code space): 56
+------------------------------------------------------------------
+ 0 50 Bra
+ 5 40 CBra 1
+ 12 Brazero
+ 13 27 SCBra 2
+ 20 10 Cond
+ 25 1 Cond ref
+ 28 0
+ 30 5 Alt
+ 35 15 Ket
+ 40 27 KetRmax
+ 45 40 Ket
+ 50 50 Ket
+ 55 End
+------------------------------------------------------------------
+
+/( (?(1)0|)* )/x
+Memory allocation (code space): 44
+------------------------------------------------------------------
+ 0 38 Bra
+ 5 28 CBra 1
+ 12 Brazero
+ 13 10 SCond
+ 18 1 Cond ref
+ 21 0
+ 23 5 Alt
+ 28 15 KetRmax
+ 33 28 Ket
+ 38 38 Ket
+ 43 End
+------------------------------------------------------------------
+
+/[a]/
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 7 Bra
+ 5 a
+ 7 7 Ket
+ 12 End
+------------------------------------------------------------------
+
+/[a]/utf
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 7 Bra
+ 5 a
+ 7 7 Ket
+ 12 End
+------------------------------------------------------------------
+
+/[\xaa]/
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 7 Bra
+ 5 \x{aa}
+ 7 7 Ket
+ 12 End
+------------------------------------------------------------------
+
+/[\xaa]/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 8 Bra
+ 5 \x{aa}
+ 8 8 Ket
+ 13 End
+------------------------------------------------------------------
+
+/[^a]/
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 7 Bra
+ 5 [^a]
+ 7 7 Ket
+ 12 End
+------------------------------------------------------------------
+
+/[^a]/utf
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 7 Bra
+ 5 [^a]
+ 7 7 Ket
+ 12 End
+------------------------------------------------------------------
+
+/[^\xaa]/
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 7 Bra
+ 5 [^\x{aa}]
+ 7 7 Ket
+ 12 End
+------------------------------------------------------------------
+
+/[^\xaa]/utf
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 8 Bra
+ 5 [^\x{aa}]
+ 8 8 Ket
+ 13 End
+------------------------------------------------------------------
+
+#pattern -memory
+
+/[^\d]/utf,ucp
+------------------------------------------------------------------
+ 0 15 Bra
+ 5 [^\p{Nd}]
+ 15 15 Ket
+ 20 End
+------------------------------------------------------------------
+
+/[[:^alpha:][:^cntrl:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 19 Bra
+ 5 [\P{L}\P{Cc}]++
+ 19 19 Ket
+ 24 End
+------------------------------------------------------------------
+
+/[[:^cntrl:][:^alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 19 Bra
+ 5 [\P{Cc}\P{L}]++
+ 19 19 Ket
+ 24 End
+------------------------------------------------------------------
+
+/[[:alpha:]]+/utf,ucp
+------------------------------------------------------------------
+ 0 16 Bra
+ 5 [\p{L}]++
+ 16 16 Ket
+ 21 End
+------------------------------------------------------------------
+
+/[[:^alpha:]\S]+/utf,ucp
+------------------------------------------------------------------
+ 0 19 Bra
+ 5 [\P{L}\P{Xsp}]++
+ 19 19 Ket
+ 24 End
+------------------------------------------------------------------
+
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/
+------------------------------------------------------------------
+ 0 93 Bra
+ 5 abc
+ 11 9 CBra 1
+ 18 d
+ 20 7 Alt
+ 25 e
+ 27 16 Ket
+ 32 *THEN
+ 33 x
+ 35 16 CBra 2
+ 42 123
+ 48 *THEN
+ 49 4
+ 51 37 Alt
+ 56 567
+ 62 9 CBra 3
+ 69 b
+ 71 7 Alt
+ 76 q
+ 78 16 Ket
+ 83 *THEN
+ 84 xx
+ 88 53 Ket
+ 93 93 Ket
+ 98 End
+------------------------------------------------------------------
+
+/(((a\2)|(a*)\g<-1>))*a?/
+------------------------------------------------------------------
+ 0 83 Bra
+ 5 Brazero
+ 6 70 SCBra 1
+ 13 58 Once
+ 18 24 CBra 2
+ 25 12 CBra 3
+ 32 a
+ 34 \2
+ 37 12 Ket
+ 42 24 Alt
+ 47 9 CBra 4
+ 54 a*
+ 56 9 Ket
+ 61 47 Recurse
+ 66 48 Ket
+ 71 58 Ket
+ 76 70 KetRmax
+ 81 a?+
+ 83 83 Ket
+ 88 End
+------------------------------------------------------------------
+
+/((?+1)(\1))/
+------------------------------------------------------------------
+ 0 47 Bra
+ 5 37 Once
+ 10 27 CBra 1
+ 17 22 Recurse
+ 22 10 CBra 2
+ 29 \1
+ 32 10 Ket
+ 37 27 Ket
+ 42 37 Ket
+ 47 47 Ket
+ 52 End
+------------------------------------------------------------------
+
+"(?1)(?#?'){2}(a)"
+------------------------------------------------------------------
+ 0 49 Bra
+ 5 10 Once
+ 10 35 Recurse
+ 15 10 Ket
+ 20 10 Once
+ 25 35 Recurse
+ 30 10 Ket
+ 35 9 CBra 1
+ 42 a
+ 44 9 Ket
+ 49 49 Ket
+ 54 End
+------------------------------------------------------------------
+
+/.((?2)(?R)|\1|$)()/
+------------------------------------------------------------------
+ 0 64 Bra
+ 5 Any
+ 6 41 Once
+ 11 17 CBra 1
+ 18 52 Recurse
+ 23 0 Recurse
+ 28 8 Alt
+ 33 \1
+ 36 6 Alt
+ 41 $
+ 42 31 Ket
+ 47 41 Ket
+ 52 7 CBra 2
+ 59 7 Ket
+ 64 64 Ket
+ 69 End
+------------------------------------------------------------------
+
+/.((?3)(?R)()(?2)|\1|$)()/
+------------------------------------------------------------------
+ 0 81 Bra
+ 5 Any
+ 6 58 Once
+ 11 34 CBra 1
+ 18 69 Recurse
+ 23 0 Recurse
+ 28 7 CBra 2
+ 35 7 Ket
+ 40 28 Recurse
+ 45 8 Alt
+ 50 \1
+ 53 6 Alt
+ 58 $
+ 59 48 Ket
+ 64 58 Ket
+ 69 7 CBra 3
+ 76 7 Ket
+ 81 81 Ket
+ 86 End
+------------------------------------------------------------------
+
+/(?1)()((((((\1++))\x85)+)|))/
+------------------------------------------------------------------
+ 0 115 Bra
+ 5 10 Recurse
+ 10 7 CBra 1
+ 17 7 Ket
+ 22 88 CBra 2
+ 29 71 CBra 3
+ 36 59 CBra 4
+ 43 47 CBra 5
+ 50 33 CBra 6
+ 57 21 CBra 7
+ 64 9 Once
+ 69 \1+
+ 73 9 Ket
+ 78 21 Ket
+ 83 33 Ket
+ 88 \x{85}
+ 90 47 KetRmax
+ 95 59 Ket
+100 5 Alt
+105 76 Ket
+110 88 Ket
+115 115 Ket
+120 End
+------------------------------------------------------------------
+
+# Check the absolute limit on nesting (?| etc. This varies with code unit
+# width because the workspace is a different number of bytes. It will fail
+# with link size 2 in 8-bit and 16-bit but not in 32-bit.
+
+/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+/parens_nest_limit=1000,-fullbincode
+
+# Use "expand" to create some very long patterns with nested parentheses, in
+# order to test workspace overflow. Again, this varies with code unit width,
+# and even with it fails in two modes, the error offset differs. It also varies
+# with link size - hence multiple tests with different values.
+
+/(?'ABC'\[[bar](]{105}*THEN:\[A]{255}\[)]{106}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{106}*THEN:\[A]{255}\[)]{107}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{159}*THEN:\[A]{255}\[)]{160}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{199}*THEN:\[A]{255}\[)]{200}/expand,-fullbincode
+
+/(?'ABC'\[[bar](]{299}*THEN:\[A]{255}\[)]{300}/expand,-fullbincode
+Failed: error 186 at offset 1224: regular expression is too complicated
+
+/(?(1)(?1)){8,}+()/debug
+------------------------------------------------------------------
+ 0 181 Bra
+ 5 159 Once
+ 10 13 Cond
+ 15 1 Cond ref
+ 18 169 Recurse
+ 23 13 Ket
+ 28 13 Cond
+ 33 1 Cond ref
+ 36 169 Recurse
+ 41 13 Ket
+ 46 13 Cond
+ 51 1 Cond ref
+ 54 169 Recurse
+ 59 13 Ket
+ 64 13 Cond
+ 69 1 Cond ref
+ 72 169 Recurse
+ 77 13 Ket
+ 82 13 Cond
+ 87 1 Cond ref
+ 90 169 Recurse
+ 95 13 Ket
+100 13 Cond
+105 1 Cond ref
+108 169 Recurse
+113 13 Ket
+118 13 Cond
+123 1 Cond ref
+126 169 Recurse
+131 13 Ket
+136 23 SBraPos
+141 13 SCond
+146 1 Cond ref
+149 169 Recurse
+154 13 Ket
+159 23 KetRpos
+164 159 Ket
+169 7 CBra 1
+176 7 Ket
+181 181 Ket
+186 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcd
+ 0:
+ 1:
+
+/(?(1)|a(?1)b){2,}+()/debug
+------------------------------------------------------------------
+ 0 91 Bra
+ 5 69 Once
+ 10 8 Cond
+ 15 1 Cond ref
+ 18 14 Alt
+ 23 a
+ 25 79 Recurse
+ 30 b
+ 32 22 Ket
+ 37 32 SBraPos
+ 42 8 SCond
+ 47 1 Cond ref
+ 50 14 Alt
+ 55 a
+ 57 79 Recurse
+ 62 b
+ 64 22 Ket
+ 69 32 KetRpos
+ 74 69 Ket
+ 79 7 CBra 1
+ 86 7 Ket
+ 91 91 Ket
+ 96 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+May match empty string
+Subject length lower bound = 0
+ abcde
+No match
+
+/((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
+------------------------------------------------------------------
+ 0 327 Bra
+ 5 102 CBra 1
+ 12 5 Recurse
+ 17 219 Recurse
+ 22 231 Recurse
+ 27 243 Recurse
+ 32 255 Recurse
+ 37 267 Recurse
+ 42 279 Recurse
+ 47 291 Recurse
+ 52 303 Recurse
+ 57 303 Recurse
+ 62 291 Recurse
+ 67 279 Recurse
+ 72 267 Recurse
+ 77 255 Recurse
+ 82 243 Recurse
+ 87 231 Recurse
+ 92 219 Recurse
+ 97 5 Recurse
+102 0 Recurse
+107 102 Ket
+112 102 SCBra 1
+119 5 Recurse
+124 219 Recurse
+129 231 Recurse
+134 243 Recurse
+139 255 Recurse
+144 267 Recurse
+149 279 Recurse
+154 291 Recurse
+159 303 Recurse
+164 303 Recurse
+169 291 Recurse
+174 279 Recurse
+179 267 Recurse
+184 255 Recurse
+189 243 Recurse
+194 231 Recurse
+199 219 Recurse
+204 5 Recurse
+209 0 Recurse
+214 102 KetRmax
+219 7 CBra 2
+226 7 Ket
+231 7 CBra 3
+238 7 Ket
+243 7 CBra 4
+250 7 Ket
+255 7 CBra 5
+262 7 Ket
+267 7 CBra 6
+274 7 Ket
+279 7 CBra 7
+286 7 Ket
+291 7 CBra 8
+298 7 Ket
+303 7 CBra 9
+310 7 Ket
+315 7 CBra 10
+322 7 Ket
+327 327 Ket
+332 End
+------------------------------------------------------------------
+Capturing subpattern count = 10
+May match empty string
+Subject length lower bound = 0
+
+# End of testinput8