xref: /aosp_15_r20/external/pcre/testdata/testoutput8-16-3 (revision 22dc650d8ae982c6770746019a6f94af92b0f024)
1# There are two sorts of patterns in this test. A number of them are
2# representative patterns whose lengths and offsets are checked. This is just a
3# doublecheck test to ensure the sizes don't go horribly wrong when something
4# is changed. The operation of these patterns is checked in other tests.
5#
6# This file also contains tests whose output varies with code unit size and/or
7# link size. Unicode support is required for these tests. There are separate
8# output files for each code unit size and link size.
9
10#pattern fullbincode,memory
11
12/((?i)b)/
13Memory allocation - compiled block : 168
14Memory allocation - code portion   : 32
15------------------------------------------------------------------
16  0  12 Bra
17  3   6 CBra 1
18  7  /i b
19  9   6 Ket
20 12  12 Ket
21 15     End
22------------------------------------------------------------------
23
24/(?s)(.*X|^B)/
25Memory allocation - compiled block : 184
26Memory allocation - code portion   : 48
27------------------------------------------------------------------
28  0  20 Bra
29  3   8 CBra 1
30  7     AllAny*
31  9     X
32 11   6 Alt
33 14     ^
34 15     B
35 17  14 Ket
36 20  20 Ket
37 23     End
38------------------------------------------------------------------
39
40/(?s:.*X|^B)/
41Memory allocation - compiled block : 182
42Memory allocation - code portion   : 46
43------------------------------------------------------------------
44  0  19 Bra
45  3   7 Bra
46  6     AllAny*
47  8     X
48 10   6 Alt
49 13     ^
50 14     B
51 16  13 Ket
52 19  19 Ket
53 22     End
54------------------------------------------------------------------
55
56/^[[:alnum:]]/
57Memory allocation - compiled block : 186
58Memory allocation - code portion   : 50
59------------------------------------------------------------------
60  0  21 Bra
61  3     ^
62  4     [0-9A-Za-z]
63 21  21 Ket
64 24     End
65------------------------------------------------------------------
66
67/#/Ix
68Memory allocation - compiled block : 150
69Memory allocation - code portion   : 14
70------------------------------------------------------------------
71  0   3 Bra
72  3   3 Ket
73  6     End
74------------------------------------------------------------------
75Capture group count = 0
76May match empty string
77Options: extended
78Subject length lower bound = 0
79
80/a#/Ix
81Memory allocation - compiled block : 154
82Memory allocation - code portion   : 18
83------------------------------------------------------------------
84  0   5 Bra
85  3     a
86  5   5 Ket
87  8     End
88------------------------------------------------------------------
89Capture group count = 0
90Options: extended
91First code unit = 'a'
92Subject length lower bound = 1
93
94/x?+/
95Memory allocation - compiled block : 154
96Memory allocation - code portion   : 18
97------------------------------------------------------------------
98  0   5 Bra
99  3     x?+
100  5   5 Ket
101  8     End
102------------------------------------------------------------------
103
104/x++/
105Memory allocation - compiled block : 154
106Memory allocation - code portion   : 18
107------------------------------------------------------------------
108  0   5 Bra
109  3     x++
110  5   5 Ket
111  8     End
112------------------------------------------------------------------
113
114/x{1,3}+/
115Memory allocation - compiled block : 160
116Memory allocation - code portion   : 24
117------------------------------------------------------------------
118  0   8 Bra
119  3     x
120  5     x{0,2}+
121  8   8 Ket
122 11     End
123------------------------------------------------------------------
124
125/(x)*+/
126Memory allocation - compiled block : 170
127Memory allocation - code portion   : 34
128------------------------------------------------------------------
129  0  13 Bra
130  3     Braposzero
131  4   6 CBraPos 1
132  8     x
133 10   6 KetRpos
134 13  13 Ket
135 16     End
136------------------------------------------------------------------
137
138/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
139Memory allocation - compiled block : 302
140Memory allocation - code portion   : 166
141------------------------------------------------------------------
142  0  79 Bra
143  3     ^
144  4  72 CBra 1
145  8   6 CBra 2
146 12     a+
147 14   6 Ket
148 17  22 CBra 3
149 21     [ab]+?
150 39  22 Ket
151 42  22 CBra 4
152 46     [bc]+
153 64  22 Ket
154 67   6 CBra 5
155 71     \w*+
156 73   6 Ket
157 76  72 Ket
158 79  79 Ket
159 82     End
160------------------------------------------------------------------
161
162"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"
163Memory allocation - compiled block : 1788
164Memory allocation - code portion   : 1652
165------------------------------------------------------------------
166  0 822 Bra
167  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
168821     \b
169822 822 Ket
170825     End
171------------------------------------------------------------------
172
173"\$\<\.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"
174Memory allocation - compiled block : 1768
175Memory allocation - code portion   : 1632
176------------------------------------------------------------------
177  0 812 Bra
178  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
179811     \b
180812 812 Ket
181815     End
182------------------------------------------------------------------
183
184/(a(?1)b)/
185Memory allocation - compiled block : 178
186Memory allocation - code portion   : 42
187------------------------------------------------------------------
188  0  17 Bra
189  3  11 CBra 1
190  7     a
191  9   3 Recurse
192 12     b
193 14  11 Ket
194 17  17 Ket
195 20     End
196------------------------------------------------------------------
197
198/(a(?1)+b)/
199Memory allocation - compiled block : 190
200Memory allocation - code portion   : 54
201------------------------------------------------------------------
202  0  23 Bra
203  3  17 CBra 1
204  7     a
205  9   6 SBra
206 12   3 Recurse
207 15   6 KetRmax
208 18     b
209 20  17 Ket
210 23  23 Ket
211 26     End
212------------------------------------------------------------------
213
214/a(?P<name1>b|c)d(?P<longername2>e)/
215Memory allocation - compiled block : 256
216Memory allocation - code portion   : 68
217------------------------------------------------------------------
218  0  30 Bra
219  3     a
220  5   6 CBra 1
221  9     b
222 11   5 Alt
223 14     c
224 16  11 Ket
225 19     d
226 21   6 CBra 2
227 25     e
228 27   6 Ket
229 30  30 Ket
230 33     End
231------------------------------------------------------------------
232
233/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/
234Memory allocation - compiled block : 238
235Memory allocation - code portion   : 84
236------------------------------------------------------------------
237  0  38 Bra
238  3  23 Bra
239  6     a
240  8  15 CBra 1
241 12     c
242 14   6 CBra 2
243 18     d
244 20   6 Ket
245 23  15 Ket
246 26  23 Ket
247 29   6 CBra 3
248 33     a
249 35   6 Ket
250 38  38 Ket
251 41     End
252------------------------------------------------------------------
253
254/(?P<a>a)...(?P=a)bbb(?P>a)d/
255Memory allocation - compiled block : 206
256Memory allocation - code portion   : 64
257------------------------------------------------------------------
258  0  28 Bra
259  3   6 CBra 1
260  7     a
261  9   6 Ket
262 12     Any
263 13     Any
264 14     Any
265 15     \1
266 17     bbb
267 23   3 Recurse
268 26     d
269 28  28 Ket
270 31     End
271------------------------------------------------------------------
272
273/abc(?C255)de(?C)f/
274Memory allocation - compiled block : 198
275Memory allocation - code portion   : 62
276------------------------------------------------------------------
277  0  27 Bra
278  3     abc
279  9     Callout 255 10 1
280 15     de
281 19     Callout 0 16 1
282 25     f
283 27  27 Ket
284 30     End
285------------------------------------------------------------------
286
287/abcde/auto_callout
288Memory allocation - compiled block : 242
289Memory allocation - code portion   : 106
290------------------------------------------------------------------
291  0  49 Bra
292  3     Callout 255 0 1
293  9     a
294 11     Callout 255 1 1
295 17     b
296 19     Callout 255 2 1
297 25     c
298 27     Callout 255 3 1
299 33     d
300 35     Callout 255 4 1
301 41     e
302 43     Callout 255 5 0
303 49  49 Ket
304 52     End
305------------------------------------------------------------------
306
307/\x{100}/utf
308Memory allocation - compiled block : 154
309Memory allocation - code portion   : 18
310------------------------------------------------------------------
311  0   5 Bra
312  3     \x{100}
313  5   5 Ket
314  8     End
315------------------------------------------------------------------
316
317/\x{1000}/utf
318Memory allocation - compiled block : 154
319Memory allocation - code portion   : 18
320------------------------------------------------------------------
321  0   5 Bra
322  3     \x{1000}
323  5   5 Ket
324  8     End
325------------------------------------------------------------------
326
327/\x{10000}/utf
328Memory allocation - compiled block : 156
329Memory allocation - code portion   : 20
330------------------------------------------------------------------
331  0   6 Bra
332  3     \x{10000}
333  6   6 Ket
334  9     End
335------------------------------------------------------------------
336
337/\x{100000}/utf
338Memory allocation - compiled block : 156
339Memory allocation - code portion   : 20
340------------------------------------------------------------------
341  0   6 Bra
342  3     \x{100000}
343  6   6 Ket
344  9     End
345------------------------------------------------------------------
346
347/\x{10ffff}/utf
348Memory allocation - compiled block : 156
349Memory allocation - code portion   : 20
350------------------------------------------------------------------
351  0   6 Bra
352  3     \x{10ffff}
353  6   6 Ket
354  9     End
355------------------------------------------------------------------
356
357/\x{110000}/utf
358Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
359
360/[\x{ff}]/utf
361Memory allocation - compiled block : 154
362Memory allocation - code portion   : 18
363------------------------------------------------------------------
364  0   5 Bra
365  3     \x{ff}
366  5   5 Ket
367  8     End
368------------------------------------------------------------------
369
370/[\x{100}]/utf
371Memory allocation - compiled block : 154
372Memory allocation - code portion   : 18
373------------------------------------------------------------------
374  0   5 Bra
375  3     \x{100}
376  5   5 Ket
377  8     End
378------------------------------------------------------------------
379
380/\x80/utf
381Memory allocation - compiled block : 154
382Memory allocation - code portion   : 18
383------------------------------------------------------------------
384  0   5 Bra
385  3     \x{80}
386  5   5 Ket
387  8     End
388------------------------------------------------------------------
389
390/\xff/utf
391Memory allocation - compiled block : 154
392Memory allocation - code portion   : 18
393------------------------------------------------------------------
394  0   5 Bra
395  3     \x{ff}
396  5   5 Ket
397  8     End
398------------------------------------------------------------------
399
400/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
401Memory allocation - compiled block : 166
402Memory allocation - code portion   : 30
403------------------------------------------------------------------
404  0  11 Bra
405  3     A\x{2262}\x{391}.
406 11  11 Ket
407 14     End
408------------------------------------------------------------------
409Capture group count = 0
410Options: utf
411First code unit = 'A'
412Last code unit = '.'
413Subject length lower bound = 4
414
415/\x{D55c}\x{ad6d}\x{C5B4}/I,utf
416Memory allocation - compiled block : 162
417Memory allocation - code portion   : 26
418------------------------------------------------------------------
419  0   9 Bra
420  3     \x{d55c}\x{ad6d}\x{c5b4}
421  9   9 Ket
422 12     End
423------------------------------------------------------------------
424Capture group count = 0
425Options: utf
426First code unit = \x{d55c}
427Last code unit = \x{c5b4}
428Subject length lower bound = 3
429
430/\x{65e5}\x{672c}\x{8a9e}/I,utf
431Memory allocation - compiled block : 162
432Memory allocation - code portion   : 26
433------------------------------------------------------------------
434  0   9 Bra
435  3     \x{65e5}\x{672c}\x{8a9e}
436  9   9 Ket
437 12     End
438------------------------------------------------------------------
439Capture group count = 0
440Options: utf
441First code unit = \x{65e5}
442Last code unit = \x{8a9e}
443Subject length lower bound = 3
444
445/[\x{100}]/utf
446Memory allocation - compiled block : 154
447Memory allocation - code portion   : 18
448------------------------------------------------------------------
449  0   5 Bra
450  3     \x{100}
451  5   5 Ket
452  8     End
453------------------------------------------------------------------
454
455/[Z\x{100}]/utf
456Memory allocation - compiled block : 196
457Memory allocation - code portion   : 60
458------------------------------------------------------------------
459  0  26 Bra
460  3     [Z\x{100}]
461 26  26 Ket
462 29     End
463------------------------------------------------------------------
464
465/^[\x{100}\E-\Q\E\x{150}]/utf
466Memory allocation - compiled block : 168
467Memory allocation - code portion   : 32
468------------------------------------------------------------------
469  0  12 Bra
470  3     ^
471  4     [\x{100}-\x{150}]
472 12  12 Ket
473 15     End
474------------------------------------------------------------------
475
476/^[\QĀ\E-\QŐ\E]/utf
477Memory allocation - compiled block : 168
478Memory allocation - code portion   : 32
479------------------------------------------------------------------
480  0  12 Bra
481  3     ^
482  4     [\x{100}-\x{150}]
483 12  12 Ket
484 15     End
485------------------------------------------------------------------
486
487/^[\QĀ\E-\QŐ\E/utf
488Failed: error 106 at offset 13: missing terminating ] for character class
489
490/[\p{L}]/
491Memory allocation - compiled block : 166
492Memory allocation - code portion   : 30
493------------------------------------------------------------------
494  0  11 Bra
495  3     [\p{L}]
496 11  11 Ket
497 14     End
498------------------------------------------------------------------
499
500/[\p{^L}]/
501Memory allocation - compiled block : 166
502Memory allocation - code portion   : 30
503------------------------------------------------------------------
504  0  11 Bra
505  3     [\P{L}]
506 11  11 Ket
507 14     End
508------------------------------------------------------------------
509
510/[\P{L}]/
511Memory allocation - compiled block : 166
512Memory allocation - code portion   : 30
513------------------------------------------------------------------
514  0  11 Bra
515  3     [\P{L}]
516 11  11 Ket
517 14     End
518------------------------------------------------------------------
519
520/[\P{^L}]/
521Memory allocation - compiled block : 166
522Memory allocation - code portion   : 30
523------------------------------------------------------------------
524  0  11 Bra
525  3     [\p{L}]
526 11  11 Ket
527 14     End
528------------------------------------------------------------------
529
530/[abc\p{L}\x{0660}]/utf
531Memory allocation - compiled block : 202
532Memory allocation - code portion   : 66
533------------------------------------------------------------------
534  0  29 Bra
535  3     [a-c\p{L}\x{660}]
536 29  29 Ket
537 32     End
538------------------------------------------------------------------
539
540/[\p{Nd}]/utf
541Memory allocation - compiled block : 166
542Memory allocation - code portion   : 30
543------------------------------------------------------------------
544  0  11 Bra
545  3     [\p{Nd}]
546 11  11 Ket
547 14     End
548------------------------------------------------------------------
549
550/[\p{Nd}+-]+/utf
551Memory allocation - compiled block : 200
552Memory allocation - code portion   : 64
553------------------------------------------------------------------
554  0  28 Bra
555  3     [+\-\p{Nd}]++
556 28  28 Ket
557 31     End
558------------------------------------------------------------------
559
560/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
561Memory allocation - compiled block : 172
562Memory allocation - code portion   : 36
563------------------------------------------------------------------
564  0  14 Bra
565  3  /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
566 14  14 Ket
567 17     End
568------------------------------------------------------------------
569
570/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
571Memory allocation - compiled block : 172
572Memory allocation - code portion   : 36
573------------------------------------------------------------------
574  0  14 Bra
575  3     A\x{391}\x{10427}\x{ff3a}\x{1fb0}
576 14  14 Ket
577 17     End
578------------------------------------------------------------------
579
580/[\x{105}-\x{109}]/i,utf
581Memory allocation - compiled block : 166
582Memory allocation - code portion   : 30
583------------------------------------------------------------------
584  0  11 Bra
585  3     [\x{104}-\x{109}]
586 11  11 Ket
587 14     End
588------------------------------------------------------------------
589
590/( ( (?(1)0|) )*   )/x
591Memory allocation - compiled block : 206
592Memory allocation - code portion   : 70
593------------------------------------------------------------------
594  0  31 Bra
595  3  25 CBra 1
596  7     Brazero
597  8  17 SCBra 2
598 12   7 Cond
599 15   1 Cond ref
600 17     0
601 19   3 Alt
602 22  10 Ket
603 25  17 KetRmax
604 28  25 Ket
605 31  31 Ket
606 34     End
607------------------------------------------------------------------
608
609/(  (?(1)0|)*   )/x
610Memory allocation - compiled block : 192
611Memory allocation - code portion   : 56
612------------------------------------------------------------------
613  0  24 Bra
614  3  18 CBra 1
615  7     Brazero
616  8   7 SCond
617 11   1 Cond ref
618 13     0
619 15   3 Alt
620 18  10 KetRmax
621 21  18 Ket
622 24  24 Ket
623 27     End
624------------------------------------------------------------------
625
626/[a]/
627Memory allocation - compiled block : 154
628Memory allocation - code portion   : 18
629------------------------------------------------------------------
630  0   5 Bra
631  3     a
632  5   5 Ket
633  8     End
634------------------------------------------------------------------
635
636/[a]/utf
637Memory allocation - compiled block : 154
638Memory allocation - code portion   : 18
639------------------------------------------------------------------
640  0   5 Bra
641  3     a
642  5   5 Ket
643  8     End
644------------------------------------------------------------------
645
646/[\xaa]/
647Memory allocation - compiled block : 154
648Memory allocation - code portion   : 18
649------------------------------------------------------------------
650  0   5 Bra
651  3     \x{aa}
652  5   5 Ket
653  8     End
654------------------------------------------------------------------
655
656/[\xaa]/utf
657Memory allocation - compiled block : 154
658Memory allocation - code portion   : 18
659------------------------------------------------------------------
660  0   5 Bra
661  3     \x{aa}
662  5   5 Ket
663  8     End
664------------------------------------------------------------------
665
666/[^a]/
667Memory allocation - compiled block : 154
668Memory allocation - code portion   : 18
669------------------------------------------------------------------
670  0   5 Bra
671  3     [^a]
672  5   5 Ket
673  8     End
674------------------------------------------------------------------
675
676/[^a]/utf
677Memory allocation - compiled block : 154
678Memory allocation - code portion   : 18
679------------------------------------------------------------------
680  0   5 Bra
681  3     [^a]
682  5   5 Ket
683  8     End
684------------------------------------------------------------------
685
686/[^\xaa]/
687Memory allocation - compiled block : 154
688Memory allocation - code portion   : 18
689------------------------------------------------------------------
690  0   5 Bra
691  3     [^\x{aa}]
692  5   5 Ket
693  8     End
694------------------------------------------------------------------
695
696/[^\xaa]/utf
697Memory allocation - compiled block : 154
698Memory allocation - code portion   : 18
699------------------------------------------------------------------
700  0   5 Bra
701  3     [^\x{aa}]
702  5   5 Ket
703  8     End
704------------------------------------------------------------------
705
706#pattern -memory
707
708/[^\d]/utf,ucp
709------------------------------------------------------------------
710  0  11 Bra
711  3     [^\p{Nd}]
712 11  11 Ket
713 14     End
714------------------------------------------------------------------
715
716/[[:^alpha:][:^cntrl:]]+/utf,ucp
717------------------------------------------------------------------
718  0  15 Bra
719  3     [\P{L}\P{Cc}]++
720 15  15 Ket
721 18     End
722------------------------------------------------------------------
723
724/[[:^cntrl:][:^alpha:]]+/utf,ucp
725------------------------------------------------------------------
726  0  15 Bra
727  3     [\P{Cc}\P{L}]++
728 15  15 Ket
729 18     End
730------------------------------------------------------------------
731
732/[[:alpha:]]+/utf,ucp
733------------------------------------------------------------------
734  0  12 Bra
735  3     [\p{L}]++
736 12  12 Ket
737 15     End
738------------------------------------------------------------------
739
740/[[:^alpha:]\S]+/utf,ucp
741------------------------------------------------------------------
742  0  15 Bra
743  3     [\P{L}\P{Xsp}]++
744 15  15 Ket
745 18     End
746------------------------------------------------------------------
747
748/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/
749------------------------------------------------------------------
750  0  70 Bra
751  3     abc
752  9   6 CBra 1
753 13     d
754 15   5 Alt
755 18     e
756 20  11 Ket
757 23     *THEN
758 24     x
759 26  13 CBra 2
760 30     123
761 36     *THEN
762 37     4
763 39  28 Alt
764 42     567
765 48   6 CBra 3
766 52     b
767 54   5 Alt
768 57     q
769 59  11 Ket
770 62     *THEN
771 63     xx
772 67  41 Ket
773 70  70 Ket
774 73     End
775------------------------------------------------------------------
776
777/(((a\2)|(a*)\g<-1>))*a?/
778------------------------------------------------------------------
779  0  46 Bra
780  3     Brazero
781  4  37 SCBra 1
782  8  15 CBra 2
783 12   8 CBra 3
784 16     a
785 18     \2
786 20   8 Ket
787 23  15 Alt
788 26   6 CBra 4
789 30     a*
790 32   6 Ket
791 35  26 Recurse
792 38  30 Ket
793 41  37 KetRmax
794 44     a?+
795 46  46 Ket
796 49     End
797------------------------------------------------------------------
798
799/((?+1)(\1))/
800------------------------------------------------------------------
801  0  22 Bra
802  3  16 CBra 1
803  7  10 Recurse
804 10   6 CBra 2
805 14     \1
806 16   6 Ket
807 19  16 Ket
808 22  22 Ket
809 25     End
810------------------------------------------------------------------
811
812"(?1)(?#?'){2}(a)"
813------------------------------------------------------------------
814  0  18 Bra
815  3   9 Recurse
816  6   9 Recurse
817  9   6 CBra 1
818 13     a
819 15   6 Ket
820 18  18 Ket
821 21     End
822------------------------------------------------------------------
823
824/.((?2)(?R)|\1|$)()/
825------------------------------------------------------------------
826  0  33 Bra
827  3     Any
828  4  10 CBra 1
829  8  26 Recurse
830 11   0 Recurse
831 14   5 Alt
832 17     \1
833 19   4 Alt
834 22     $
835 23  19 Ket
836 26   4 CBra 2
837 30   4 Ket
838 33  33 Ket
839 36     End
840------------------------------------------------------------------
841
842/.((?3)(?R)()(?2)|\1|$)()/
843------------------------------------------------------------------
844  0  43 Bra
845  3     Any
846  4  20 CBra 1
847  8  36 Recurse
848 11   0 Recurse
849 14   4 CBra 2
850 18   4 Ket
851 21  14 Recurse
852 24   5 Alt
853 27     \1
854 29   4 Alt
855 32     $
856 33  29 Ket
857 36   4 CBra 3
858 40   4 Ket
859 43  43 Ket
860 46     End
861------------------------------------------------------------------
862
863/(?1)()((((((\1++))\x85)+)|))/
864------------------------------------------------------------------
865  0  69 Bra
866  3   6 Recurse
867  6   4 CBra 1
868 10   4 Ket
869 13  53 CBra 2
870 17  43 CBra 3
871 21  36 CBra 4
872 25  29 CBra 5
873 29  20 CBra 6
874 33  13 CBra 7
875 37   6 Once
876 40     \1+
877 43   6 Ket
878 46  13 Ket
879 49  20 Ket
880 52     \x{85}
881 54  29 KetRmax
882 57  36 Ket
883 60   3 Alt
884 63  46 Ket
885 66  53 Ket
886 69  69 Ket
887 72     End
888------------------------------------------------------------------
889
890# Check the absolute limit on nesting (?| etc. This varies with code unit
891# width because the workspace is a different number of bytes. It will fail
892# with link size 2 in 8-bit and 16-bit but not in 32-bit.
893
894/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
895)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
896/parens_nest_limit=1000,-fullbincode
897
898# Use "expand" to create some very long patterns with nested parentheses, in
899# order to test workspace overflow. Again, this varies with code unit width,
900# and even when it fails in two modes, the error offset differs. It also varies
901# with link size - hence multiple tests with different values.
902
903/(?'ABC'\[[bar](]{792}*THEN:\[A]{255}\[)]{793}/expand,-fullbincode,parens_nest_limit=1000
904
905/(?'ABC'\[[bar](]{793}*THEN:\[A]{255}\[)]{794}/expand,-fullbincode,parens_nest_limit=1000
906
907/(?'ABC'\[[bar](]{1793}*THEN:\[A]{255}\[)]{1794}/expand,-fullbincode,parens_nest_limit=2000
908Failed: error 186 at offset 12820: regular expression is too complicated
909
910/(?(1)(?1)){8,}+()/debug
911------------------------------------------------------------------
912  0 110 Bra
913  3  97 Once
914  6   8 Cond
915  9   1 Cond ref
916 11 103 Recurse
917 14   8 Ket
918 17   8 Cond
919 20   1 Cond ref
920 22 103 Recurse
921 25   8 Ket
922 28   8 Cond
923 31   1 Cond ref
924 33 103 Recurse
925 36   8 Ket
926 39   8 Cond
927 42   1 Cond ref
928 44 103 Recurse
929 47   8 Ket
930 50   8 Cond
931 53   1 Cond ref
932 55 103 Recurse
933 58   8 Ket
934 61   8 Cond
935 64   1 Cond ref
936 66 103 Recurse
937 69   8 Ket
938 72   8 Cond
939 75   1 Cond ref
940 77 103 Recurse
941 80   8 Ket
942 83  14 SBraPos
943 86   8 SCond
944 89   1 Cond ref
945 91 103 Recurse
946 94   8 Ket
947 97  14 KetRpos
948100  97 Ket
949103   4 CBra 1
950107   4 Ket
951110 110 Ket
952113     End
953------------------------------------------------------------------
954Capture group count = 1
955Max back reference = 1
956May match empty string
957Subject length lower bound = 0
958    abcd
959 0:
960 1:
961
962/(?(1)|a(?1)b){2,}+()/debug
963------------------------------------------------------------------
964  0  58 Bra
965  3  45 Once
966  6   5 Cond
967  9   1 Cond ref
968 11  10 Alt
969 14     a
970 16  51 Recurse
971 19     b
972 21  15 Ket
973 24  21 SBraPos
974 27   5 SCond
975 30   1 Cond ref
976 32  10 Alt
977 35     a
978 37  51 Recurse
979 40     b
980 42  15 Ket
981 45  21 KetRpos
982 48  45 Ket
983 51   4 CBra 1
984 55   4 Ket
985 58  58 Ket
986 61     End
987------------------------------------------------------------------
988Capture group count = 1
989Max back reference = 1
990May match empty string
991Subject length lower bound = 0
992    abcde
993No match
994
995/((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
996------------------------------------------------------------------
997  0 194 Bra
998  3  61 CBra 1
999  7   3 Recurse
1000 10 131 Recurse
1001 13 138 Recurse
1002 16 145 Recurse
1003 19 152 Recurse
1004 22 159 Recurse
1005 25 166 Recurse
1006 28 173 Recurse
1007 31 180 Recurse
1008 34 180 Recurse
1009 37 173 Recurse
1010 40 166 Recurse
1011 43 159 Recurse
1012 46 152 Recurse
1013 49 145 Recurse
1014 52 138 Recurse
1015 55 131 Recurse
1016 58   3 Recurse
1017 61   0 Recurse
1018 64  61 Ket
1019 67  61 SCBra 1
1020 71   3 Recurse
1021 74 131 Recurse
1022 77 138 Recurse
1023 80 145 Recurse
1024 83 152 Recurse
1025 86 159 Recurse
1026 89 166 Recurse
1027 92 173 Recurse
1028 95 180 Recurse
1029 98 180 Recurse
1030101 173 Recurse
1031104 166 Recurse
1032107 159 Recurse
1033110 152 Recurse
1034113 145 Recurse
1035116 138 Recurse
1036119 131 Recurse
1037122   3 Recurse
1038125   0 Recurse
1039128  61 KetRmax
1040131   4 CBra 2
1041135   4 Ket
1042138   4 CBra 3
1043142   4 Ket
1044145   4 CBra 4
1045149   4 Ket
1046152   4 CBra 5
1047156   4 Ket
1048159   4 CBra 6
1049163   4 Ket
1050166   4 CBra 7
1051170   4 Ket
1052173   4 CBra 8
1053177   4 Ket
1054180   4 CBra 9
1055184   4 Ket
1056187   4 CBra 10
1057191   4 Ket
1058194 194 Ket
1059197     End
1060------------------------------------------------------------------
1061Capture group count = 10
1062May match empty string
1063Subject length lower bound = 0
1064
1065/([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)/
1066Failed: error 114 at offset 509: missing closing parenthesis
1067
1068/([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
1069
1070#pattern -fullbincode
1071
1072/\[()]{65535}/expand
1073
1074# End of testinput8
1075