summaryrefslogtreecommitdiff
path: root/doc/pcre2test.1
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-03-24 18:20:34 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-03-24 18:20:34 +0000
commite5d083d660ae9ce4435f11e4d50817ccce984139 (patch)
tree8a04022f69ae60f7320cf64255f86c1e74b45d23 /doc/pcre2test.1
parent1b0e7201eac0498c1db806d26e17a7d2541b0ca4 (diff)
downloadpcre2-e5d083d660ae9ce4435f11e4d50817ccce984139.tar.gz
Make \=find_limits apply to DFA matching, to find the minimum depth limit.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@702 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'doc/pcre2test.1')
-rw-r--r--doc/pcre2test.129
1 files changed, 16 insertions, 13 deletions
diff --git a/doc/pcre2test.1 b/doc/pcre2test.1
index 3238c50..6170bd3 100644
--- a/doc/pcre2test.1
+++ b/doc/pcre2test.1
@@ -1,4 +1,4 @@
-.TH PCRE2TEST 1 "21 March 2017" "PCRE 10.30"
+.TH PCRE2TEST 1 "24 March 2017" "PCRE 10.30"
.SH NAME
pcre2test - a program for testing Perl-compatible regular expressions.
.SH SYNOPSIS
@@ -1052,7 +1052,7 @@ pattern.
copy=<number or name> copy captured substring
depth_limit=<n> set a depth limit
dfa use \fBpcre2_dfa_match()\fP
- find_limits find match and recursion limits
+ find_limits find match and depth limits
get=<number or name> extract captured substring
getall extract all captured substrings
/g global global matching
@@ -1297,23 +1297,26 @@ limits in the match context. These values are ignored when the
.SS "Finding minimum limits"
.rs
.sp
-If the \fBfind_limits\fP modifier is present, \fBpcre2test\fP calls
-\fBpcre2_match()\fP several times, setting different values in the match
-context via \fBpcre2_set_match_limit()\fP and \fBpcre2_set_depth_limit()\fP
-until it finds the minimum values for each parameter that allow
-\fBpcre2_match()\fP to complete without error.
+If the \fBfind_limits\fP modifier is present on a subject line, \fBpcre2test\fP
+calls the relevant matching function several times, setting different values in
+the match context via \fBpcre2_set_match_limit()\fP or
+\fBpcre2_set_depth_limit()\fP until it finds the minimum values for each
+parameter that allows the match to complete without error.
.P
If JIT is being used, only the match limit is relevant. If DFA matching is
-being used, only the depth limit is relevant, but at present this modifier is
-ignored (with a warning message).
+being used, only the depth limit is relevant.
.P
The \fImatch_limit\fP number is a measure of the amount of backtracking
that takes place, and learning the minimum value can be instructive. For most
simple matches, the number is quite small, but for patterns with very large
numbers of matching possibilities, it can become large very quickly with
-increasing length of subject string. The \fIdepth_limit\fP number is
-a measure of how much memory for recording backtracking points is needed to
-complete the match attempt.
+increasing length of subject string.
+.P
+For non-DFA matching, the minimum \fIdepth_limit\fP number is a measure of how
+much memory for recording backtracking points is needed to complete the match
+attempt. In the case of DFA matching, \fIdepth_limit\fP controls the depth of
+recursive calls of the internal function that is used for handling pattern
+recursion, lookaround assertions, and atomic groups.
.
.
.SS "Showing MARK names"
@@ -1765,6 +1768,6 @@ Cambridge, England.
.rs
.sp
.nf
-Last updated: 21 March 2017
+Last updated: 24 March 2017
Copyright (c) 1997-2017 University of Cambridge.
.fi