/[pcre]/code/trunk/testdata/testoutput2
ViewVC logotype

Diff of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 937 by ph10, Sun Feb 26 15:58:56 2012 UTC revision 1304 by ph10, Fri Mar 29 14:25:40 2013 UTC
# Line 634  Capturing subpattern count = 0 Line 634  Capturing subpattern count = 0
634  Options: anchored multiline  Options: anchored multiline
635  No first char  No first char
636  No need char  No need char
637    Max lookbehind = 1
638    
639  /^abc/Im  /^abc/Im
640  Capturing subpattern count = 0  Capturing subpattern count = 0
# Line 768  Max lookbehind = 3 Line 769  Max lookbehind = 3
769  /(?>.*)(?<=(abcd)|(xyz))/I  /(?>.*)(?<=(abcd)|(xyz))/I
770  Capturing subpattern count = 2  Capturing subpattern count = 2
771  No options  No options
772  First char at start or follows newline  No first char
773  No need char  No need char
774  Max lookbehind = 4  Max lookbehind = 4
775      alphabetabcd      alphabetabcd
# Line 823  No match Line 824  No match
824      fooabar      fooabar
825  No match  No match
826    
 /This one is here because Perl 5.005_02 doesn't fail it/I  
 Capturing subpattern count = 0  
 No options  
 First char = 'T'  
 Need char = 't'  
   
 /^(a)?(?(1)a|b)+$/I  
 Capturing subpattern count = 1  
 Options: anchored  
 No first char  
 No need char  
     *** Failers  
 No match  
     a  
 No match  
   
827  /This one is here because Perl behaves differently; see also the following/I  /This one is here because Perl behaves differently; see also the following/I
828  Capturing subpattern count = 0  Capturing subpattern count = 0
829  No options  No options
# Line 9276  No need char Line 9261  No need char
9261   +7 ^ ^     b   +7 ^ ^     b
9262   +7 ^^      b   +7 ^^      b
9263   +7 ^       b   +7 ^       b
9264    +11 ^       ^
9265  +12 ^       )  +12 ^       )
9266  +13 ^  +13 ^
9267   0:   0:
# Line 9406  No match Line 9392  No match
9392   +3 ^ ^      (?(?=[a])[^"])   +3 ^ ^      (?(?=[a])[^"])
9393   +5 ^ ^      (?=[a])   +5 ^ ^      (?=[a])
9394   +8 ^ ^      [a]   +8 ^ ^      [a]
9395    +17 ^ ^      |
9396  +21 ^ ^      "  +21 ^ ^      "
9397  +18 ^ ^      b  +18 ^ ^      b
9398  +19 ^  ^     )  +19 ^  ^     )
9399   +3 ^  ^     (?(?=[a])[^"])   +3 ^  ^     (?(?=[a])[^"])
9400   +5 ^  ^     (?=[a])   +5 ^  ^     (?=[a])
9401   +8 ^  ^     [a]   +8 ^  ^     [a]
9402    +17 ^  ^     |
9403  +21 ^  ^     "  +21 ^  ^     "
9404  +22 ^   ^    $  +22 ^   ^    $
9405  +23 ^   ^  +23 ^   ^
# Line 9719  Partial match: abc12 Line 9707  Partial match: abc12
9707      xyzabc123pqr      xyzabc123pqr
9708   0: 123   0: 123
9709      xyzabc12\P      xyzabc12\P
9710  Partial match: abc12  Partial match at offset 6: abc12
9711      xyzabc12\P\P      xyzabc12\P\P
9712  Partial match: abc12  Partial match at offset 6: abc12
9713    
9714  /\babc\b/  /\babc\b/
9715      +++abc+++      +++abc+++
9716   0: abc   0: abc
9717      +++ab\P      +++ab\P
9718  Partial match: +ab  Partial match at offset 3: +ab
9719      +++ab\P\P      +++ab\P\P
9720  Partial match: +ab  Partial match at offset 3: +ab
9721    
9722  /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ  /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
9723  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 10110  No set of starting bytes Line 10098  No set of starting bytes
10098  "(?>.*/)foo"SI  "(?>.*/)foo"SI
10099  Capturing subpattern count = 0  Capturing subpattern count = 0
10100  No options  No options
10101  First char at start or follows newline  No first char
10102  Need char = 'o'  Need char = 'o'
10103  Subject length lower bound = 4  Subject length lower bound = 4
10104  No set of starting bytes  No set of starting bytes
# Line 10353  Partial match: abca Line 10341  Partial match: abca
10341      xxxxabcde\P\P      xxxxabcde\P\P
10342  Partial match: abcde  Partial match: abcde
10343    
10344  /-- This is not in the Perl >= 5.10 test because Perl seems currently to be  /-- This is not in the Perl-compatible test because Perl seems currently to be
10345      broken and not behaving as specified in that it *does* bumpalong after      broken and not behaving as specified in that it *does* bumpalong after
10346      hitting (*COMMIT). --/      hitting (*COMMIT). --/
10347    
# Line 10549  No match Line 10537  No match
10537          End          End
10538  ------------------------------------------------------------------  ------------------------------------------------------------------
10539    
10540  / -- The first four of these are not in the Perl >= 5.10 test because Perl  / -- This one is here because Perl gives the match as "b" rather than "ab". I
      documents that the use of \K in assertions is "not well defined". The  
      last is here because Perl gives the match as "b" rather than "ab". I  
10541       believe this to be a Perl bug. --/       believe this to be a Perl bug. --/
10542    
 /(?=a\Kb)ab/  
     ab  
  0: b  
   
 /(?!a\Kb)ac/  
     ac  
  0: ac  
   
 /^abc(?<=b\Kc)d/  
     abcd  
  0: cd  
   
 /^abc(?<!b\Kq)d/  
     abcd  
  0: abcd  
   
10543  /(?>a\Kb)z|(ab)/  /(?>a\Kb)z|(ab)/
10544      ab      ab
10545   0: ab   0: ab
10546   1: ab   1: ab
10547    
 /----------------------/  
   
10548  /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/  /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
10549  Failed: recursive call could loop indefinitely at offset 31  Failed: recursive call could loop indefinitely at offset 31
10550    
# Line 10596  Failed: an argument is not allowed for ( Line 10564  Failed: an argument is not allowed for (
10564      ACABX      ACABX
10565  No match  No match
10566    
10567  /--- These should be different, but in Perl 5.11 are not, which I think  /--- These should be different, but in Perl they are not, which I think
10568       is a bug in Perl. ---/       is a bug in Perl. ---/
10569    
10570  /A(*THEN)B|A(*THEN)C/K  /A(*THEN)B|A(*THEN)C/K
# Line 10607  No match Line 10575  No match
10575      AC      AC
10576  No match  No match
10577    
 /--- This should fail; the SKIP advances by one, but when we get to AC, the  
      PRUNE kills it. Perl behaves differently. ---/  
   
 /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK  
     AAAC  
 No match, mark = A  
   
10578  /--- Mark names can be duplicated. Perl doesn't give a mark for this one,  /--- Mark names can be duplicated. Perl doesn't give a mark for this one,
10579  though PCRE does. ---/  though PCRE does. ---/
10580    
# Line 10647  No match Line 10608  No match
10608      abcccd      abcccd
10609  No match  No match
10610    
10611  /--- Perl 5.11 gets some of these wrong ---/  /--- Perl gets some of these wrong ---/
10612    
10613  /(?>.(*ACCEPT))*?5/  /(?>.(*ACCEPT))*?5/
10614      abcde      abcde
# Line 10755  No match Line 10716  No match
10716  /\s*\R/BZ  /\s*\R/BZ
10717  ------------------------------------------------------------------  ------------------------------------------------------------------
10718          Bra          Bra
10719          \s*+          \s*
10720          \R          \R
10721          Ket          Ket
10722          End          End
10723  ------------------------------------------------------------------  ------------------------------------------------------------------
10724        \x20\x0a
10725     0:  \x0a
10726        \x20\x0d
10727     0:  \x0d
10728        \x20\x0d\x0a
10729     0:  \x0d\x0a
10730    
10731  /-- Perl treats this one differently, not failing the second string. I believe  /\S*\R/BZ
10732      that is a bug in Perl. --/  ------------------------------------------------------------------
10733            Bra
10734            \S*+
10735            \R
10736            Ket
10737            End
10738    ------------------------------------------------------------------
10739        a\x0a
10740     0: a\x0a
10741    
10742  /^((abc|abcx)(*THEN)y|abcd)/  /X\h*\R/BZ
10743      abcd  ------------------------------------------------------------------
10744   0: abcd          Bra
10745   1: abcd          X
10746      *** Failers          \h*+
10747  No match          \R
10748      abcxy          Ket
10749            End
10750    ------------------------------------------------------------------
10751        X\x20\x0a
10752     0: X \x0a
10753    
10754    /X\H*\R/BZ
10755    ------------------------------------------------------------------
10756            Bra
10757            X
10758            \H*
10759            \R
10760            Ket
10761            End
10762    ------------------------------------------------------------------
10763        X\x0d\x0a
10764     0: X\x0d\x0a
10765    
10766    /X\H+\R/BZ
10767    ------------------------------------------------------------------
10768            Bra
10769            X
10770            \H+
10771            \R
10772            Ket
10773            End
10774    ------------------------------------------------------------------
10775        X\x0d\x0a
10776     0: X\x0d\x0a
10777    
10778    /X\H++\R/BZ
10779    ------------------------------------------------------------------
10780            Bra
10781            X
10782            \H++
10783            \R
10784            Ket
10785            End
10786    ------------------------------------------------------------------
10787        X\x0d\x0a
10788  No match  No match
10789    
10790  /(?<=abc)def/  /(?<=abc)def/
10791      abc\P\P      abc\P\P
10792  Partial match: abc  Partial match at offset 3: abc
10793    
10794  /abc$/  /abc$/
10795      abc      abc
# Line 11254  No match Line 11268  No match
11268    
11269  /(a)b|ac/++SS  /(a)b|ac/++SS
11270      ac\O3      ac\O3
 Matched, but too many substrings  
11271   0: ac   0: ac
11272   0+   0+
11273    
# Line 11630  Max lookbehind = 1 Line 11643  Max lookbehind = 1
11643  Subject length lower bound = 8  Subject length lower bound = 8
11644  Starting byte set: < o t u  Starting byte set: < o t u
11645    
11646  /a(*SKIP)c|b(*ACCEPT)|/+SI  /a(*SKIP)c|b(*ACCEPT)|/+S!I
11647  Capturing subpattern count = 0  Capturing subpattern count = 0
11648  No options  No options
11649  No first char  No first char
11650  No need char  No need char
11651  Study returned NULL  Subject length lower bound = -1
11652    No set of starting bytes
11653      a      a
11654   0:   0:
11655   0+   0+
# Line 11696  Minimum match() limit = 86 Line 11710  Minimum match() limit = 86
11710  Minimum match() recursion limit = 45  Minimum match() recursion limit = 45
11711   0: abbbbbbbbbbbbbbbbbbbbba   0: abbbbbbbbbbbbbbbbbbbbba
11712    
 /-- These tests are in agreement with development Perl 5.015, which has fixed  
     some things, but they don't all work with 5.012, so they aren't in the  
     Perl-compatible tests. Those after the first come from Perl's own test  
     files. --/  
   
 /^((yes|no)(*THEN)(*F))?/  
   yes  
 No match  
   
 /(A (.*)   C? (*THEN)  | A D) (*FAIL)/x  
 AbcdCBefgBhiBqz  
 No match  
   
 /(A (.*)   C? (*THEN)  | A D) z/x  
 AbcdCBefgBhiBqz  
 No match  
   
 /(A (.*)   C? (*THEN)  | A D) \s* (*FAIL)/x  
 AbcdCBefgBhiBqz  
 No match  
   
 /(A (.*)   C? (*THEN)  | A D) \s* z/x  
 AbcdCBefgBhiBqz  
 No match  
   
 /(A (.*)   (?:C|) (*THEN)  | A D) (*FAIL)/x  
 AbcdCBefgBhiBqz  
 No match  
   
 /(A (.*)   (?:C|) (*THEN)  | A D) z/x  
 AbcdCBefgBhiBqz  
 No match  
   
 /(A (.*)   C{0,6} (*THEN)  | A D) (*FAIL)/x  
 AbcdCBefgBhiBqz  
 No match  
   
 /(A (.*)   C{0,6} (*THEN)  | A D) z/x  
 AbcdCBefgBhiBqz  
 No match  
   
 /(A (.*)   (CE){0,6} (*THEN)  | A D) (*FAIL)/x  
 AbcdCEBefgBhiBqz  
 No match  
   
 /(A (.*)   (CE){0,6} (*THEN)  | A D) z/x  
 AbcdCEBefgBhiBqz  
 No match  
   
 /(A (.*)   (CE*){0,6} (*THEN)  | A D) (*FAIL)/x  
 AbcdCBefgBhiBqz  
 No match  
   
 /(A (.*)   (CE*){0,6} (*THEN)  | A D) z/x  
 AbcdCBefgBhiBqz  
 No match  
   
 /-----------------------------------------------/  
   
11713  /^(?>a+)(?>(z+))\w/BZ  /^(?>a+)(?>(z+))\w/BZ
11714  ------------------------------------------------------------------  ------------------------------------------------------------------
11715          Bra          Bra
# Line 12271  Partial match: \x0d\x0d Line 12226  Partial match: \x0d\x0d
12226      \r\r\r\P\P      \r\r\r\P\P
12227   0: \x0d\x0d   0: \x0d\x0d
12228    
12229  /-- This one is here because Perl does not match: it seems to allow the COMMIT  "AB(C(D))(E(F))?(?(?=\2)(?=\4))"
12230  to escape from the assertion. --/      ABCDGHI\O03
12231    Matched, but too many substrings
12232     0: ABCD
12233    
12234    /-- These are all run as real matches in test 1; here we are just checking the
12235    settings of the anchored and startline bits. --/
12236    
12237  /(?=a(*COMMIT)b|ac)ac|ac/  /(?>.*?a)(?<=ba)/I
12238      ac  Capturing subpattern count = 0
12239    No options
12240    No first char
12241    Need char = 'a'
12242    Max lookbehind = 2
12243    
12244    /(?:.*?a)(?<=ba)/I
12245    Capturing subpattern count = 0
12246    No options
12247    First char at start or follows newline
12248    Need char = 'a'
12249    Max lookbehind = 2
12250    
12251    /.*?a(*PRUNE)b/I
12252    Capturing subpattern count = 0
12253    No options
12254    No first char
12255    Need char = 'b'
12256    
12257    /.*?a(*PRUNE)b/sI
12258    Capturing subpattern count = 0
12259    Options: dotall
12260    No first char
12261    Need char = 'b'
12262    
12263    /^a(*PRUNE)b/sI
12264    Capturing subpattern count = 0
12265    Options: anchored dotall
12266    No first char
12267    No need char
12268    
12269    /.*?a(*SKIP)b/I
12270    Capturing subpattern count = 0
12271    No options
12272    No first char
12273    Need char = 'b'
12274    
12275    /(?>.*?a)b/sI
12276    Capturing subpattern count = 0
12277    Options: dotall
12278    No first char
12279    Need char = 'b'
12280    
12281    /(?>.*?a)b/I
12282    Capturing subpattern count = 0
12283    No options
12284    No first char
12285    Need char = 'b'
12286    
12287    /(?>^a)b/sI
12288    Capturing subpattern count = 0
12289    Options: anchored dotall
12290    No first char
12291    No need char
12292    
12293    /(?>.*?)(?<=(abcd)|(wxyz))/I
12294    Capturing subpattern count = 2
12295    No options
12296    No first char
12297    No need char
12298    Max lookbehind = 4
12299    
12300    /(?>.*)(?<=(abcd)|(wxyz))/I
12301    Capturing subpattern count = 2
12302    No options
12303    No first char
12304    No need char
12305    Max lookbehind = 4
12306    
12307    "(?>.*)foo"I
12308    Capturing subpattern count = 0
12309    No options
12310    No first char
12311    Need char = 'o'
12312    
12313    "(?>.*?)foo"I
12314    Capturing subpattern count = 0
12315    No options
12316    No first char
12317    Need char = 'o'
12318    
12319    /(?>^abc)/mI
12320    Capturing subpattern count = 0
12321    Options: multiline
12322    First char at start or follows newline
12323    Need char = 'c'
12324    
12325    /(?>.*abc)/mI
12326    Capturing subpattern count = 0
12327    Options: multiline
12328    No first char
12329    Need char = 'c'
12330    
12331    /(?:.*abc)/mI
12332    Capturing subpattern count = 0
12333    Options: multiline
12334    First char at start or follows newline
12335    Need char = 'c'
12336    
12337    /-- Check PCRE_STUDY_EXTRA_NEEDED --/
12338    
12339    /.?/S-I
12340    Capturing subpattern count = 0
12341    No options
12342    No first char
12343    No need char
12344    Study returned NULL
12345    
12346    /.?/S!I
12347    Capturing subpattern count = 0
12348    No options
12349    No first char
12350    No need char
12351    Subject length lower bound = -1
12352    No set of starting bytes
12353    
12354    /(?:(a)+(?C1)bb|aa(?C2)b)/
12355        aab\C+
12356    Callout 1: last capture = 1
12357     0: <unset>
12358     1: a
12359    --->aab
12360        ^ ^     b
12361    Callout 1: last capture = 1
12362     0: <unset>
12363     1: a
12364    --->aab
12365        ^^      b
12366    Callout 2: last capture = -1
12367     0: <unset>
12368    --->aab
12369        ^ ^     b
12370     0: aab
12371    
12372    /(?:(a)++(?C1)bb|aa(?C2)b)/
12373        aab\C+
12374    Callout 1: last capture = 1
12375     0: <unset>
12376     1: a
12377    --->aab
12378        ^ ^     b
12379    Callout 2: last capture = -1
12380     0: <unset>
12381    --->aab
12382        ^ ^     b
12383     0: aab
12384    
12385    /(?:(?>(a))(?C1)bb|aa(?C2)b)/
12386        aab\C+
12387    Callout 1: last capture = 1
12388     0: <unset>
12389     1: a
12390    --->aab
12391        ^^      b
12392    Callout 2: last capture = -1
12393     0: <unset>
12394    --->aab
12395        ^ ^     b
12396     0: aab
12397    
12398    /(?:(?1)(?C1)x|ab(?C2))((a)){0}/
12399        aab\C+
12400    Callout 1: last capture = -1
12401     0: <unset>
12402    --->aab
12403        ^^      x
12404    Callout 1: last capture = -1
12405     0: <unset>
12406    --->aab
12407         ^^     x
12408    Callout 2: last capture = -1
12409     0: <unset>
12410    --->aab
12411         ^ ^    )
12412     0: ab
12413    
12414    /(?1)(?C1)((a)(?C2)){0}/
12415        aab\C+
12416    Callout 2: last capture = 2
12417     0: <unset>
12418     1: <unset>
12419     2: a
12420    --->aab
12421        ^^      )
12422    Callout 1: last capture = -1
12423     0: <unset>
12424    --->aab
12425        ^^      ((a)(?C2)){0}
12426     0: a
12427    
12428    /(?:(a)+(?C1)bb|aa(?C2)b)++/
12429        aab\C+
12430    Callout 1: last capture = 1
12431     0: <unset>
12432     1: a
12433    --->aab
12434        ^ ^     b
12435    Callout 1: last capture = 1
12436     0: <unset>
12437     1: a
12438    --->aab
12439        ^^      b
12440    Callout 2: last capture = -1
12441     0: <unset>
12442    --->aab
12443        ^ ^     b
12444     0: aab
12445        aab\C+\O2
12446    Callout 1: last capture = 1
12447     0: <unset>
12448    --->aab
12449        ^ ^     b
12450    Callout 1: last capture = 1
12451     0: <unset>
12452    --->aab
12453        ^^      b
12454    Callout 2: last capture = -1
12455     0: <unset>
12456    --->aab
12457        ^ ^     b
12458     0: aab
12459    
12460    /(ab)x|ab/
12461        ab\O3
12462     0: ab
12463        ab\O2
12464     0: ab
12465    
12466    /(ab)/
12467        ab\O3
12468    Matched, but too many substrings
12469     0: ab
12470        ab\O2
12471    Matched, but too many substrings
12472     0: ab
12473    
12474    /(?<=123)(*MARK:xx)abc/K
12475        xxxx123a\P\P
12476    Partial match at offset 7, mark=xx: 123a
12477        xxxx123a\P
12478    Partial match at offset 7, mark=xx: 123a
12479    
12480    /123\Kabc/
12481        xxxx123a\P\P
12482    Partial match: 123a
12483        xxxx123a\P
12484    Partial match: 123a
12485    
12486    /^(?(?=a)aa|bb)/C
12487        bb
12488    --->bb
12489     +0 ^      ^
12490     +1 ^      (?(?=a)aa|bb)
12491     +3 ^      (?=a)
12492     +6 ^      a
12493    +11 ^      b
12494    +12 ^^     b
12495    +13 ^ ^    )
12496    +14 ^ ^
12497     0: bb
12498    
12499    /(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/
12500        bb
12501    --->bb
12502      1 ^      ^
12503      2 ^      (?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))
12504     99 ^      (?=(?C3)a(?C4))
12505      3 ^      a
12506      8 ^      b
12507      9 ^^     b
12508     10 ^ ^    )
12509     11 ^ ^
12510     0: bb
12511    
12512    /-- Perl seems to have a bug with this one --/
12513    
12514    /aaaaa(*COMMIT)(*PRUNE)b|a+c/
12515        aaaaaac
12516     0: aaaac
12517    
12518    /-- Here are some that Perl treats differently because of the way it handles
12519    backtracking verbs. --/
12520    
12521     /(?!a(*COMMIT)b)ac|ad/
12522         ac
12523   0: ac   0: ac
12524         ad
12525     0: ad
12526    
12527    /^(?!a(*THEN)b|ac)../
12528         ac
12529    No match
12530         ad
12531     0: ad
12532    
12533    /^(?=a(*THEN)b|ac)/
12534        ac
12535     0:
12536    
12537    /\A.*?(?:a|b(*THEN)c)/
12538        ba
12539     0: ba
12540    
12541    /\A.*?(?:a|b(*THEN)c)++/
12542        ba
12543     0: ba
12544    
12545    /\A.*?(?:a|b(*THEN)c|d)/
12546        ba
12547     0: ba
12548    
12549    /(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/
12550        aac
12551     0: aac
12552    
12553    /\A.*?(a|b(*THEN)c)/
12554        ba
12555     0: ba
12556     1: a
12557    
12558    /^(A(*THEN)B|A(*THEN)D)/
12559        AD
12560     0: AD
12561     1: AD
12562    
12563    /(?!b(*THEN)a)bn|bnn/
12564        bnn
12565     0: bn
12566    
12567    /(?(?=b(*SKIP)a)bn|bnn)/
12568        bnn
12569    No match
12570    
12571    /(?=b(*THEN)a|)bn|bnn/
12572        bnn
12573     0: bn
12574    
12575    /-------------------------/
12576    
12577  /-- End of testinput2 --/  /-- End of testinput2 --/

Legend:
Removed from v.937  
changed lines
  Added in v.1304

  ViewVC Help
Powered by ViewVC 1.1.5