Fix ACCEPT issue with ENDANCHORED.
This commit is contained in:
parent
14989bd454
commit
3b8672bf49
|
@ -0,0 +1,40 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>pcre2_set_heap_limit specification</title>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
|
||||
<h1>pcre2_set_heap_limit man page</h1>
|
||||
<p>
|
||||
Return to the <a href="index.html">PCRE2 index page</a>.
|
||||
</p>
|
||||
<p>
|
||||
This page is part of the PCRE2 HTML documentation. It was generated
|
||||
automatically from the original man page. If there is any nonsense in it,
|
||||
please consult the man page, in case the conversion went wrong.
|
||||
<br>
|
||||
<br><b>
|
||||
SYNOPSIS
|
||||
</b><br>
|
||||
<P>
|
||||
<b>#include <pcre2.h></b>
|
||||
</P>
|
||||
<P>
|
||||
<b>int pcre2_set_heap_limit(pcre2_match_context *<i>mcontext</i>,</b>
|
||||
<b> uint32_t <i>value</i>);</b>
|
||||
</P>
|
||||
<br><b>
|
||||
DESCRIPTION
|
||||
</b><br>
|
||||
<P>
|
||||
This function sets the backtracking heap limit field in a match context. The
|
||||
result is always zero.
|
||||
</P>
|
||||
<P>
|
||||
There is a complete description of the PCRE2 native API in the
|
||||
<a href="pcre2api.html"><b>pcre2api</b></a>
|
||||
page and a description of the POSIX API in the
|
||||
<a href="pcre2posix.html"><b>pcre2posix</b></a>
|
||||
page.
|
||||
<p>
|
||||
Return to the <a href="index.html">PCRE2 index page</a>.
|
||||
</p>
|
|
@ -802,11 +802,15 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
|
|||
RRETURN(MATCH_NOMATCH);
|
||||
|
||||
/* Also fail if PCRE2_ENDANCHORED is set and the end of the match is not
|
||||
the end of the subject. */
|
||||
the end of the subject. After (*ACCEPT) we fail the entire match (at this
|
||||
position) but backtrack on reaching the end of the pattern. */
|
||||
|
||||
if (Feptr < mb->end_subject &&
|
||||
((mb->moptions | mb->poptions) & PCRE2_ENDANCHORED) != 0)
|
||||
RRETURN(MATCH_NOMATCH);
|
||||
{
|
||||
if (Fop == OP_END) RRETURN(MATCH_NOMATCH);
|
||||
return MATCH_NOMATCH;
|
||||
}
|
||||
|
||||
/* We have a successful match of the whole pattern. Record the result and
|
||||
then do a direct return from the function. If there is space in the offset
|
||||
|
|
|
@ -5038,6 +5038,9 @@ a)"xI
|
|||
\= Expect no match
|
||||
xyzabcdef
|
||||
|
||||
/a(*ACCEPT)x|aa/endanchored
|
||||
aaa
|
||||
|
||||
#subject -no_jit
|
||||
|
||||
# Check auto-anchoring when there is a group that is never obeyed at
|
||||
|
|
|
@ -15574,6 +15574,10 @@ No match
|
|||
xyzabcdef
|
||||
No match
|
||||
|
||||
/a(*ACCEPT)x|aa/endanchored
|
||||
aaa
|
||||
0: a
|
||||
|
||||
#subject -no_jit
|
||||
|
||||
# Check auto-anchoring when there is a group that is never obeyed at
|
||||
|
|
Loading…
Reference in New Issue