blob: 8393d5c593f7485c2b46da6f5eab512f211d9c17 [file] [log] [blame]
# 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): 17
------------------------------------------------------------------
0 13 Bra
3 7 CBra 1
8 /i b
10 7 Ket
13 13 Ket
16 End
------------------------------------------------------------------
/(?s)(.*X|^B)/
Memory allocation (code space): 25
------------------------------------------------------------------
0 21 Bra
3 9 CBra 1
8 AllAny*
10 X
12 6 Alt
15 ^
16 B
18 15 Ket
21 21 Ket
24 End
------------------------------------------------------------------
/(?s:.*X|^B)/
Memory allocation (code space): 23
------------------------------------------------------------------
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): 41
------------------------------------------------------------------
0 37 Bra
3 ^
4 [0-9A-Za-z]
37 37 Ket
40 End
------------------------------------------------------------------
/#/Ix
Memory allocation (code space): 7
------------------------------------------------------------------
0 3 Bra
3 3 Ket
6 End
------------------------------------------------------------------
Capture group count = 0
May match empty string
Options: extended
Subject length lower bound = 0
/a#/Ix
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
3 a
5 5 Ket
8 End
------------------------------------------------------------------
Capture group count = 0
Options: extended
First code unit = 'a'
Subject length lower bound = 1
/x?+/
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
3 x?+
5 5 Ket
8 End
------------------------------------------------------------------
/x++/
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
3 x++
5 5 Ket
8 End
------------------------------------------------------------------
/x{1,3}+/
Memory allocation (code space): 13
------------------------------------------------------------------
0 9 Bra
3 x
5 x{0,2}+
9 9 Ket
12 End
------------------------------------------------------------------
/(x)*+/
Memory allocation (code space): 18
------------------------------------------------------------------
0 14 Bra
3 Braposzero
4 7 CBraPos 1
9 x
11 7 KetRpos
14 14 Ket
17 End
------------------------------------------------------------------
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
Memory allocation (code space): 120
------------------------------------------------------------------
0 116 Bra
3 ^
4 109 CBra 1
9 7 CBra 2
14 a+
16 7 Ket
19 39 CBra 3
24 [ab]+?
58 39 Ket
61 39 CBra 4
66 [bc]+
100 39 Ket
103 7 CBra 5
108 \w*+
110 7 Ket
113 109 Ket
116 116 Ket
119 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): 826
------------------------------------------------------------------
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): 816
------------------------------------------------------------------
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): 22
------------------------------------------------------------------
0 18 Bra
3 12 CBra 1
8 a
10 3 Recurse
13 b
15 12 Ket
18 18 Ket
21 End
------------------------------------------------------------------
/(a(?1)+b)/
Memory allocation (code space): 28
------------------------------------------------------------------
0 24 Bra
3 18 CBra 1
8 a
10 6 SBra
13 3 Recurse
16 6 KetRmax
19 b
21 18 Ket
24 24 Ket
27 End
------------------------------------------------------------------
/a(?P<name1>b|c)d(?P<longername2>e)/
Memory allocation (code space): 36
------------------------------------------------------------------
0 32 Bra
3 a
5 7 CBra 1
10 b
12 5 Alt
15 c
17 12 Ket
20 d
22 7 CBra 2
27 e
29 7 Ket
32 32 Ket
35 End
------------------------------------------------------------------
/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/
Memory allocation (code space): 45
------------------------------------------------------------------
0 41 Bra
3 25 Bra
6 a
8 17 CBra 1
13 c
15 7 CBra 2
20 d
22 7 Ket
25 17 Ket
28 25 Ket
31 7 CBra 3
36 a
38 7 Ket
41 41 Ket
44 End
------------------------------------------------------------------
/(?P<a>a)...(?P=a)bbb(?P>a)d/
Memory allocation (code space): 34
------------------------------------------------------------------
0 30 Bra
3 7 CBra 1
8 a
10 7 Ket
13 Any
14 Any
15 Any
16 \1
19 bbb
25 3 Recurse
28 d
30 30 Ket
33 End
------------------------------------------------------------------
/abc(?C255)de(?C)f/
Memory allocation (code space): 31
------------------------------------------------------------------
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): 53
------------------------------------------------------------------
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): 10
------------------------------------------------------------------
0 6 Bra
3 \x{100}
6 6 Ket
9 End
------------------------------------------------------------------
/\x{1000}/utf
Memory allocation (code space): 11
------------------------------------------------------------------
0 7 Bra
3 \x{1000}
7 7 Ket
10 End
------------------------------------------------------------------
/\x{10000}/utf
Memory allocation (code space): 12
------------------------------------------------------------------
0 8 Bra
3 \x{10000}
8 8 Ket
11 End
------------------------------------------------------------------
/\x{100000}/utf
Memory allocation (code space): 12
------------------------------------------------------------------
0 8 Bra
3 \x{100000}
8 8 Ket
11 End
------------------------------------------------------------------
/\x{10ffff}/utf
Memory allocation (code space): 12
------------------------------------------------------------------
0 8 Bra
3 \x{10ffff}
8 8 Ket
11 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): 10
------------------------------------------------------------------
0 6 Bra
3 \x{ff}
6 6 Ket
9 End
------------------------------------------------------------------
/[\x{100}]/utf
Memory allocation (code space): 10
------------------------------------------------------------------
0 6 Bra
3 \x{100}
6 6 Ket
9 End
------------------------------------------------------------------
/\x80/utf
Memory allocation (code space): 10
------------------------------------------------------------------
0 6 Bra
3 \x{80}
6 6 Ket
9 End
------------------------------------------------------------------
/\xff/utf
Memory allocation (code space): 10
------------------------------------------------------------------
0 6 Bra
3 \x{ff}
6 6 Ket
9 End
------------------------------------------------------------------
/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
Memory allocation (code space): 18
------------------------------------------------------------------
0 14 Bra
3 A\x{2262}\x{391}.
14 14 Ket
17 End
------------------------------------------------------------------
Capture group 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): 19
------------------------------------------------------------------
0 15 Bra
3 \x{d55c}\x{ad6d}\x{c5b4}
15 15 Ket
18 End
------------------------------------------------------------------
Capture group 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): 19
------------------------------------------------------------------
0 15 Bra
3 \x{65e5}\x{672c}\x{8a9e}
15 15 Ket
18 End
------------------------------------------------------------------
Capture group count = 0
Options: utf
First code unit = \xe6
Last code unit = \x9e
Subject length lower bound = 3
/[\x{100}]/utf
Memory allocation (code space): 10
------------------------------------------------------------------
0 6 Bra
3 \x{100}
6 6 Ket
9 End
------------------------------------------------------------------
/[Z\x{100}]/utf
Memory allocation (code space): 47
------------------------------------------------------------------
0 43 Bra
3 [Z\x{100}]
43 43 Ket
46 End
------------------------------------------------------------------
/^[\x{100}\E-\Q\E\x{150}]/utf
Memory allocation (code space): 18
------------------------------------------------------------------
0 14 Bra
3 ^
4 [\x{100}-\x{150}]
14 14 Ket
17 End
------------------------------------------------------------------
/^[\QĀ\E-\QŐ\E]/utf
Memory allocation (code space): 18
------------------------------------------------------------------
0 14 Bra
3 ^
4 [\x{100}-\x{150}]
14 14 Ket
17 End
------------------------------------------------------------------
/^[\QĀ\E-\QŐ\E/utf
Failed: error 106 at offset 15: missing terminating ] for character class
/[\p{L}]/
Memory allocation (code space): 15
------------------------------------------------------------------
0 11 Bra
3 [\p{L}]
11 11 Ket
14 End
------------------------------------------------------------------
/[\p{^L}]/
Memory allocation (code space): 15
------------------------------------------------------------------
0 11 Bra
3 [\P{L}]
11 11 Ket
14 End
------------------------------------------------------------------
/[\P{L}]/
Memory allocation (code space): 15
------------------------------------------------------------------
0 11 Bra
3 [\P{L}]
11 11 Ket
14 End
------------------------------------------------------------------
/[\P{^L}]/
Memory allocation (code space): 15
------------------------------------------------------------------
0 11 Bra
3 [\p{L}]
11 11 Ket
14 End
------------------------------------------------------------------
/[abc\p{L}\x{0660}]/utf
Memory allocation (code space): 50
------------------------------------------------------------------
0 46 Bra
3 [a-c\p{L}\x{660}]
46 46 Ket
49 End
------------------------------------------------------------------
/[\p{Nd}]/utf
Memory allocation (code space): 15
------------------------------------------------------------------
0 11 Bra
3 [\p{Nd}]
11 11 Ket
14 End
------------------------------------------------------------------
/[\p{Nd}+-]+/utf
Memory allocation (code space): 48
------------------------------------------------------------------
0 44 Bra
3 [+\-\p{Nd}]++
44 44 Ket
47 End
------------------------------------------------------------------
/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
Memory allocation (code space): 25
------------------------------------------------------------------
0 21 Bra
3 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
21 21 Ket
24 End
------------------------------------------------------------------
/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
Memory allocation (code space): 25
------------------------------------------------------------------
0 21 Bra
3 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
21 21 Ket
24 End
------------------------------------------------------------------
/[\x{105}-\x{109}]/i,utf
Memory allocation (code space): 17
------------------------------------------------------------------
0 13 Bra
3 [\x{104}-\x{109}]
13 13 Ket
16 End
------------------------------------------------------------------
/( ( (?(1)0|) )* )/x
Memory allocation (code space): 38
------------------------------------------------------------------
0 34 Bra
3 28 CBra 1
8 Brazero
9 19 SCBra 2
14 8 Cond
17 1 Cond ref
20 0
22 3 Alt
25 11 Ket
28 19 KetRmax
31 28 Ket
34 34 Ket
37 End
------------------------------------------------------------------
/( (?(1)0|)* )/x
Memory allocation (code space): 30
------------------------------------------------------------------
0 26 Bra
3 20 CBra 1
8 Brazero
9 8 SCond
12 1 Cond ref
15 0
17 3 Alt
20 11 KetRmax
23 20 Ket
26 26 Ket
29 End
------------------------------------------------------------------
/[a]/
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
3 a
5 5 Ket
8 End
------------------------------------------------------------------
/[a]/utf
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
3 a
5 5 Ket
8 End
------------------------------------------------------------------
/[\xaa]/
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
3 \x{aa}
5 5 Ket
8 End
------------------------------------------------------------------
/[\xaa]/utf
Memory allocation (code space): 10
------------------------------------------------------------------
0 6 Bra
3 \x{aa}
6 6 Ket
9 End
------------------------------------------------------------------
/[^a]/
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
3 [^a]
5 5 Ket
8 End
------------------------------------------------------------------
/[^a]/utf
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
3 [^a]
5 5 Ket
8 End
------------------------------------------------------------------
/[^\xaa]/
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
3 [^\x{aa}]
5 5 Ket
8 End
------------------------------------------------------------------
/[^\xaa]/utf
Memory allocation (code space): 10
------------------------------------------------------------------
0 6 Bra
3 [^\x{aa}]
6 6 Ket
9 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 73 Bra
3 abc
9 7 CBra 1
14 d
16 5 Alt
19 e
21 12 Ket
24 *THEN
25 x
27 14 CBra 2
32 123
38 *THEN
39 4
41 29 Alt
44 567
50 7 CBra 3
55 b
57 5 Alt
60 q
62 12 Ket
65 *THEN
66 xx
70 43 Ket
73 73 Ket
76 End
------------------------------------------------------------------
/(((a\2)|(a*)\g<-1>))*a?/
------------------------------------------------------------------
0 51 Bra
3 Brazero
4 42 SCBra 1
9 18 CBra 2
14 10 CBra 3
19 a
21 \2
24 10 Ket
27 16 Alt
30 7 CBra 4
35 a*
37 7 Ket
40 30 Recurse
43 34 Ket
46 42 KetRmax
49 a?+
51 51 Ket
54 End
------------------------------------------------------------------
/((?+1)(\1))/
------------------------------------------------------------------
0 25 Bra
3 19 CBra 1
8 11 Recurse
11 8 CBra 2
16 \1
19 8 Ket
22 19 Ket
25 25 Ket
28 End
------------------------------------------------------------------
"(?1)(?#?'){2}(a)"
------------------------------------------------------------------
0 19 Bra
3 9 Recurse
6 9 Recurse
9 7 CBra 1
14 a
16 7 Ket
19 19 Ket
22 End
------------------------------------------------------------------
/.((?2)(?R)|\1|$)()/
------------------------------------------------------------------
0 36 Bra
3 Any
4 11 CBra 1
9 28 Recurse
12 0 Recurse
15 6 Alt
18 \1
21 4 Alt
24 $
25 21 Ket
28 5 CBra 2
33 5 Ket
36 36 Ket
39 End
------------------------------------------------------------------
/.((?3)(?R)()(?2)|\1|$)()/
------------------------------------------------------------------
0 47 Bra
3 Any
4 22 CBra 1
9 39 Recurse
12 0 Recurse
15 5 CBra 2
20 5 Ket
23 15 Recurse
26 6 Alt
29 \1
32 4 Alt
35 $
36 32 Ket
39 5 CBra 3
44 5 Ket
47 47 Ket
50 End
------------------------------------------------------------------
/(?1)()((((((\1++))\x85)+)|))/
------------------------------------------------------------------
0 77 Bra
3 6 Recurse
6 5 CBra 1
11 5 Ket
14 60 CBra 2
19 49 CBra 3
24 41 CBra 4
29 33 CBra 5
34 23 CBra 6
39 15 CBra 7
44 7 Once
47 \1+
51 7 Ket
54 15 Ket
57 23 Ket
60 \x{85}
62 33 KetRmax
65 41 Ket
68 3 Alt
71 52 Ket
74 60 Ket
77 77 Ket
80 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
Failed: error 184 at offset 1504: (?| and/or (?J: or (?x: parentheses are too deeply nested
# 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 when it fails in two modes, the error offset differs. It also varies
# with link size - hence multiple tests with different values.
/(?'ABC'\[[bar](]{792}*THEN:\[A]{255}\[)]{793}/expand,-fullbincode,parens_nest_limit=1000
/(?'ABC'\[[bar](]{793}*THEN:\[A]{255}\[)]{794}/expand,-fullbincode,parens_nest_limit=1000
/(?'ABC'\[[bar](]{1793}*THEN:\[A]{255}\[)]{1794}/expand,-fullbincode,parens_nest_limit=2000
Failed: error 186 at offset 12820: regular expression is too complicated
/(?(1)(?1)){8,}+()/debug
------------------------------------------------------------------
0 119 Bra
3 105 Once
6 9 Cond
9 1 Cond ref
12 111 Recurse
15 9 Ket
18 9 Cond
21 1 Cond ref
24 111 Recurse
27 9 Ket
30 9 Cond
33 1 Cond ref
36 111 Recurse
39 9 Ket
42 9 Cond
45 1 Cond ref
48 111 Recurse
51 9 Ket
54 9 Cond
57 1 Cond ref
60 111 Recurse
63 9 Ket
66 9 Cond
69 1 Cond ref
72 111 Recurse
75 9 Ket
78 9 Cond
81 1 Cond ref
84 111 Recurse
87 9 Ket
90 15 SBraPos
93 9 SCond
96 1 Cond ref
99 111 Recurse
102 9 Ket
105 15 KetRpos
108 105 Ket
111 5 CBra 1
116 5 Ket
119 119 Ket
122 End
------------------------------------------------------------------
Capture group 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 61 Bra
3 47 Once
6 6 Cond
9 1 Cond ref
12 10 Alt
15 a
17 53 Recurse
20 b
22 16 Ket
25 22 SBraPos
28 6 SCond
31 1 Cond ref
34 10 Alt
37 a
39 53 Recurse
42 b
44 16 Ket
47 22 KetRpos
50 47 Ket
53 5 CBra 1
58 5 Ket
61 61 Ket
64 End
------------------------------------------------------------------
Capture group 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 205 Bra
3 62 CBra 1
8 3 Recurse
11 133 Recurse
14 141 Recurse
17 149 Recurse
20 157 Recurse
23 165 Recurse
26 173 Recurse
29 181 Recurse
32 189 Recurse
35 189 Recurse
38 181 Recurse
41 173 Recurse
44 165 Recurse
47 157 Recurse
50 149 Recurse
53 141 Recurse
56 133 Recurse
59 3 Recurse
62 0 Recurse
65 62 Ket
68 62 SCBra 1
73 3 Recurse
76 133 Recurse
79 141 Recurse
82 149 Recurse
85 157 Recurse
88 165 Recurse
91 173 Recurse
94 181 Recurse
97 189 Recurse
100 189 Recurse
103 181 Recurse
106 173 Recurse
109 165 Recurse
112 157 Recurse
115 149 Recurse
118 141 Recurse
121 133 Recurse
124 3 Recurse
127 0 Recurse
130 62 KetRmax
133 5 CBra 2
138 5 Ket
141 5 CBra 3
146 5 Ket
149 5 CBra 4
154 5 Ket
157 5 CBra 5
162 5 Ket
165 5 CBra 6
170 5 Ket
173 5 CBra 7
178 5 Ket
181 5 CBra 8
186 5 Ket
189 5 CBra 9
194 5 Ket
197 5 CBra 10
202 5 Ket
205 205 Ket
208 End
------------------------------------------------------------------
Capture group count = 10
May match empty string
Subject length lower bound = 0
/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
Failed: error 114 at offset 509: missing closing parenthesis
/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))/-fullbincode
#pattern -fullbincode
/\[()]{65535}/expand
Failed: error 120 at offset 131070: regular expression is too large
# End of testinput8