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