Documentation update.

This commit is contained in:
Philip.Hazel 2017-04-17 15:24:41 +00:00
parent 486a66681f
commit 79bbc574a0
5 changed files with 64 additions and 29 deletions

View File

@ -19,7 +19,7 @@ SYNOPSIS
<b>#include &#60;pcre2.h&#62;</b>
</P>
<P>
<b>const unsigned char *pcre2_maketables(pcre22_general_context *<i>gcontext</i>);</b>
<b>const unsigned char *pcre2_maketables(pcre2_general_context *<i>gcontext</i>);</b>
</P>
<br><b>
DESCRIPTION

View File

@ -1331,9 +1331,26 @@ documentation.
PCRE2_ENDANCHORED
</pre>
If this bit is set, the end of any pattern match must be right at the end of
the string being searched (the "subject string"). This effect can also be
the string being searched (the "subject string"). If the pattern match
succeeds by reaching (*ACCEPT), but does not reach the end of the subject, the
match fails at the current starting point. For unanchored patterns, a new match
is then tried at the next starting point. However, if the match succeeds by
reaching the end of the pattern, but not the end of the subject, backtracking
occurs and an alternative match may be found. Consider these two patterns:
<pre>
.(*ACCEPT)|..
.|..
</pre>
If matched against "abc" with PCRE2_ENDANCHORED set, the first matches "c"
whereas the second matches "bc". The effect of PCRE2_ENDANCHORED can also be
achieved by appropriate constructs in the pattern itself, which is the only way
to do it in Perl.
</P>
<P>
For DFA matching with <b>pcre2_dfa_match()</b>, PCRE2_ENDANCHORED applies only
to the first (that is, the longest) matched string. Other parallel matches,
which are necessarily substrings of the first one, must obviously end before
the end of the subject.
<pre>
PCRE2_EXTENDED
</pre>
@ -3327,7 +3344,7 @@ Cambridge, England.
</P>
<br><a name="SEC42" href="#TOC1">REVISION</a><br>
<P>
Last updated: 11 April 2017
Last updated: 14 April 2017
<br>
Copyright &copy; 1997-2017 University of Cambridge.
<br>

View File

@ -206,8 +206,8 @@ callouts such as the example above are obeyed.
<br><a name="SEC4" href="#TOC1">THE CALLOUT INTERFACE</a><br>
<P>
During matching, when PCRE2 reaches a callout point, if an external function is
set in the match context, it is called. This applies to both normal and DFA
matching. The first argument to the callout function is a pointer to a
provided in the match context, it is called. This applies to both normal and
DFA matching. The first argument to the callout function is a pointer to a
<b>pcre2_callout</b> block. The second argument is the void * callout data that
was supplied when the callout was set up by calling <b>pcre2_set_callout()</b>
(see the
@ -276,7 +276,7 @@ callout.
</P>
<P>
The <i>offset_vector</i> field is a pointer to a vector of capturing offsets
(the "ovector"). You may read certain elements in this vector, but you must not
(the "ovector"). You may read the elements in this vector, but you must not
change any of them.
</P>
<P>
@ -299,10 +299,11 @@ for example, when the callout in the pattern ((a)(b))(?C2) is taken,
<P>
The contents of ovector[2] to ovector[&#60;capture_top&#62;*2-1] can be inspected in
order to extract substrings that have been matched so far, in the same way as
extracting substrings after a match has completed. The values in ovector[0] and
ovector[1] are undefined and should not be used in any way. Substrings that
have not been captured (but whose numbers are less than <i>capture_top</i>) have
both of their ovector slots set to PCRE2_UNSET.
extracting substrings after a match has completed. The values in ovector[0] and
ovector[1] are always PCRE2_UNSET because the match is by definition not
complete. Substrings that have not been captured but whose numbers are less
than <i>capture_top</i> also have both of their ovector slots set to
PCRE2_UNSET.
</P>
<P>
For DFA matching, the <i>offset_vector</i> field points to the ovector that was
@ -427,7 +428,7 @@ Cambridge, England.
</P>
<br><a name="SEC8" href="#TOC1">REVISION</a><br>
<P>
Last updated: 29 March 2017
Last updated: 14 April 2017
<br>
Copyright &copy; 1997-2017 University of Cambridge.
<br>

View File

@ -1351,10 +1351,27 @@ COMPILING A PATTERN
PCRE2_ENDANCHORED
If this bit is set, the end of any pattern match must be right at the
end of the string being searched (the "subject string"). This effect
can also be achieved by appropriate constructs in the pattern itself,
end of the string being searched (the "subject string"). If the pattern
match succeeds by reaching (*ACCEPT), but does not reach the end of the
subject, the match fails at the current starting point. For unanchored
patterns, a new match is then tried at the next starting point. How-
ever, if the match succeeds by reaching the end of the pattern, but not
the end of the subject, backtracking occurs and an alternative match
may be found. Consider these two patterns:
.(*ACCEPT)|..
.|..
If matched against "abc" with PCRE2_ENDANCHORED set, the first matches
"c" whereas the second matches "bc". The effect of PCRE2_ENDANCHORED
can also be achieved by appropriate constructs in the pattern itself,
which is the only way to do it in Perl.
For DFA matching with pcre2_dfa_match(), PCRE2_ENDANCHORED applies only
to the first (that is, the longest) matched string. Other parallel
matches, which are necessarily substrings of the first one, must obvi-
ously end before the end of the subject.
PCRE2_EXTENDED
If this bit is set, most white space characters in the pattern are
@ -3241,7 +3258,7 @@ AUTHOR
REVISION
Last updated: 11 April 2017
Last updated: 14 April 2017
Copyright (c) 1997-2017 University of Cambridge.
------------------------------------------------------------------------------
@ -3965,12 +3982,12 @@ MISSING CALLOUTS
THE CALLOUT INTERFACE
During matching, when PCRE2 reaches a callout point, if an external
function is set in the match context, it is called. This applies to
both normal and DFA matching. The first argument to the callout func-
tion is a pointer to a pcre2_callout block. The second argument is the
void * callout data that was supplied when the callout was set up by
calling pcre2_set_callout() (see the pcre2api documentation). The call-
out block structure contains the following fields:
function is provided in the match context, it is called. This applies
to both normal and DFA matching. The first argument to the callout
function is a pointer to a pcre2_callout block. The second argument is
the void * callout data that was supplied when the callout was set up
by calling pcre2_set_callout() (see the pcre2api documentation). The
callout block structure contains the following fields:
uint32_t version;
uint32_t callout_number;
@ -4027,8 +4044,8 @@ THE CALLOUT INTERFACE
of callout.
The offset_vector field is a pointer to a vector of capturing offsets
(the "ovector"). You may read certain elements in this vector, but you
must not change any of them.
(the "ovector"). You may read the elements in this vector, but you must
not change any of them.
For calls to pcre2_match(), the offset_vector field is not (since
release 10.30) a pointer to the actual ovector that was passed to the
@ -4049,10 +4066,10 @@ THE CALLOUT INTERFACE
The contents of ovector[2] to ovector[<capture_top>*2-1] can be
inspected in order to extract substrings that have been matched so far,
in the same way as extracting substrings after a match has completed.
The values in ovector[0] and ovector[1] are undefined and should not be
used in any way. Substrings that have not been captured (but whose num-
bers are less than capture_top) have both of their ovector slots set to
PCRE2_UNSET.
The values in ovector[0] and ovector[1] are always PCRE2_UNSET because
the match is by definition not complete. Substrings that have not been
captured but whose numbers are less than capture_top also have both of
their ovector slots set to PCRE2_UNSET.
For DFA matching, the offset_vector field points to the ovector that
was passed to the matching function in the match data block, but it
@ -4170,7 +4187,7 @@ AUTHOR
REVISION
Last updated: 29 March 2017
Last updated: 14 April 2017
Copyright (c) 1997-2017 University of Cambridge.
------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
.TH PCRE2_MAKETABLES 3 "24 March 2017" "PCRE2 10.30"
.TH PCRE2_MAKETABLES 3 "17 April 2017" "PCRE2 10.30"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.SH SYNOPSIS
@ -7,7 +7,7 @@ PCRE2 - Perl-compatible regular expressions (revised API)
.B #include <pcre2.h>
.PP
.SM
.B const unsigned char *pcre2_maketables(pcre22_general_context *\fIgcontext\fP);
.B const unsigned char *pcre2_maketables(pcre2_general_context *\fIgcontext\fP);
.
.SH DESCRIPTION
.rs