2157 |
|
|
2158 |
/* ========================================================================== */ |
/* ========================================================================== */ |
2159 |
/* These are the opcodes for fancy brackets of various kinds. We have |
/* These are the opcodes for fancy brackets of various kinds. We have |
2160 |
to use recursion in order to handle them. The "always failing" assersion |
to use recursion in order to handle them. The "always failing" assertion |
2161 |
(?!) is optimised when compiling to OP_FAIL, so we have to support that, |
(?!) is optimised to OP_FAIL when compiling, so we have to support that, |
2162 |
though the other "backtracking verbs" are not supported. */ |
though the other "backtracking verbs" are not supported. */ |
2163 |
|
|
2164 |
case OP_FAIL: |
case OP_FAIL: |
2200 |
{ |
{ |
2201 |
int local_offsets[1000]; |
int local_offsets[1000]; |
2202 |
int local_workspace[1000]; |
int local_workspace[1000]; |
2203 |
int codelink = GET(code, 1); |
int codelink = GET(code, 1); |
2204 |
int condcode; |
int condcode; |
2205 |
|
|
2206 |
/* Because of the way auto-callout works during compile, a callout item |
/* Because of the way auto-callout works during compile, a callout item |
2207 |
is inserted between OP_COND and an assertion condition. This does not |
is inserted between OP_COND and an assertion condition. This does not |
2208 |
happen for the other conditions. */ |
happen for the other conditions. */ |
2209 |
|
|
2210 |
if (code[LINK_SIZE+1] == OP_CALLOUT) |
if (code[LINK_SIZE+1] == OP_CALLOUT) |
2211 |
{ |
{ |
2212 |
rrc = 0; |
rrc = 0; |
2213 |
if (pcre_callout != NULL) |
if (pcre_callout != NULL) |
2214 |
{ |
{ |
2215 |
pcre_callout_block cb; |
pcre_callout_block cb; |
2229 |
} |
} |
2230 |
if (rrc > 0) break; /* Fail this thread */ |
if (rrc > 0) break; /* Fail this thread */ |
2231 |
code += _pcre_OP_lengths[OP_CALLOUT]; /* Skip callout data */ |
code += _pcre_OP_lengths[OP_CALLOUT]; /* Skip callout data */ |
2232 |
} |
} |
2233 |
|
|
2234 |
condcode = code[LINK_SIZE+1]; |
condcode = code[LINK_SIZE+1]; |
2235 |
|
|
2236 |
/* Back reference conditions are not supported */ |
/* Back reference conditions are not supported */ |
2237 |
|
|
2238 |
if (condcode == OP_CREF) return PCRE_ERROR_DFA_UCOND; |
if (condcode == OP_CREF) return PCRE_ERROR_DFA_UCOND; |
2250 |
{ |
{ |
2251 |
int value = GET2(code, LINK_SIZE+2); |
int value = GET2(code, LINK_SIZE+2); |
2252 |
if (value != RREF_ANY) return PCRE_ERROR_DFA_UCOND; |
if (value != RREF_ANY) return PCRE_ERROR_DFA_UCOND; |
2253 |
if (recursing > 0) |
if (recursing > 0) |
2254 |
{ ADD_ACTIVE(state_offset + LINK_SIZE + 4, 0); } |
{ ADD_ACTIVE(state_offset + LINK_SIZE + 4, 0); } |
2255 |
else { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); } |
else { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); } |
2256 |
} |
} |
2434 |
/* Handle callouts */ |
/* Handle callouts */ |
2435 |
|
|
2436 |
case OP_CALLOUT: |
case OP_CALLOUT: |
2437 |
rrc = 0; |
rrc = 0; |
2438 |
if (pcre_callout != NULL) |
if (pcre_callout != NULL) |
2439 |
{ |
{ |
2440 |
pcre_callout_block cb; |
pcre_callout_block cb; |
2451 |
cb.capture_last = -1; |
cb.capture_last = -1; |
2452 |
cb.callout_data = md->callout_data; |
cb.callout_data = md->callout_data; |
2453 |
if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc; /* Abandon */ |
if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc; /* Abandon */ |
2454 |
} |
} |
2455 |
if (rrc == 0) |
if (rrc == 0) |
2456 |
{ ADD_ACTIVE(state_offset + _pcre_OP_lengths[OP_CALLOUT], 0); } |
{ ADD_ACTIVE(state_offset + _pcre_OP_lengths[OP_CALLOUT], 0); } |
2457 |
break; |
break; |
2458 |
|
|
2459 |
|
|