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