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

Diff of /code/trunk/testdata/testoutput1

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

revision 1283 by ph10, Fri Mar 8 11:35:41 2013 UTC revision 1284 by ph10, Fri Mar 15 11:54:58 2013 UTC
# Line 8829  MK: n Line 8829  MK: n
8829   0: ac   0: ac
8830  MK: n  MK: n
8831    
8832    /-- Tests that try to figure out how Perl works. My hypothesis is that the
8833        first verb that is backtracked onto is the one that acts. This seems to be
8834        the case almost all the time, but there is one exception that is perhaps a
8835        bug. --/
8836    
8837    /-- This matches "aaaac"; each PRUNE advances one character until the subject
8838        no longer starts with 5 'a's. --/
8839    
8840    /aaaaa(*PRUNE)b|a+c/
8841        aaaaaac
8842     0: aaaac
8843    
8844    /-- Putting SKIP in front of PRUNE makes no difference, as it is never
8845    backtracked onto, whether or not it has a label. --/
8846    
8847    /aaaaa(*SKIP)(*PRUNE)b|a+c/
8848        aaaaaac
8849     0: aaaac
8850    
8851    /aaaaa(*SKIP:N)(*PRUNE)b|a+c/
8852        aaaaaac
8853     0: aaaac
8854    
8855    /aaaa(*:N)a(*SKIP:N)(*PRUNE)b|a+c/
8856        aaaaaac
8857     0: aaaac
8858    
8859    /-- Putting THEN in front makes no difference. */
8860    
8861    /aaaaa(*THEN)(*PRUNE)b|a+c/
8862        aaaaaac
8863     0: aaaac
8864    
8865    /-- However, putting COMMIT in front of the prune changes it to "no match". I
8866        think this is inconsistent and possibly a bug. For the moment, running this
8867        test is moved out of the Perl-compatible file. --/
8868    
8869    /aaaaa(*COMMIT)(*PRUNE)b|a+c/
8870    
8871    
8872    /---- OK, lets play the same game again using SKIP instead of PRUNE. ----/
8873    
8874    /-- This matches "ac" because SKIP forces the next match to start on the
8875        sixth "a". --/
8876    
8877    /aaaaa(*SKIP)b|a+c/
8878        aaaaaac
8879     0: ac
8880    
8881    /-- Putting PRUNE in front makes no difference. --/
8882    
8883    /aaaaa(*PRUNE)(*SKIP)b|a+c/
8884        aaaaaac
8885     0: ac
8886    
8887    /-- Putting THEN in front makes no difference. --/
8888    
8889    /aaaaa(*THEN)(*SKIP)b|a+c/
8890        aaaaaac
8891     0: ac
8892    
8893    /-- In this case, neither does COMMIT. This still matches "ac". --/
8894    
8895    /aaaaa(*COMMIT)(*SKIP)b|a+c/
8896        aaaaaac
8897     0: ac
8898    
8899    /-- This gives "no match", as expected. --/
8900    
8901    /aaaaa(*COMMIT)b|a+c/
8902        aaaaaac
8903    No match
8904    
8905    
8906    /------ Tests using THEN ------/
8907    
8908    /-- This matches "aaaaaac", as expected. --/
8909    
8910    /aaaaa(*THEN)b|a+c/
8911        aaaaaac
8912     0: aaaaaac
8913    
8914    /-- Putting SKIP in front makes no difference. --/
8915    
8916    /aaaaa(*SKIP)(*THEN)b|a+c/
8917        aaaaaac
8918     0: aaaaaac
8919    
8920    /-- Putting PRUNE in front makes no difference. --/
8921    
8922    /aaaaa(*PRUNE)(*THEN)b|a+c/
8923        aaaaaac
8924     0: aaaaaac
8925    
8926    /-- Putting COMMIT in front makes no difference. --/
8927    
8928    /aaaaa(*COMMIT)(*THEN)b|a+c/
8929        aaaaaac
8930     0: aaaaaac
8931    
8932  /-- End of testinput1 --/  /-- End of testinput1 --/

Legend:
Removed from v.1283  
changed lines
  Added in v.1284

  ViewVC Help
Powered by ViewVC 1.1.5