| 1430 |
|
|
| 1431 |
case OP_ANY: |
case OP_ANY: |
| 1432 |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
| 1433 |
/* Fall through */ |
/* Fall through */ |
| 1434 |
|
|
| 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) while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
if (utf8) while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
| 1730 |
case OP_REF: |
case OP_REF: |
| 1731 |
{ |
{ |
| 1732 |
offset = GET2(ecode, 1) << 1; /* Doubled ref number */ |
offset = GET2(ecode, 1) << 1; /* Doubled ref number */ |
| 1733 |
ecode += 3; |
ecode += 3; |
| 1734 |
|
|
| 1735 |
/* If the reference is unset, there are two possibilities: |
/* If the reference is unset, there are two possibilities: |
| 1736 |
|
|
| 1737 |
(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 |
| 1738 |
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 |
| 1739 |
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 |
| 1740 |
quantifiers with zero minima. |
quantifiers with zero minima. |
| 1741 |
|
|
| 1742 |
(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 |
| 1743 |
so that the back reference matches an empty string. |
so that the back reference matches an empty string. |
| 1744 |
|
|
| 1745 |
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 |
| 1746 |
referenced subpattern. */ |
referenced subpattern. */ |
| 1747 |
|
|
| 1748 |
if (offset >= offset_top || md->offset_vector[offset] < 0) |
if (offset >= offset_top || md->offset_vector[offset] < 0) |
| 1749 |
length = (md->jscript_compat)? 0 : md->end_subject - eptr + 1; |
length = (md->jscript_compat)? 0 : md->end_subject - eptr + 1; |
| 1750 |
else |
else |
| 1751 |
length = md->offset_vector[offset+1] - md->offset_vector[offset]; |
length = md->offset_vector[offset+1] - md->offset_vector[offset]; |
| 1752 |
|
|
| 3447 |
switch(ctype) |
switch(ctype) |
| 3448 |
{ |
{ |
| 3449 |
case OP_ANY: /* This is the non-NL case */ |
case OP_ANY: /* This is the non-NL case */ |
| 3450 |
case OP_ALLANY: |
case OP_ALLANY: |
| 3451 |
case OP_ANYBYTE: |
case OP_ANYBYTE: |
| 3452 |
break; |
break; |
| 3453 |
|
|
| 3606 |
switch(ctype) |
switch(ctype) |
| 3607 |
{ |
{ |
| 3608 |
case OP_ANY: /* This is the non-NL case */ |
case OP_ANY: /* This is the non-NL case */ |
| 3609 |
case OP_ALLANY: |
case OP_ALLANY: |
| 3610 |
case OP_ANYBYTE: |
case OP_ANYBYTE: |
| 3611 |
break; |
break; |
| 3612 |
|
|