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