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

Diff of /code/trunk/testdata/testoutput11

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

revision 457 by ph10, Sat Oct 3 16:24:08 2009 UTC revision 510 by ph10, Sat Mar 27 17:45:29 2010 UTC
# Line 628  No match Line 628  No match
628      abcdef      abcdef
629  No match  No match
630    
631    /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |b(?<quote> (?<apostrophe>')|(?<realquote>")) ) (?('quote')[a-z]+|[0-9]+)/xJ
632        a\"aaaaa
633     0: a"aaaaa
634     1: "
635     2: <unset>
636     3: "
637        b\"aaaaa
638     0: b"aaaaa
639     1: <unset>
640     2: <unset>
641     3: <unset>
642     4: "
643     5: <unset>
644     6: "
645        ** Failers
646    No match
647        b\"11111
648    No match
649    
650    /(?:(?1)|B)(A(*F)|C)/
651        ABCD
652     0: BC
653     1: C
654        CCD
655     0: CC
656     1: C
657        ** Failers
658    No match
659        CAD
660    No match
661    
662    /^(?:(?1)|B)(A(*F)|C)/
663        CCD
664     0: CC
665     1: C
666        BCD
667     0: BC
668     1: C
669        ** Failers
670    No match
671        ABCD
672    No match
673        CAD
674    No match
675        BAD
676    No match
677    
678    /(?:(?1)|B)(A(*ACCEPT)XX|C)D/
679        AAD
680     0: AA
681     1: A
682        ACD
683     0: ACD
684     1: C
685        BAD
686     0: BA
687     1: A
688        BCD
689     0: BCD
690     1: C
691        BAX
692     0: BA
693     1: A
694        ** Failers
695    No match
696        ACX
697    No match
698        ABC
699    No match
700    
701    /(?(DEFINE)(A))B(?1)C/
702        BAC
703     0: BAC
704    
705    /(?(DEFINE)((A)\2))B(?1)C/
706        BAAC
707     0: BAAC
708    
709    /(?<pn> \( ( [^()]++ | (?&pn) )* \) )/x
710        (ab(cd)ef)
711     0: (ab(cd)ef)
712     1: (ab(cd)ef)
713     2: ef
714    
715    /^(?!a(*SKIP)b)/
716        ac
717     0:
718    
719    /^(?=a(*SKIP)b|ac)/
720        ** Failers
721    No match
722        ac
723    No match
724    
725    /^(?=a(*THEN)b|ac)/
726        ac
727     0:
728    
729    /^(?=a(*PRUNE)b)/
730        ab
731     0:
732        ** Failers
733    No match
734        ac
735    No match
736    
737    /^(?=a(*ACCEPT)b)/
738        ac
739     0:
740    
741    /^(?(?!a(*SKIP)b))/
742        ac
743     0:
744    
745    /(?>a\Kb)/
746        ab
747     0: b
748    
749    /((?>a\Kb))/
750        ab
751     0: b
752     1: ab
753    
754    /(a\Kb)/
755        ab
756     0: b
757     1: ab
758    
759    /^a\Kcz|ac/
760        ac
761     0: ac
762    
763    /(?>a\Kbz|ab)/
764        ab
765     0: ab
766    
767    /^(?&t)(?(DEFINE)(?<t>a\Kb))$/
768        ab
769     0: b
770    
771    /^([^()]|\((?1)*\))*$/
772        a(b)c
773     0: a(b)c
774     1: c
775        a(b(c)d)e
776     0: a(b(c)d)e
777     1: e
778    
779    /(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
780        0
781     0: 0
782     1: 0
783        00
784     0: 00
785     1: 00
786     2: 0
787        0000
788     0: 0000
789     1: 0000
790     2: 0
791    
792    /(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
793        0
794     0: 0
795     1: 0
796     2: 0
797        00
798     0: 0
799     1: 0
800     2: 0
801        0000
802     0: 0
803     1: 0
804     2: 0
805    
806    /--- This one does fail, as expected, in Perl. It needs the complex item at the
807         end of the pattern. A single letter instead of (B|D) makes it not fail,
808         which I think is a Perl bug. --- /
809    
810    /A(*COMMIT)(B|D)/
811        ACABX
812    No match
813    
814    /--- Check the use of names for failure ---/
815    
816    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
817        ** Failers
818    No match
819        AC
820    No match, mark = A
821        CB
822    No match, mark = B
823    
824    /(*MARK:A)(*SKIP:B)(C|X)/K
825        C
826     0: C
827     1: C
828    MK: A
829        D
830    No match, mark = A
831    
832    /^(A(*THEN:A)B|C(*THEN:B)D)/K
833        ** Failers
834    No match
835        CB
836    No match, mark = B
837    
838    /^(?:A(*THEN:A)B|C(*THEN:B)D)/K
839        CB
840    No match, mark = B
841    
842    /^(?>A(*THEN:A)B|C(*THEN:B)D)/K
843        CB
844    No match, mark = B
845    
846    /--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
847    that we have to have something complicated such as (B|Z) at the end because,
848    for Perl, a simple character somehow causes an unwanted optimization to mess
849    with the handling of backtracking verbs. ---/
850    
851    /A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
852        AAAC
853     0: AC
854    
855    /--- Test skipping over a non-matching mark. ---/
856    
857    /A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
858        AAAC
859     0: AC
860    
861    /--- Check shorthand for MARK ---/
862    
863    /A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
864        AAAC
865     0: AC
866    
867    /--- This should succeed, as a non-existent skip name disables the skip ---/
868    
869    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
870        AAAC
871     0: AC
872    
873    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
874        AAAC
875     0: AC
876    MK: B
877    
878    /--- We use something more complicated than individual letters here, because
879    that causes different behaviour in Perl. Perhaps it disables some optimization;
880    anyway, the result now matches PCRE in that no tag is passed back for the
881    failures. ---/
882    
883    /(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
884        AABC
885     0: AB
886     1: A
887     2: B
888    MK: A
889        XXYZ
890     0: XXY
891     1: <unset>
892     2: <unset>
893     3: X
894     4: X
895     5: Y
896    MK: B
897        ** Failers
898    No match
899        XAQQ
900    No match
901        XAQQXZZ
902    No match
903        AXQQQ
904    No match
905        AXXQQQ
906    No match
907    
908    /--- COMMIT at the start of a pattern should act like an anchor. Again,
909    however, we need the complication for Perl. ---/
910    
911    /(*COMMIT)(A|P)(B|P)(C|P)/
912        ABCDEFG
913     0: ABC
914     1: A
915     2: B
916     3: C
917        ** Failers
918    No match
919        DEFGABC
920    No match
921    
922    /--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
923    
924    /(\w+)(?>b(*COMMIT))\w{2}/
925        abbb
926     0: abbb
927     1: a
928    
929    /(\w+)b(*COMMIT)\w{2}/
930        abbb
931    No match
932    
933  /-- End of testinput11 --/  /-- End of testinput11 --/

Legend:
Removed from v.457  
changed lines
  Added in v.510

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12