summaryrefslogtreecommitdiff
path: root/HACKING
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2008-04-12 14:36:14 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2008-04-12 14:36:14 +0000
commitbd39c50b17337e4e0f4f77370c0794046e7d2768 (patch)
tree6af19fd983f194e306480c5c9af1e25705bdc3a9 /HACKING
parentf5fb7cc67b4338d6eadac91effd3ff4f30c33dde (diff)
downloadpcre-bd39c50b17337e4e0f4f77370c0794046e7d2768.tar.gz
Do not discard subpatterns with {0} quantifiers, as they may be called as
subroutines. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@335 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING11
1 files changed, 7 insertions, 4 deletions
diff --git a/HACKING b/HACKING
index c946cd2..e76341f 100644
--- a/HACKING
+++ b/HACKING
@@ -318,9 +318,12 @@ maximally respectively. All three are followed by LINK_SIZE bytes giving (as a
positive number) the offset back to the matching bracket opcode.
If a subpattern is quantified such that it is permitted to match zero times, it
-is preceded by one of OP_BRAZERO or OP_BRAMINZERO. These are single-byte
-opcodes which tell the matcher that skipping this subpattern entirely is a
-valid branch.
+is preceded by one of OP_BRAZERO, OP_BRAMINZERO, or OP_SKIPZERO. These are
+single-byte opcodes that tell the matcher that skipping the following
+subpattern entirely is a valid branch. In the case of the first two, not
+skipping the pattern is also valid (greedy and non-greedy). The third is used
+when a pattern has the quantifier {0,0}. It cannot be entirely discarded,
+because it may be called as a subroutine from elsewhere in the regex.
A subpattern with an indefinite maximum repetition is replicated in the
compiled data its minimum number of times (or once with OP_BRAZERO if the
@@ -411,4 +414,4 @@ at compile time, and so does not cause anything to be put into the compiled
data.
Philip Hazel
-August 2007
+April 2008