| 314 |
logic is that a recursion can only make sense if there is another |
logic is that a recursion can only make sense if there is another |
| 315 |
alternation that stops the recursing. That will provide the minimum length |
alternation that stops the recursing. That will provide the minimum length |
| 316 |
(when no recursion happens). A backreference within the group that it is |
(when no recursion happens). A backreference within the group that it is |
| 317 |
referencing behaves in the same way. |
referencing behaves in the same way. |
| 318 |
|
|
| 319 |
If PCRE_JAVASCRIPT_COMPAT is set, a backreference to an unset bracket |
If PCRE_JAVASCRIPT_COMPAT is set, a backreference to an unset bracket |
| 320 |
matches an empty string (by default it causes a matching failure), so in |
matches an empty string (by default it causes a matching failure), so in |
| 321 |
that case we must set the minimum length to zero. */ |
that case we must set the minimum length to zero. */ |
| 322 |
|
|
| 323 |
case OP_REF: |
case OP_REF: |
| 324 |
if ((options & PCRE_JAVASCRIPT_COMPAT) == 0) |
if ((options & PCRE_JAVASCRIPT_COMPAT) == 0) |
| 325 |
{ |
{ |
| 326 |
ce = cs = (uschar *)_pcre_find_bracket(startcode, utf8, GET2(cc, 1)); |
ce = cs = (uschar *)_pcre_find_bracket(startcode, utf8, GET2(cc, 1)); |
| 327 |
if (cs == NULL) return -2; |
if (cs == NULL) return -2; |
| 328 |
do ce += GET(ce, 1); while (*ce == OP_ALT); |
do ce += GET(ce, 1); while (*ce == OP_ALT); |
| 333 |
} |
} |
| 334 |
else d = find_minlength(cs, startcode, options); |
else d = find_minlength(cs, startcode, options); |
| 335 |
} |
} |
| 336 |
else d = 0; |
else d = 0; |
| 337 |
cc += 3; |
cc += 3; |
| 338 |
|
|
| 339 |
/* Handle repeated back references */ |
/* Handle repeated back references */ |