Change 29923 by [EMAIL PROTECTED] on 2007/01/22 19:39:28
Subject: [PATCH] Disable positive lookaround optimisations
From: demerphq <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Date: Sun, 21 Jan 2007 18:53:38 +0100
Affected files ...
... //depot/perl/regcomp.h#114 edit
... //depot/perl/t/op/re_tests#114 edit
Differences ...
==== //depot/perl/regcomp.h#114 (text) ====
Index: perl/regcomp.h
--- perl/regcomp.h#113~29843~ 2007-01-16 07:32:30.000000000 -0800
+++ perl/regcomp.h 2007-01-22 11:39:28.000000000 -0800
@@ -18,7 +18,7 @@
#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
==== //depot/perl/t/op/re_tests#114 (text) ====
Index: perl/t/op/re_tests
--- perl/t/op/re_tests#113~29621~ 2006-12-25 09:03:14.000000000 -0800
+++ perl/t/op/re_tests 2007-01-22 11:39:28.000000000 -0800
@@ -1264,4 +1264,7 @@
(?<=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
End of Patch.