| 1429 |
/* Match a single character type; inline for speed */ |
/* Match a single character type; inline for speed */ |
| 1430 |
|
|
| 1431 |
case OP_ANY: |
case OP_ANY: |
| 1432 |
if ((ims & PCRE_DOTALL) == 0) |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
| 1433 |
{ |
/* Fall through */ |
| 1434 |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
|
|
} |
|
|
/* Fall through */ |
|
|
|
|
| 1435 |
case OP_ALLANY: |
case OP_ALLANY: |
| 1436 |
if (eptr++ >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (eptr++ >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 1437 |
if (utf8) |
if (utf8) while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
|
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
|
| 1438 |
ecode++; |
ecode++; |
| 1439 |
break; |
break; |
| 1440 |
|
|
| 1653 |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 1654 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 1655 |
{ |
{ |
| 1656 |
int chartype, script; |
const ucd_record * prop = GET_UCD(c); |
|
int category = _pcre_ucp_findprop(c, &chartype, &script); |
|
| 1657 |
|
|
| 1658 |
switch(ecode[1]) |
switch(ecode[1]) |
| 1659 |
{ |
{ |
| 1662 |
break; |
break; |
| 1663 |
|
|
| 1664 |
case PT_LAMP: |
case PT_LAMP: |
| 1665 |
if ((chartype == ucp_Lu || |
if ((prop->chartype == ucp_Lu || |
| 1666 |
chartype == ucp_Ll || |
prop->chartype == ucp_Ll || |
| 1667 |
chartype == ucp_Lt) == (op == OP_NOTPROP)) |
prop->chartype == ucp_Lt) == (op == OP_NOTPROP)) |
| 1668 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 1669 |
break; |
break; |
| 1670 |
|
|
| 1671 |
case PT_GC: |
case PT_GC: |
| 1672 |
if ((ecode[2] != category) == (op == OP_PROP)) |
if ((ecode[2] != _pcre_ucp_gentype[prop->chartype]) == (op == OP_PROP)) |
| 1673 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 1674 |
break; |
break; |
| 1675 |
|
|
| 1676 |
case PT_PC: |
case PT_PC: |
| 1677 |
if ((ecode[2] != chartype) == (op == OP_PROP)) |
if ((ecode[2] != prop->chartype) == (op == OP_PROP)) |
| 1678 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 1679 |
break; |
break; |
| 1680 |
|
|
| 1681 |
case PT_SC: |
case PT_SC: |
| 1682 |
if ((ecode[2] != script) == (op == OP_PROP)) |
if ((ecode[2] != prop->script) == (op == OP_PROP)) |
| 1683 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 1684 |
break; |
break; |
| 1685 |
|
|
| 1698 |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 1699 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 1700 |
{ |
{ |
| 1701 |
int chartype, script; |
int category = UCD_CATEGORY(c); |
|
int category = _pcre_ucp_findprop(c, &chartype, &script); |
|
| 1702 |
if (category == ucp_M) RRETURN(MATCH_NOMATCH); |
if (category == ucp_M) RRETURN(MATCH_NOMATCH); |
| 1703 |
while (eptr < md->end_subject) |
while (eptr < md->end_subject) |
| 1704 |
{ |
{ |
| 1707 |
{ |
{ |
| 1708 |
GETCHARLEN(c, eptr, len); |
GETCHARLEN(c, eptr, len); |
| 1709 |
} |
} |
| 1710 |
category = _pcre_ucp_findprop(c, &chartype, &script); |
category = UCD_CATEGORY(c); |
| 1711 |
if (category != ucp_M) break; |
if (category != ucp_M) break; |
| 1712 |
eptr += len; |
eptr += len; |
| 1713 |
} |
} |
| 1728 |
case OP_REF: |
case OP_REF: |
| 1729 |
{ |
{ |
| 1730 |
offset = GET2(ecode, 1) << 1; /* Doubled ref number */ |
offset = GET2(ecode, 1) << 1; /* Doubled ref number */ |
| 1731 |
ecode += 3; |
ecode += 3; |
| 1732 |
|
|
| 1733 |
/* If the reference is unset, there are two possibilities: |
/* If the reference is unset, there are two possibilities: |
| 1734 |
|
|
| 1735 |
(a) In the default, Perl-compatible state, set the length to be longer |
(a) In the default, Perl-compatible state, set the length to be longer |
| 1736 |
than the amount of subject left; this ensures that every attempt at a |
than the amount of subject left; this ensures that every attempt at a |
| 1737 |
match fails. We can't just fail here, because of the possibility of |
match fails. We can't just fail here, because of the possibility of |
| 1738 |
quantifiers with zero minima. |
quantifiers with zero minima. |
| 1739 |
|
|
| 1740 |
(b) If the JavaScript compatibility flag is set, set the length to zero |
(b) If the JavaScript compatibility flag is set, set the length to zero |
| 1741 |
so that the back reference matches an empty string. |
so that the back reference matches an empty string. |
| 1742 |
|
|
| 1743 |
Otherwise, set the length to the length of what was matched by the |
Otherwise, set the length to the length of what was matched by the |
| 1744 |
referenced subpattern. */ |
referenced subpattern. */ |
| 1745 |
|
|
| 1746 |
if (offset >= offset_top || md->offset_vector[offset] < 0) |
if (offset >= offset_top || md->offset_vector[offset] < 0) |
| 1747 |
length = (md->jscript_compat)? 0 : md->end_subject - eptr + 1; |
length = (md->jscript_compat)? 0 : md->end_subject - eptr + 1; |
| 1748 |
else |
else |
| 1749 |
length = md->offset_vector[offset+1] - md->offset_vector[offset]; |
length = md->offset_vector[offset+1] - md->offset_vector[offset]; |
| 1750 |
|
|
| 2172 |
if (fc != dc) |
if (fc != dc) |
| 2173 |
{ |
{ |
| 2174 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 2175 |
if (dc != _pcre_ucp_othercase(fc)) |
if (dc != UCD_OTHERCASE(fc)) |
| 2176 |
#endif |
#endif |
| 2177 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 2178 |
} |
} |
| 2263 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 2264 |
unsigned int othercase; |
unsigned int othercase; |
| 2265 |
if ((ims & PCRE_CASELESS) != 0 && |
if ((ims & PCRE_CASELESS) != 0 && |
| 2266 |
(othercase = _pcre_ucp_othercase(fc)) != NOTACHAR) |
(othercase = UCD_OTHERCASE(fc)) != fc) |
| 2267 |
oclength = _pcre_ord2utf8(othercase, occhars); |
oclength = _pcre_ord2utf8(othercase, occhars); |
| 2268 |
else oclength = 0; |
else oclength = 0; |
| 2269 |
#endif /* SUPPORT_UCP */ |
#endif /* SUPPORT_UCP */ |
| 2868 |
{ |
{ |
| 2869 |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 2870 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2871 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_chartype = UCD_CHARTYPE(c); |
| 2872 |
if ((prop_chartype == ucp_Lu || |
if ((prop_chartype == ucp_Lu || |
| 2873 |
prop_chartype == ucp_Ll || |
prop_chartype == ucp_Ll || |
| 2874 |
prop_chartype == ucp_Lt) == prop_fail_result) |
prop_chartype == ucp_Lt) == prop_fail_result) |
| 2881 |
{ |
{ |
| 2882 |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 2883 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2884 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_category = UCD_CATEGORY(c); |
| 2885 |
if ((prop_category == prop_value) == prop_fail_result) |
if ((prop_category == prop_value) == prop_fail_result) |
| 2886 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 2887 |
} |
} |
| 2892 |
{ |
{ |
| 2893 |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 2894 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2895 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_chartype = UCD_CHARTYPE(c); |
| 2896 |
if ((prop_chartype == prop_value) == prop_fail_result) |
if ((prop_chartype == prop_value) == prop_fail_result) |
| 2897 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 2898 |
} |
} |
| 2903 |
{ |
{ |
| 2904 |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 2905 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2906 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_script = UCD_SCRIPT(c); |
| 2907 |
if ((prop_script == prop_value) == prop_fail_result) |
if ((prop_script == prop_value) == prop_fail_result) |
| 2908 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 2909 |
} |
} |
| 2922 |
for (i = 1; i <= min; i++) |
for (i = 1; i <= min; i++) |
| 2923 |
{ |
{ |
| 2924 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2925 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_category = UCD_CATEGORY(c); |
| 2926 |
if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH); |
if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH); |
| 2927 |
while (eptr < md->end_subject) |
while (eptr < md->end_subject) |
| 2928 |
{ |
{ |
| 2931 |
{ |
{ |
| 2932 |
GETCHARLEN(c, eptr, len); |
GETCHARLEN(c, eptr, len); |
| 2933 |
} |
} |
| 2934 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_category = UCD_CATEGORY(c); |
| 2935 |
if (prop_category != ucp_M) break; |
if (prop_category != ucp_M) break; |
| 2936 |
eptr += len; |
eptr += len; |
| 2937 |
} |
} |
| 2949 |
case OP_ANY: |
case OP_ANY: |
| 2950 |
for (i = 1; i <= min; i++) |
for (i = 1; i <= min; i++) |
| 2951 |
{ |
{ |
| 2952 |
if (eptr >= md->end_subject || |
if (eptr >= md->end_subject || IS_NEWLINE(eptr)) |
|
((ims & PCRE_DOTALL) == 0 && IS_NEWLINE(eptr))) |
|
| 2953 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 2954 |
eptr++; |
eptr++; |
| 2955 |
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
| 3173 |
switch(ctype) |
switch(ctype) |
| 3174 |
{ |
{ |
| 3175 |
case OP_ANY: |
case OP_ANY: |
| 3176 |
if ((ims & PCRE_DOTALL) == 0) |
for (i = 1; i <= min; i++) |
| 3177 |
{ |
{ |
| 3178 |
for (i = 1; i <= min; i++) |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
| 3179 |
{ |
eptr++; |
|
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
|
|
eptr++; |
|
|
} |
|
| 3180 |
} |
} |
|
else eptr += min; |
|
| 3181 |
break; |
break; |
| 3182 |
|
|
| 3183 |
case OP_ALLANY: |
case OP_ALLANY: |
| 3347 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3348 |
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 3349 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 3350 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_chartype = UCD_CHARTYPE(c); |
| 3351 |
if ((prop_chartype == ucp_Lu || |
if ((prop_chartype == ucp_Lu || |
| 3352 |
prop_chartype == ucp_Ll || |
prop_chartype == ucp_Ll || |
| 3353 |
prop_chartype == ucp_Lt) == prop_fail_result) |
prop_chartype == ucp_Lt) == prop_fail_result) |
| 3362 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3363 |
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 3364 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 3365 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_category = UCD_CATEGORY(c); |
| 3366 |
if ((prop_category == prop_value) == prop_fail_result) |
if ((prop_category == prop_value) == prop_fail_result) |
| 3367 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 3368 |
} |
} |
| 3375 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3376 |
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 3377 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 3378 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_chartype = UCD_CHARTYPE(c); |
| 3379 |
if ((prop_chartype == prop_value) == prop_fail_result) |
if ((prop_chartype == prop_value) == prop_fail_result) |
| 3380 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 3381 |
} |
} |
| 3388 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3389 |
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 3390 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 3391 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_script = UCD_SCRIPT(c); |
| 3392 |
if ((prop_script == prop_value) == prop_fail_result) |
if ((prop_script == prop_value) == prop_fail_result) |
| 3393 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 3394 |
} |
} |
| 3410 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3411 |
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); |
| 3412 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 3413 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_category = UCD_CATEGORY(c); |
| 3414 |
if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH); |
if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH); |
| 3415 |
while (eptr < md->end_subject) |
while (eptr < md->end_subject) |
| 3416 |
{ |
{ |
| 3419 |
{ |
{ |
| 3420 |
GETCHARLEN(c, eptr, len); |
GETCHARLEN(c, eptr, len); |
| 3421 |
} |
} |
| 3422 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_category = UCD_CATEGORY(c); |
| 3423 |
if (prop_category != ucp_M) break; |
if (prop_category != ucp_M) break; |
| 3424 |
eptr += len; |
eptr += len; |
| 3425 |
} |
} |
| 3438 |
RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM42); |
RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM42); |
| 3439 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3440 |
if (fi >= max || eptr >= md->end_subject || |
if (fi >= max || eptr >= md->end_subject || |
| 3441 |
(ctype == OP_ANY && (ims & PCRE_DOTALL) == 0 && |
(ctype == OP_ANY && IS_NEWLINE(eptr))) |
|
IS_NEWLINE(eptr))) |
|
| 3442 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 3443 |
|
|
| 3444 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 3445 |
switch(ctype) |
switch(ctype) |
| 3446 |
{ |
{ |
| 3447 |
case OP_ANY: /* This is the DOTALL case */ |
case OP_ANY: /* This is the non-NL case */ |
| 3448 |
case OP_ALLANY: |
case OP_ALLANY: |
| 3449 |
case OP_ANYBYTE: |
case OP_ANYBYTE: |
| 3450 |
break; |
break; |
| 3451 |
|
|
| 3597 |
RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM43); |
RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM43); |
| 3598 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3599 |
if (fi >= max || eptr >= md->end_subject || |
if (fi >= max || eptr >= md->end_subject || |
| 3600 |
((ims & PCRE_DOTALL) == 0 && IS_NEWLINE(eptr))) |
(ctype == OP_ANY && IS_NEWLINE(eptr))) |
| 3601 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 3602 |
|
|
| 3603 |
c = *eptr++; |
c = *eptr++; |
| 3604 |
switch(ctype) |
switch(ctype) |
| 3605 |
{ |
{ |
| 3606 |
case OP_ANY: /* This is the DOTALL case */ |
case OP_ANY: /* This is the non-NL case */ |
| 3607 |
case OP_ALLANY: |
case OP_ALLANY: |
| 3608 |
case OP_ANYBYTE: |
case OP_ANYBYTE: |
| 3609 |
break; |
break; |
| 3610 |
|
|
| 3737 |
int len = 1; |
int len = 1; |
| 3738 |
if (eptr >= md->end_subject) break; |
if (eptr >= md->end_subject) break; |
| 3739 |
GETCHARLEN(c, eptr, len); |
GETCHARLEN(c, eptr, len); |
| 3740 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_chartype = UCD_CHARTYPE(c); |
| 3741 |
if ((prop_chartype == ucp_Lu || |
if ((prop_chartype == ucp_Lu || |
| 3742 |
prop_chartype == ucp_Ll || |
prop_chartype == ucp_Ll || |
| 3743 |
prop_chartype == ucp_Lt) == prop_fail_result) |
prop_chartype == ucp_Lt) == prop_fail_result) |
| 3752 |
int len = 1; |
int len = 1; |
| 3753 |
if (eptr >= md->end_subject) break; |
if (eptr >= md->end_subject) break; |
| 3754 |
GETCHARLEN(c, eptr, len); |
GETCHARLEN(c, eptr, len); |
| 3755 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_category = UCD_CATEGORY(c); |
| 3756 |
if ((prop_category == prop_value) == prop_fail_result) |
if ((prop_category == prop_value) == prop_fail_result) |
| 3757 |
break; |
break; |
| 3758 |
eptr+= len; |
eptr+= len; |
| 3765 |
int len = 1; |
int len = 1; |
| 3766 |
if (eptr >= md->end_subject) break; |
if (eptr >= md->end_subject) break; |
| 3767 |
GETCHARLEN(c, eptr, len); |
GETCHARLEN(c, eptr, len); |
| 3768 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_chartype = UCD_CHARTYPE(c); |
| 3769 |
if ((prop_chartype == prop_value) == prop_fail_result) |
if ((prop_chartype == prop_value) == prop_fail_result) |
| 3770 |
break; |
break; |
| 3771 |
eptr+= len; |
eptr+= len; |
| 3778 |
int len = 1; |
int len = 1; |
| 3779 |
if (eptr >= md->end_subject) break; |
if (eptr >= md->end_subject) break; |
| 3780 |
GETCHARLEN(c, eptr, len); |
GETCHARLEN(c, eptr, len); |
| 3781 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_script = UCD_SCRIPT(c); |
| 3782 |
if ((prop_script == prop_value) == prop_fail_result) |
if ((prop_script == prop_value) == prop_fail_result) |
| 3783 |
break; |
break; |
| 3784 |
eptr+= len; |
eptr+= len; |
| 3807 |
{ |
{ |
| 3808 |
if (eptr >= md->end_subject) break; |
if (eptr >= md->end_subject) break; |
| 3809 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 3810 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_category = UCD_CATEGORY(c); |
| 3811 |
if (prop_category == ucp_M) break; |
if (prop_category == ucp_M) break; |
| 3812 |
while (eptr < md->end_subject) |
while (eptr < md->end_subject) |
| 3813 |
{ |
{ |
| 3816 |
{ |
{ |
| 3817 |
GETCHARLEN(c, eptr, len); |
GETCHARLEN(c, eptr, len); |
| 3818 |
} |
} |
| 3819 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_category = UCD_CATEGORY(c); |
| 3820 |
if (prop_category != ucp_M) break; |
if (prop_category != ucp_M) break; |
| 3821 |
eptr += len; |
eptr += len; |
| 3822 |
} |
} |
| 3838 |
BACKCHAR(eptr); |
BACKCHAR(eptr); |
| 3839 |
GETCHARLEN(c, eptr, len); |
GETCHARLEN(c, eptr, len); |
| 3840 |
} |
} |
| 3841 |
prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); |
prop_category = UCD_CATEGORY(c); |
| 3842 |
if (prop_category != ucp_M) break; |
if (prop_category != ucp_M) break; |
| 3843 |
eptr--; |
eptr--; |
| 3844 |
} |
} |
| 3858 |
case OP_ANY: |
case OP_ANY: |
| 3859 |
if (max < INT_MAX) |
if (max < INT_MAX) |
| 3860 |
{ |
{ |
| 3861 |
if ((ims & PCRE_DOTALL) == 0) |
for (i = min; i < max; i++) |
|
{ |
|
|
for (i = min; i < max; i++) |
|
|
{ |
|
|
if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; |
|
|
eptr++; |
|
|
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
|
|
} |
|
|
} |
|
|
else |
|
| 3862 |
{ |
{ |
| 3863 |
for (i = min; i < max; i++) |
if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; |
| 3864 |
{ |
eptr++; |
| 3865 |
if (eptr >= md->end_subject) break; |
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
|
eptr++; |
|
|
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
|
|
} |
|
| 3866 |
} |
} |
| 3867 |
} |
} |
| 3868 |
|
|
| 3870 |
|
|
| 3871 |
else |
else |
| 3872 |
{ |
{ |
| 3873 |
if ((ims & PCRE_DOTALL) == 0) |
for (i = min; i < max; i++) |
|
{ |
|
|
for (i = min; i < max; i++) |
|
|
{ |
|
|
if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; |
|
|
eptr++; |
|
|
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
|
|
} |
|
|
} |
|
|
else |
|
| 3874 |
{ |
{ |
| 3875 |
eptr = md->end_subject; |
if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; |
| 3876 |
|
eptr++; |
| 3877 |
|
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
| 3878 |
} |
} |
| 3879 |
} |
} |
| 3880 |
break; |
break; |
| 4077 |
switch(ctype) |
switch(ctype) |
| 4078 |
{ |
{ |
| 4079 |
case OP_ANY: |
case OP_ANY: |
| 4080 |
if ((ims & PCRE_DOTALL) == 0) |
for (i = min; i < max; i++) |
| 4081 |
{ |
{ |
| 4082 |
for (i = min; i < max; i++) |
if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; |
| 4083 |
{ |
eptr++; |
|
if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; |
|
|
eptr++; |
|
|
} |
|
|
break; |
|
| 4084 |
} |
} |
| 4085 |
/* For DOTALL case, fall through */ |
break; |
| 4086 |
|
|
| 4087 |
case OP_ALLANY: |
case OP_ALLANY: |
| 4088 |
case OP_ANYBYTE: |
case OP_ANYBYTE: |