Disable positive lookaround optimisations
Yves Orton [Sun, 21 Jan 2007 18:53:38 +0000 (19:53 +0100)]
Message-ID: <9b18b3110701210953l4df6198re36a9342e6049583@mail.gmail.com>
Date: Sun, 21 Jan 2007 18:53:38 +0100

p4raw-id: //depot/perl@29923

regcomp.h
t/op/re_tests

index 898fb8e..51b14b7 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -18,7 +18,7 @@ typedef OP OP_4tree;                  /* Will be redefined later. */
 #define PERL_ENABLE_EXTENDED_TRIE_OPTIMISATION 1
 
 /* Should the optimiser take positive assertions into account? */
-#define PERL_ENABLE_POSITIVE_ASSERTION_STUDY 1
+#define PERL_ENABLE_POSITIVE_ASSERTION_STUDY 0
 
 /* Not for production use: */
 #define PERL_ENABLE_EXPERIMENTAL_REGEX_OPTIMISATIONS 0
index 1700588..fca6b11 100644 (file)
@@ -1264,4 +1264,7 @@ a*(*F)    aaaab   n       -       -
 (?<=bar>ABC)foo        bar>ABCfoo      y       $&      foo
 (?<!bar>ABC)foo        bar>ABCfoo      n       -       -
 (?<bar>)foo    bar>ABCfoo      y       $&      foo
-(?<bar>ABC)foo bar>ABCfoo      y       $&      ABCfoo
\ No newline at end of file
+(?<bar>ABC)foo bar>ABCfoo      y       $&      ABCfoo
+
+(?<=abcd(?<=(aaaabcd)))        ..aaaabcd..     y       $1      aaaabcd
+(?=xy(?<=(aaxy)))      ..aaxy..        y       $1      aaxy