summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:38:29 +0000
committernigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:38:29 +0000
commit9dc6505b56ff9ba2f87071990a26a109dcbfa322 (patch)
tree082d8fe2cf1ed34fb4bd2389de9ebc397f611d87
parent5b147ef568d14b173955c93d7cc4137703d7ac0a (diff)
downloadpcre-9dc6505b56ff9ba2f87071990a26a109dcbfa322.tar.gz
Load pcre-1.07 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@17 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog7
-rw-r--r--internal.h2
-rw-r--r--pcre.c9
-rw-r--r--testinput24
-rw-r--r--testoutput2
-rw-r--r--testoutput28
6 files changed, 27 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c8e93a..118a034 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,13 @@ ChangeLog for PCRE
------------------
+Version 1.07 16-Feb-98
+----------------------
+
+1. A pattern such as /((a)*)*/ was not being diagnosed as in error (unlimited
+repeat of a potentially empty string).
+
+
Version 1.06 23-Jan-98
----------------------
diff --git a/internal.h b/internal.h
index e9d9a76..fd361cb 100644
--- a/internal.h
+++ b/internal.h
@@ -3,7 +3,7 @@
*************************************************/
-#define PCRE_VERSION "1.06 23-Jan-1998"
+#define PCRE_VERSION "1.07 16-Feb-1998"
/* This is a library of functions to support regular expressions whose syntax
diff --git a/pcre.c b/pcre.c
index b3b0c95..25daa07 100644
--- a/pcre.c
+++ b/pcre.c
@@ -264,6 +264,13 @@ do {
case OP_KETRMIN:
return TRUE;
+ /* Skip over entire bracket groups with zero lower bound */
+
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+ cc++;
+ /* Fall through */
+
/* Skip over assertive subpatterns */
case OP_ASSERT:
@@ -278,8 +285,6 @@ do {
case OP_EOD:
case OP_CIRC:
case OP_DOLL:
- case OP_BRAZERO:
- case OP_BRAMINZERO:
case OP_NOT_WORD_BOUNDARY:
case OP_WORD_BOUNDARY:
cc++;
diff --git a/testinput2 b/testinput2
index d5aa14a..e293aef 100644
--- a/testinput2
+++ b/testinput2
@@ -282,5 +282,9 @@
/[^aeiou ]{3,}/
co-processors, and for
\Ico-processors, and for
+
+/((a)*)*/
+
+/((a|b|c)*)*/
/ End of test input /
diff --git a/testoutput b/testoutput
index 7763398..653a377 100644
--- a/testoutput
+++ b/testoutput
@@ -1,5 +1,5 @@
Testing Perl-Compatible Regular Expressions
-PCRE version 1.06 23-Jan-1998
+PCRE version 1.07 16-Feb-1998
/the quick brown fox/
the quick brown fox
diff --git a/testoutput2 b/testoutput2
index 63592a6..b969320 100644
--- a/testoutput2
+++ b/testoutput2
@@ -1,5 +1,5 @@
Testing Perl-Compatible Regular Expressions
-PCRE version 1.06 23-Jan-1998
+PCRE version 1.07 16-Feb-1998
/(a)b|/
Identifying subpattern count = 1
@@ -640,6 +640,12 @@ No first char
0: -pr
\Ico-processors, and for
0: -pr
+
+/((a)*)*/
+Failed: operand of unlimited repeat could match the empty string at offset 6
+
+/((a|b|c)*)*/
+Failed: operand of unlimited repeat could match the empty string at offset 10
/ End of test input /
Identifying subpattern count = 0