summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-06-01 18:03:18 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-06-01 18:03:18 +0000
commite574068fe71bbf26f7395c1bd3d07b574b292942 (patch)
tree9d12f6f8e0e515d9ae8b6fd2fd6ff906badde77b
parentd8f5978967db14365306fccb4b2d124545a46e9b (diff)
downloadpcre-e574068fe71bbf26f7395c1bd3d07b574b292942.tar.gz
Documentation and other tidying for release.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@972 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--configure.ac2
-rw-r--r--doc/pcrecompat.314
-rw-r--r--doc/pcrepattern.34
-rw-r--r--testdata/testinput13
-rw-r--r--testdata/testinput26
-rw-r--r--testdata/testoutput14
-rw-r--r--testdata/testoutput27
7 files changed, 27 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index fd89d5b..42e3f32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre_major, [8])
m4_define(pcre_minor, [31])
m4_define(pcre_prerelease, [-RC1])
-m4_define(pcre_date, [2012-02-012])
+m4_define(pcre_date, [2012-06-01])
# NOTE: The CMakeLists.txt file searches for the above variables in the first
# 50 lines of this file. Please update that if the variables above are moved.
diff --git a/doc/pcrecompat.3 b/doc/pcrecompat.3
index 1a19aea..45856e4 100644
--- a/doc/pcrecompat.3
+++ b/doc/pcrecompat.3
@@ -95,8 +95,16 @@ in the
.\"
page.
.P
-11. If (*THEN) is present in a group that is called as a subroutine, its action
-is limited to that group, even if the group does not contain any | characters.
+11. If any of the backtracking control verbs are used in an assertion or in a
+subpattern that is called as a subroutine (whether or not recursively), their
+effect is confined to that subpattern; it does not extend to the surrounding
+pattern. This is not always the case in Perl. In particular, if (*THEN) is
+present in a group that is called as a subroutine, its action is limited to
+that group, even if the group does not contain any | characters. There is one
+exception to this: the name from a *(MARK), (*PRUNE), or (*THEN) that is
+encountered in a successful positive assertion \fIis\fP passed back when a
+match succeeds (compare capturing parentheses in assertions). Note that such
+subpatterns are processed as anchored at the point where they are tested.
.P
12. There are some differences that are concerned with the settings of captured
strings when part of a pattern is repeated. For example, matching "aba" against
@@ -175,6 +183,6 @@ Cambridge CB2 3QH, England.
.rs
.sp
.nf
-Last updated: 08 Januray 2012
+Last updated: 01 June 2012
Copyright (c) 1997-2012 University of Cambridge.
.fi
diff --git a/doc/pcrepattern.3 b/doc/pcrepattern.3
index 4910080..ffeba6a 100644
--- a/doc/pcrepattern.3
+++ b/doc/pcrepattern.3
@@ -2599,7 +2599,7 @@ exception: the name from a *(MARK), (*PRUNE), or (*THEN) that is encountered in
a successful positive assertion \fIis\fP passed back when a match succeeds
(compare capturing parentheses in assertions). Note that such subpatterns are
processed as anchored at the point where they are tested. Note also that Perl's
-treatment of subroutines is different in some cases.
+treatment of subroutines and assertions is different in some cases.
.P
The new verbs make use of what was previously invalid syntax: an opening
parenthesis followed by an asterisk. They are generally of the form
@@ -2911,6 +2911,6 @@ Cambridge CB2 3QH, England.
.rs
.sp
.nf
-Last updated: 04 May 2012
+Last updated: 01 June 2012
Copyright (c) 1997-2012 University of Cambridge.
.fi
diff --git a/testdata/testinput1 b/testdata/testinput1
index 7b125f0..40c3dce 100644
--- a/testdata/testinput1
+++ b/testdata/testinput1
@@ -5255,8 +5255,5 @@ name were given. ---/
/(?!a(*COMMIT)b)ac|cd/
ac
-
-/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
- ac
/-- End of testinput1 --/
diff --git a/testdata/testinput2 b/testdata/testinput2
index 2baa867..883d52e 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -3762,5 +3762,11 @@ COMMIT to escape from the assertion. --/
"AB(C(D))(E(F))?(?(?=\2)(?=\4))"
ABCDGHI\O03
+
+/-- This one is here because Perl does not confine the *COMMIT to the
+assertion, and therefore fails the entire subroutine call. --/
+
+/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
+ ac
/-- End of testinput2 --/
diff --git a/testdata/testoutput1 b/testdata/testoutput1
index c3202a9..5191df3 100644
--- a/testdata/testoutput1
+++ b/testdata/testoutput1
@@ -8722,9 +8722,5 @@ No match
/(?!a(*COMMIT)b)ac|cd/
ac
0: ac
-
-/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
- ac
- 0: ac
/-- End of testinput1 --/
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index a5ac180..77b108c 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -12353,5 +12353,12 @@ COMMIT to escape from the assertion. --/
ABCDGHI\O03
Matched, but too many substrings
0: ABCD
+
+/-- This one is here because Perl does not confine the *COMMIT to the
+assertion, and therefore fails the entire subroutine call. --/
+
+/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
+ ac
+ 0: ac
/-- End of testinput2 --/