| 82 |
#define MATCH_SKIP_ARG (-993) |
#define MATCH_SKIP_ARG (-993) |
| 83 |
#define MATCH_THEN (-992) |
#define MATCH_THEN (-992) |
| 84 |
|
|
| 85 |
|
/* This is a convenience macro for code that occurs many times. */ |
| 86 |
|
|
| 87 |
|
#define MRRETURN(ra) \ |
| 88 |
|
{ \ |
| 89 |
|
md->mark = markptr; \ |
| 90 |
|
RRETURN(ra); \ |
| 91 |
|
} |
| 92 |
|
|
| 93 |
/* Maximum number of ints of offset to save on the stack for recursive calls. |
/* Maximum number of ints of offset to save on the stack for recursive calls. |
| 94 |
If the offset vector is bigger, malloc is used. This should be a multiple of 3, |
If the offset vector is bigger, malloc is used. This should be a multiple of 3, |
| 95 |
because the offset vector is always a multiple of 3 long. */ |
because the offset vector is always a multiple of 3 long. */ |
| 225 |
while (length-- > 0) if (*p++ != *eptr++) return -1; |
while (length-- > 0) if (*p++ != *eptr++) return -1; |
| 226 |
} |
} |
| 227 |
|
|
| 228 |
return (int)(eptr - eptr_start); |
return eptr - eptr_start; |
| 229 |
} |
} |
| 230 |
|
|
| 231 |
|
|
| 290 |
#define RMATCH(ra,rb,rc,rd,re,rw) \ |
#define RMATCH(ra,rb,rc,rd,re,rw) \ |
| 291 |
{ \ |
{ \ |
| 292 |
printf("match() called in line %d\n", __LINE__); \ |
printf("match() called in line %d\n", __LINE__); \ |
| 293 |
rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1); \ |
rrc = match(ra,rb,mstart,markptr,rc,rd,re,rdepth+1); \ |
| 294 |
printf("to line %d\n", __LINE__); \ |
printf("to line %d\n", __LINE__); \ |
| 295 |
} |
} |
| 296 |
#define RRETURN(ra) \ |
#define RRETURN(ra) \ |
| 300 |
} |
} |
| 301 |
#else |
#else |
| 302 |
#define RMATCH(ra,rb,rc,rd,re,rw) \ |
#define RMATCH(ra,rb,rc,rd,re,rw) \ |
| 303 |
rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1) |
rrc = match(ra,rb,mstart,markptr,rc,rd,re,rdepth+1) |
| 304 |
#define RRETURN(ra) return ra |
#define RRETURN(ra) return ra |
| 305 |
#endif |
#endif |
| 306 |
|
|
| 321 |
newframe->Xeptr = ra;\ |
newframe->Xeptr = ra;\ |
| 322 |
newframe->Xecode = rb;\ |
newframe->Xecode = rb;\ |
| 323 |
newframe->Xmstart = mstart;\ |
newframe->Xmstart = mstart;\ |
| 324 |
|
newframe->Xmarkptr = markptr;\ |
| 325 |
newframe->Xoffset_top = rc;\ |
newframe->Xoffset_top = rc;\ |
| 326 |
newframe->Xeptrb = re;\ |
newframe->Xeptrb = re;\ |
| 327 |
newframe->Xrdepth = frame->Xrdepth + 1;\ |
newframe->Xrdepth = frame->Xrdepth + 1;\ |
| 357 |
USPTR Xeptr; |
USPTR Xeptr; |
| 358 |
const uschar *Xecode; |
const uschar *Xecode; |
| 359 |
USPTR Xmstart; |
USPTR Xmstart; |
| 360 |
|
USPTR Xmarkptr; |
| 361 |
int Xoffset_top; |
int Xoffset_top; |
| 362 |
eptrblock *Xeptrb; |
eptrblock *Xeptrb; |
| 363 |
unsigned int Xrdepth; |
unsigned int Xrdepth; |
| 427 |
same response. */ |
same response. */ |
| 428 |
|
|
| 429 |
/* These macros pack up tests that are used for partial matching, and which |
/* These macros pack up tests that are used for partial matching, and which |
| 430 |
appear several times in the code. We set the "hit end" flag if the pointer is |
appears several times in the code. We set the "hit end" flag if the pointer is |
| 431 |
at the end of the subject and also past the start of the subject (i.e. |
at the end of the subject and also past the start of the subject (i.e. |
| 432 |
something has been matched). For hard partial matching, we then return |
something has been matched). For hard partial matching, we then return |
| 433 |
immediately. The second one is used when we already know we are past the end of |
immediately. The second one is used when we already know we are past the end of |
| 438 |
eptr > md->start_used_ptr) \ |
eptr > md->start_used_ptr) \ |
| 439 |
{ \ |
{ \ |
| 440 |
md->hitend = TRUE; \ |
md->hitend = TRUE; \ |
| 441 |
if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \ |
if (md->partial > 1) MRRETURN(PCRE_ERROR_PARTIAL); \ |
| 442 |
} |
} |
| 443 |
|
|
| 444 |
#define SCHECK_PARTIAL()\ |
#define SCHECK_PARTIAL()\ |
| 445 |
if (md->partial != 0 && eptr > md->start_used_ptr) \ |
if (md->partial != 0 && eptr > md->start_used_ptr) \ |
| 446 |
{ \ |
{ \ |
| 447 |
md->hitend = TRUE; \ |
md->hitend = TRUE; \ |
| 448 |
if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \ |
if (md->partial > 1) MRRETURN(PCRE_ERROR_PARTIAL); \ |
| 449 |
} |
} |
| 450 |
|
|
| 451 |
|
|
| 459 |
ecode pointer to current position in compiled code |
ecode pointer to current position in compiled code |
| 460 |
mstart pointer to the current match start position (can be modified |
mstart pointer to the current match start position (can be modified |
| 461 |
by encountering \K) |
by encountering \K) |
| 462 |
|
markptr pointer to the most recent MARK name, or NULL |
| 463 |
offset_top current top pointer |
offset_top current top pointer |
| 464 |
md pointer to "static" info for the match |
md pointer to "static" info for the match |
| 465 |
eptrb pointer to chain of blocks containing eptr at start of |
eptrb pointer to chain of blocks containing eptr at start of |
| 475 |
|
|
| 476 |
static int |
static int |
| 477 |
match(REGISTER USPTR eptr, REGISTER const uschar *ecode, USPTR mstart, |
match(REGISTER USPTR eptr, REGISTER const uschar *ecode, USPTR mstart, |
| 478 |
int offset_top, match_data *md, eptrblock *eptrb, unsigned int rdepth) |
const uschar *markptr, int offset_top, match_data *md, eptrblock *eptrb, |
| 479 |
|
unsigned int rdepth) |
| 480 |
{ |
{ |
| 481 |
/* These variables do not need to be preserved over recursion in this function, |
/* These variables do not need to be preserved over recursion in this function, |
| 482 |
so they can be ordinary variables in all cases. Mark some of them with |
so they can be ordinary variables in all cases. Mark some of them with |
| 506 |
frame->Xeptr = eptr; |
frame->Xeptr = eptr; |
| 507 |
frame->Xecode = ecode; |
frame->Xecode = ecode; |
| 508 |
frame->Xmstart = mstart; |
frame->Xmstart = mstart; |
| 509 |
|
frame->Xmarkptr = markptr; |
| 510 |
frame->Xoffset_top = offset_top; |
frame->Xoffset_top = offset_top; |
| 511 |
frame->Xeptrb = eptrb; |
frame->Xeptrb = eptrb; |
| 512 |
frame->Xrdepth = rdepth; |
frame->Xrdepth = rdepth; |
| 520 |
#define eptr frame->Xeptr |
#define eptr frame->Xeptr |
| 521 |
#define ecode frame->Xecode |
#define ecode frame->Xecode |
| 522 |
#define mstart frame->Xmstart |
#define mstart frame->Xmstart |
| 523 |
|
#define markptr frame->Xmarkptr |
| 524 |
#define offset_top frame->Xoffset_top |
#define offset_top frame->Xoffset_top |
| 525 |
#define eptrb frame->Xeptrb |
#define eptrb frame->Xeptrb |
| 526 |
#define rdepth frame->Xrdepth |
#define rdepth frame->Xrdepth |
| 701 |
switch(op) |
switch(op) |
| 702 |
{ |
{ |
| 703 |
case OP_MARK: |
case OP_MARK: |
| 704 |
md->nomatch_mark = ecode + 2; |
markptr = ecode + 2; |
|
md->mark = NULL; /* In case previously set by assertion */ |
|
| 705 |
RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md, |
RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md, |
| 706 |
eptrb, RM55); |
eptrb, RM55); |
|
if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) && |
|
|
md->mark == NULL) md->mark = ecode + 2; |
|
| 707 |
|
|
| 708 |
/* A return of MATCH_SKIP_ARG means that matching failed at SKIP with an |
/* A return of MATCH_SKIP_ARG means that matching failed at SKIP with an |
| 709 |
argument, and we must check whether that argument matches this MARK's |
argument, and we must check whether that argument matches this MARK's |
| 712 |
position and return MATCH_SKIP. Otherwise, pass back the return code |
position and return MATCH_SKIP. Otherwise, pass back the return code |
| 713 |
unaltered. */ |
unaltered. */ |
| 714 |
|
|
| 715 |
else if (rrc == MATCH_SKIP_ARG && |
if (rrc == MATCH_SKIP_ARG && |
| 716 |
strcmp((char *)(ecode + 2), (char *)(md->start_match_ptr)) == 0) |
strcmp((char *)markptr, (char *)(md->start_match_ptr)) == 0) |
| 717 |
{ |
{ |
| 718 |
md->start_match_ptr = eptr; |
md->start_match_ptr = eptr; |
| 719 |
RRETURN(MATCH_SKIP); |
RRETURN(MATCH_SKIP); |
| 720 |
} |
} |
| 721 |
|
|
| 722 |
|
if (md->mark == NULL) md->mark = markptr; |
| 723 |
RRETURN(rrc); |
RRETURN(rrc); |
| 724 |
|
|
| 725 |
case OP_FAIL: |
case OP_FAIL: |
| 726 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 727 |
|
|
| 728 |
/* COMMIT overrides PRUNE, SKIP, and THEN */ |
/* COMMIT overrides PRUNE, SKIP, and THEN */ |
| 729 |
|
|
| 734 |
rrc != MATCH_SKIP && rrc != MATCH_SKIP_ARG && |
rrc != MATCH_SKIP && rrc != MATCH_SKIP_ARG && |
| 735 |
rrc != MATCH_THEN) |
rrc != MATCH_THEN) |
| 736 |
RRETURN(rrc); |
RRETURN(rrc); |
| 737 |
RRETURN(MATCH_COMMIT); |
MRRETURN(MATCH_COMMIT); |
| 738 |
|
|
| 739 |
/* PRUNE overrides THEN */ |
/* PRUNE overrides THEN */ |
| 740 |
|
|
| 742 |
RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md, |
RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md, |
| 743 |
eptrb, RM51); |
eptrb, RM51); |
| 744 |
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); |
| 745 |
RRETURN(MATCH_PRUNE); |
MRRETURN(MATCH_PRUNE); |
| 746 |
|
|
| 747 |
case OP_PRUNE_ARG: |
case OP_PRUNE_ARG: |
|
md->nomatch_mark = ecode + 2; |
|
|
md->mark = NULL; /* In case previously set by assertion */ |
|
| 748 |
RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md, |
RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md, |
| 749 |
eptrb, RM56); |
eptrb, RM56); |
|
if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) && |
|
|
md->mark == NULL) md->mark = ecode + 2; |
|
| 750 |
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); |
| 751 |
|
md->mark = ecode + 2; |
| 752 |
RRETURN(MATCH_PRUNE); |
RRETURN(MATCH_PRUNE); |
| 753 |
|
|
| 754 |
/* SKIP overrides PRUNE and THEN */ |
/* SKIP overrides PRUNE and THEN */ |
| 759 |
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE && rrc != MATCH_THEN) |
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE && rrc != MATCH_THEN) |
| 760 |
RRETURN(rrc); |
RRETURN(rrc); |
| 761 |
md->start_match_ptr = eptr; /* Pass back current position */ |
md->start_match_ptr = eptr; /* Pass back current position */ |
| 762 |
RRETURN(MATCH_SKIP); |
MRRETURN(MATCH_SKIP); |
|
|
|
|
/* Note that, for Perl compatibility, SKIP with an argument does NOT set |
|
|
nomatch_mark. There is a flag that disables this opcode when re-matching a |
|
|
pattern that ended with a SKIP for which there was not a matching MARK. */ |
|
| 763 |
|
|
| 764 |
case OP_SKIP_ARG: |
case OP_SKIP_ARG: |
|
if (md->ignore_skip_arg) |
|
|
{ |
|
|
ecode += _pcre_OP_lengths[*ecode] + ecode[1]; |
|
|
break; |
|
|
} |
|
| 765 |
RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md, |
RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md, |
| 766 |
eptrb, RM57); |
eptrb, RM57); |
| 767 |
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE && rrc != MATCH_THEN) |
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE && rrc != MATCH_THEN) |
| 769 |
|
|
| 770 |
/* Pass back the current skip name by overloading md->start_match_ptr and |
/* Pass back the current skip name by overloading md->start_match_ptr and |
| 771 |
returning the special MATCH_SKIP_ARG return code. This will either be |
returning the special MATCH_SKIP_ARG return code. This will either be |
| 772 |
caught by a matching MARK, or get to the top, where it causes a rematch |
caught by a matching MARK, or get to the top, where it is treated the same |
| 773 |
with the md->ignore_skip_arg flag set. */ |
as PRUNE. */ |
| 774 |
|
|
| 775 |
md->start_match_ptr = ecode + 2; |
md->start_match_ptr = ecode + 2; |
| 776 |
RRETURN(MATCH_SKIP_ARG); |
RRETURN(MATCH_SKIP_ARG); |
| 784 |
eptrb, RM54); |
eptrb, RM54); |
| 785 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 786 |
md->start_match_ptr = ecode; |
md->start_match_ptr = ecode; |
| 787 |
RRETURN(MATCH_THEN); |
MRRETURN(MATCH_THEN); |
| 788 |
|
|
| 789 |
case OP_THEN_ARG: |
case OP_THEN_ARG: |
|
md->nomatch_mark = ecode + 2; |
|
|
md->mark = NULL; /* In case previously set by assertion */ |
|
| 790 |
RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, |
RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, |
| 791 |
md, eptrb, RM58); |
md, eptrb, RM58); |
|
if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) && |
|
|
md->mark == NULL) md->mark = ecode + 2; |
|
| 792 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 793 |
md->start_match_ptr = ecode; |
md->start_match_ptr = ecode; |
| 794 |
|
md->mark = ecode + 2; |
| 795 |
RRETURN(MATCH_THEN); |
RRETURN(MATCH_THEN); |
| 796 |
|
|
| 797 |
/* Handle an atomic group that does not contain any capturing parentheses. |
/* Handle an atomic group that does not contain any capturing parentheses. |
| 816 |
if (rrc == MATCH_MATCH) /* Note: _not_ MATCH_ACCEPT */ |
if (rrc == MATCH_MATCH) /* Note: _not_ MATCH_ACCEPT */ |
| 817 |
{ |
{ |
| 818 |
mstart = md->start_match_ptr; |
mstart = md->start_match_ptr; |
| 819 |
|
markptr = md->mark; |
| 820 |
break; |
break; |
| 821 |
} |
} |
| 822 |
if (rrc == MATCH_THEN) |
if (rrc == MATCH_THEN) |
| 954 |
|
|
| 955 |
/* At this point, rrc will be one of MATCH_ONCE or MATCH_NOMATCH. */ |
/* At this point, rrc will be one of MATCH_ONCE or MATCH_NOMATCH. */ |
| 956 |
|
|
| 957 |
|
if (md->mark == NULL) md->mark = markptr; |
| 958 |
RRETURN(rrc); |
RRETURN(rrc); |
| 959 |
} |
} |
| 960 |
|
|
| 1042 |
if (*ecode != OP_ALT) break; |
if (*ecode != OP_ALT) break; |
| 1043 |
} |
} |
| 1044 |
|
|
| 1045 |
|
if (md->mark == NULL) md->mark = markptr; |
| 1046 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
| 1047 |
|
|
| 1048 |
/* Handle possessive capturing brackets with an unlimited repeat. We come |
/* Handle possessive capturing brackets with an unlimited repeat. We come |
| 1071 |
if (offset < md->offset_max) |
if (offset < md->offset_max) |
| 1072 |
{ |
{ |
| 1073 |
matched_once = FALSE; |
matched_once = FALSE; |
| 1074 |
code_offset = (int)(ecode - md->start_code); |
code_offset = ecode - md->start_code; |
| 1075 |
|
|
| 1076 |
save_offset1 = md->offset_vector[offset]; |
save_offset1 = md->offset_vector[offset]; |
| 1077 |
save_offset2 = md->offset_vector[offset+1]; |
save_offset2 = md->offset_vector[offset+1]; |
| 1130 |
md->offset_vector[md->offset_end - number] = save_offset3; |
md->offset_vector[md->offset_end - number] = save_offset3; |
| 1131 |
} |
} |
| 1132 |
|
|
| 1133 |
|
if (md->mark == NULL) md->mark = markptr; |
| 1134 |
if (allow_zero || matched_once) |
if (allow_zero || matched_once) |
| 1135 |
{ |
{ |
| 1136 |
ecode += 1 + LINK_SIZE; |
ecode += 1 + LINK_SIZE; |
| 1162 |
|
|
| 1163 |
POSSESSIVE_NON_CAPTURE: |
POSSESSIVE_NON_CAPTURE: |
| 1164 |
matched_once = FALSE; |
matched_once = FALSE; |
| 1165 |
code_offset = (int)(ecode - md->start_code); |
code_offset = ecode - md->start_code; |
| 1166 |
|
|
| 1167 |
for (;;) |
for (;;) |
| 1168 |
{ |
{ |
| 1232 |
cb.capture_top = offset_top/2; |
cb.capture_top = offset_top/2; |
| 1233 |
cb.capture_last = md->capture_last; |
cb.capture_last = md->capture_last; |
| 1234 |
cb.callout_data = md->callout_data; |
cb.callout_data = md->callout_data; |
| 1235 |
cb.mark = md->nomatch_mark; |
cb.mark = markptr; |
| 1236 |
if ((rrc = (*pcre_callout)(&cb)) > 0) RRETURN(MATCH_NOMATCH); |
if ((rrc = (*pcre_callout)(&cb)) > 0) MRRETURN(MATCH_NOMATCH); |
| 1237 |
if (rrc < 0) RRETURN(rrc); |
if (rrc < 0) RRETURN(rrc); |
| 1238 |
} |
} |
| 1239 |
ecode += _pcre_OP_lengths[OP_CALLOUT]; |
ecode += _pcre_OP_lengths[OP_CALLOUT]; |
| 1488 |
(md->notempty || |
(md->notempty || |
| 1489 |
(md->notempty_atstart && |
(md->notempty_atstart && |
| 1490 |
mstart == md->start_subject + md->start_offset))) |
mstart == md->start_subject + md->start_offset))) |
| 1491 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 1492 |
|
|
| 1493 |
/* Otherwise, we have a match. */ |
/* Otherwise, we have a match. */ |
| 1494 |
|
|
| 1497 |
md->start_match_ptr = mstart; /* and the start (\K can modify) */ |
md->start_match_ptr = mstart; /* and the start (\K can modify) */ |
| 1498 |
|
|
| 1499 |
/* For some reason, the macros don't work properly if an expression is |
/* For some reason, the macros don't work properly if an expression is |
| 1500 |
given as the argument to RRETURN when the heap is in use. */ |
given as the argument to MRRETURN when the heap is in use. */ |
| 1501 |
|
|
| 1502 |
rrc = (op == OP_END)? MATCH_MATCH : MATCH_ACCEPT; |
rrc = (op == OP_END)? MATCH_MATCH : MATCH_ACCEPT; |
| 1503 |
RRETURN(rrc); |
MRRETURN(rrc); |
| 1504 |
|
|
| 1505 |
/* Assertion brackets. Check the alternative branches in turn - the |
/* Assertion brackets. Check the alternative branches in turn - the |
| 1506 |
matching won't pass the KET for an assertion. If any one branch matches, |
matching won't pass the KET for an assertion. If any one branch matches, |
| 1528 |
if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) |
if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) |
| 1529 |
{ |
{ |
| 1530 |
mstart = md->start_match_ptr; /* In case \K reset it */ |
mstart = md->start_match_ptr; /* In case \K reset it */ |
| 1531 |
|
markptr = md->mark; |
| 1532 |
break; |
break; |
| 1533 |
} |
} |
| 1534 |
|
|
| 1540 |
} |
} |
| 1541 |
while (*ecode == OP_ALT); |
while (*ecode == OP_ALT); |
| 1542 |
|
|
| 1543 |
if (*ecode == OP_KET) RRETURN(MATCH_NOMATCH); |
if (*ecode == OP_KET) MRRETURN(MATCH_NOMATCH); |
| 1544 |
|
|
| 1545 |
/* If checking an assertion for a condition, return MATCH_MATCH. */ |
/* If checking an assertion for a condition, return MATCH_MATCH. */ |
| 1546 |
|
|
| 1570 |
do |
do |
| 1571 |
{ |
{ |
| 1572 |
RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM5); |
RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM5); |
| 1573 |
if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) RRETURN(MATCH_NOMATCH); |
if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) MRRETURN(MATCH_NOMATCH); |
| 1574 |
if (rrc == MATCH_SKIP || rrc == MATCH_PRUNE || rrc == MATCH_COMMIT) |
if (rrc == MATCH_SKIP || rrc == MATCH_PRUNE || rrc == MATCH_COMMIT) |
| 1575 |
{ |
{ |
| 1576 |
do ecode += GET(ecode,1); while (*ecode == OP_ALT); |
do ecode += GET(ecode,1); while (*ecode == OP_ALT); |
| 1603 |
while (i-- > 0) |
while (i-- > 0) |
| 1604 |
{ |
{ |
| 1605 |
eptr--; |
eptr--; |
| 1606 |
if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH); |
if (eptr < md->start_subject) MRRETURN(MATCH_NOMATCH); |
| 1607 |
BACKCHAR(eptr); |
BACKCHAR(eptr); |
| 1608 |
} |
} |
| 1609 |
} |
} |
| 1614 |
|
|
| 1615 |
{ |
{ |
| 1616 |
eptr -= GET(ecode, 1); |
eptr -= GET(ecode, 1); |
| 1617 |
if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH); |
if (eptr < md->start_subject) MRRETURN(MATCH_NOMATCH); |
| 1618 |
} |
} |
| 1619 |
|
|
| 1620 |
/* Save the earliest consulted character, then skip to next op code */ |
/* Save the earliest consulted character, then skip to next op code */ |
| 1643 |
cb.capture_top = offset_top/2; |
cb.capture_top = offset_top/2; |
| 1644 |
cb.capture_last = md->capture_last; |
cb.capture_last = md->capture_last; |
| 1645 |
cb.callout_data = md->callout_data; |
cb.callout_data = md->callout_data; |
| 1646 |
cb.mark = md->nomatch_mark; |
cb.mark = markptr; |
| 1647 |
if ((rrc = (*pcre_callout)(&cb)) > 0) RRETURN(MATCH_NOMATCH); |
if ((rrc = (*pcre_callout)(&cb)) > 0) MRRETURN(MATCH_NOMATCH); |
| 1648 |
if (rrc < 0) RRETURN(rrc); |
if (rrc < 0) RRETURN(rrc); |
| 1649 |
} |
} |
| 1650 |
ecode += 2 + 2*LINK_SIZE; |
ecode += 2 + 2*LINK_SIZE; |
| 1758 |
md->recursive = new_recursive.prevrec; |
md->recursive = new_recursive.prevrec; |
| 1759 |
if (new_recursive.offset_save != stacksave) |
if (new_recursive.offset_save != stacksave) |
| 1760 |
(pcre_free)(new_recursive.offset_save); |
(pcre_free)(new_recursive.offset_save); |
| 1761 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 1762 |
} |
} |
| 1763 |
|
|
| 1764 |
RECURSION_MATCHED: |
RECURSION_MATCHED: |
| 1838 |
md->end_match_ptr = eptr; /* For ONCE_NC */ |
md->end_match_ptr = eptr; /* For ONCE_NC */ |
| 1839 |
md->end_offset_top = offset_top; |
md->end_offset_top = offset_top; |
| 1840 |
md->start_match_ptr = mstart; |
md->start_match_ptr = mstart; |
| 1841 |
RRETURN(MATCH_MATCH); /* Sets md->mark */ |
MRRETURN(MATCH_MATCH); /* Sets md->mark */ |
| 1842 |
} |
} |
| 1843 |
|
|
| 1844 |
/* For capturing groups we have to check the group number back at the start |
/* For capturing groups we have to check the group number back at the start |
| 1980 |
/* Not multiline mode: start of subject assertion, unless notbol. */ |
/* Not multiline mode: start of subject assertion, unless notbol. */ |
| 1981 |
|
|
| 1982 |
case OP_CIRC: |
case OP_CIRC: |
| 1983 |
if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH); |
if (md->notbol && eptr == md->start_subject) MRRETURN(MATCH_NOMATCH); |
| 1984 |
|
|
| 1985 |
/* Start of subject assertion */ |
/* Start of subject assertion */ |
| 1986 |
|
|
| 1987 |
case OP_SOD: |
case OP_SOD: |
| 1988 |
if (eptr != md->start_subject) RRETURN(MATCH_NOMATCH); |
if (eptr != md->start_subject) MRRETURN(MATCH_NOMATCH); |
| 1989 |
ecode++; |
ecode++; |
| 1990 |
break; |
break; |
| 1991 |
|
|
| 1992 |
/* Multiline mode: start of subject unless notbol, or after any newline. */ |
/* Multiline mode: start of subject unless notbol, or after any newline. */ |
| 1993 |
|
|
| 1994 |
case OP_CIRCM: |
case OP_CIRCM: |
| 1995 |
if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH); |
if (md->notbol && eptr == md->start_subject) MRRETURN(MATCH_NOMATCH); |
| 1996 |
if (eptr != md->start_subject && |
if (eptr != md->start_subject && |
| 1997 |
(eptr == md->end_subject || !WAS_NEWLINE(eptr))) |
(eptr == md->end_subject || !WAS_NEWLINE(eptr))) |
| 1998 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 1999 |
ecode++; |
ecode++; |
| 2000 |
break; |
break; |
| 2001 |
|
|
| 2002 |
/* Start of match assertion */ |
/* Start of match assertion */ |
| 2003 |
|
|
| 2004 |
case OP_SOM: |
case OP_SOM: |
| 2005 |
if (eptr != md->start_subject + md->start_offset) RRETURN(MATCH_NOMATCH); |
if (eptr != md->start_subject + md->start_offset) MRRETURN(MATCH_NOMATCH); |
| 2006 |
ecode++; |
ecode++; |
| 2007 |
break; |
break; |
| 2008 |
|
|
| 2018 |
|
|
| 2019 |
case OP_DOLLM: |
case OP_DOLLM: |
| 2020 |
if (eptr < md->end_subject) |
if (eptr < md->end_subject) |
| 2021 |
{ if (!IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); } |
{ if (!IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); } |
| 2022 |
else |
else |
| 2023 |
{ |
{ |
| 2024 |
if (md->noteol) RRETURN(MATCH_NOMATCH); |
if (md->noteol) MRRETURN(MATCH_NOMATCH); |
| 2025 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2026 |
} |
} |
| 2027 |
ecode++; |
ecode++; |
| 2031 |
subject unless noteol is set. */ |
subject unless noteol is set. */ |
| 2032 |
|
|
| 2033 |
case OP_DOLL: |
case OP_DOLL: |
| 2034 |
if (md->noteol) RRETURN(MATCH_NOMATCH); |
if (md->noteol) MRRETURN(MATCH_NOMATCH); |
| 2035 |
if (!md->endonly) goto ASSERT_NL_OR_EOS; |
if (!md->endonly) goto ASSERT_NL_OR_EOS; |
| 2036 |
|
|
| 2037 |
/* ... else fall through for endonly */ |
/* ... else fall through for endonly */ |
| 2039 |
/* End of subject assertion (\z) */ |
/* End of subject assertion (\z) */ |
| 2040 |
|
|
| 2041 |
case OP_EOD: |
case OP_EOD: |
| 2042 |
if (eptr < md->end_subject) RRETURN(MATCH_NOMATCH); |
if (eptr < md->end_subject) MRRETURN(MATCH_NOMATCH); |
| 2043 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2044 |
ecode++; |
ecode++; |
| 2045 |
break; |
break; |
| 2050 |
ASSERT_NL_OR_EOS: |
ASSERT_NL_OR_EOS: |
| 2051 |
if (eptr < md->end_subject && |
if (eptr < md->end_subject && |
| 2052 |
(!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen)) |
(!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen)) |
| 2053 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2054 |
|
|
| 2055 |
/* Either at end of string or \n before end. */ |
/* Either at end of string or \n before end. */ |
| 2056 |
|
|
| 2172 |
|
|
| 2173 |
if ((*ecode++ == OP_WORD_BOUNDARY)? |
if ((*ecode++ == OP_WORD_BOUNDARY)? |
| 2174 |
cur_is_word == prev_is_word : cur_is_word != prev_is_word) |
cur_is_word == prev_is_word : cur_is_word != prev_is_word) |
| 2175 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2176 |
} |
} |
| 2177 |
break; |
break; |
| 2178 |
|
|
| 2179 |
/* Match a single character type; inline for speed */ |
/* Match a single character type; inline for speed */ |
| 2180 |
|
|
| 2181 |
case OP_ANY: |
case OP_ANY: |
| 2182 |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); |
| 2183 |
/* Fall through */ |
/* Fall through */ |
| 2184 |
|
|
| 2185 |
case OP_ALLANY: |
case OP_ALLANY: |
| 2186 |
if (eptr >= md->end_subject) /* DO NOT merge the eptr++ here; it must */ |
if (eptr >= md->end_subject) /* DO NOT merge the eptr++ here; it must */ |
| 2187 |
{ /* not be updated before SCHECK_PARTIAL. */ |
{ /* not be updated before SCHECK_PARTIAL. */ |
| 2188 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2189 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2190 |
} |
} |
| 2191 |
eptr++; |
eptr++; |
| 2192 |
if (utf8) while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
if (utf8) while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
| 2200 |
if (eptr >= md->end_subject) /* DO NOT merge the eptr++ here; it must */ |
if (eptr >= md->end_subject) /* DO NOT merge the eptr++ here; it must */ |
| 2201 |
{ /* not be updated before SCHECK_PARTIAL. */ |
{ /* not be updated before SCHECK_PARTIAL. */ |
| 2202 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2203 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2204 |
} |
} |
| 2205 |
eptr++; |
eptr++; |
| 2206 |
ecode++; |
ecode++; |
| 2210 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2211 |
{ |
{ |
| 2212 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2213 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2214 |
} |
} |
| 2215 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2216 |
if ( |
if ( |
| 2219 |
#endif |
#endif |
| 2220 |
(md->ctypes[c] & ctype_digit) != 0 |
(md->ctypes[c] & ctype_digit) != 0 |
| 2221 |
) |
) |
| 2222 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2223 |
ecode++; |
ecode++; |
| 2224 |
break; |
break; |
| 2225 |
|
|
| 2227 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2228 |
{ |
{ |
| 2229 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2230 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2231 |
} |
} |
| 2232 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2233 |
if ( |
if ( |
| 2236 |
#endif |
#endif |
| 2237 |
(md->ctypes[c] & ctype_digit) == 0 |
(md->ctypes[c] & ctype_digit) == 0 |
| 2238 |
) |
) |
| 2239 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2240 |
ecode++; |
ecode++; |
| 2241 |
break; |
break; |
| 2242 |
|
|
| 2244 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2245 |
{ |
{ |
| 2246 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2247 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2248 |
} |
} |
| 2249 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2250 |
if ( |
if ( |
| 2253 |
#endif |
#endif |
| 2254 |
(md->ctypes[c] & ctype_space) != 0 |
(md->ctypes[c] & ctype_space) != 0 |
| 2255 |
) |
) |
| 2256 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2257 |
ecode++; |
ecode++; |
| 2258 |
break; |
break; |
| 2259 |
|
|
| 2261 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2262 |
{ |
{ |
| 2263 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2264 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2265 |
} |
} |
| 2266 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2267 |
if ( |
if ( |
| 2270 |
#endif |
#endif |
| 2271 |
(md->ctypes[c] & ctype_space) == 0 |
(md->ctypes[c] & ctype_space) == 0 |
| 2272 |
) |
) |
| 2273 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2274 |
ecode++; |
ecode++; |
| 2275 |
break; |
break; |
| 2276 |
|
|
| 2278 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2279 |
{ |
{ |
| 2280 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2281 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2282 |
} |
} |
| 2283 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2284 |
if ( |
if ( |
| 2287 |
#endif |
#endif |
| 2288 |
(md->ctypes[c] & ctype_word) != 0 |
(md->ctypes[c] & ctype_word) != 0 |
| 2289 |
) |
) |
| 2290 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2291 |
ecode++; |
ecode++; |
| 2292 |
break; |
break; |
| 2293 |
|
|
| 2295 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2296 |
{ |
{ |
| 2297 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2298 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2299 |
} |
} |
| 2300 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2301 |
if ( |
if ( |
| 2304 |
#endif |
#endif |
| 2305 |
(md->ctypes[c] & ctype_word) == 0 |
(md->ctypes[c] & ctype_word) == 0 |
| 2306 |
) |
) |
| 2307 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2308 |
ecode++; |
ecode++; |
| 2309 |
break; |
break; |
| 2310 |
|
|
| 2312 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2313 |
{ |
{ |
| 2314 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2315 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2316 |
} |
} |
| 2317 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2318 |
switch(c) |
switch(c) |
| 2319 |
{ |
{ |
| 2320 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 2321 |
|
|
| 2322 |
case 0x000d: |
case 0x000d: |
| 2323 |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
| 2331 |
case 0x0085: |
case 0x0085: |
| 2332 |
case 0x2028: |
case 0x2028: |
| 2333 |
case 0x2029: |
case 0x2029: |
| 2334 |
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); |
if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); |
| 2335 |
break; |
break; |
| 2336 |
} |
} |
| 2337 |
ecode++; |
ecode++; |
| 2341 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2342 |
{ |
{ |
| 2343 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2344 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2345 |
} |
} |
| 2346 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2347 |
switch(c) |
switch(c) |
| 2366 |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
| 2367 |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
| 2368 |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
| 2369 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2370 |
} |
} |
| 2371 |
ecode++; |
ecode++; |
| 2372 |
break; |
break; |
| 2375 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2376 |
{ |
{ |
| 2377 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2378 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2379 |
} |
} |
| 2380 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2381 |
switch(c) |
switch(c) |
| 2382 |
{ |
{ |
| 2383 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 2384 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
| 2385 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
| 2386 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
| 2409 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2410 |
{ |
{ |
| 2411 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2412 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2413 |
} |
} |
| 2414 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2415 |
switch(c) |
switch(c) |
| 2422 |
case 0x85: /* NEL */ |
case 0x85: /* NEL */ |
| 2423 |
case 0x2028: /* LINE SEPARATOR */ |
case 0x2028: /* LINE SEPARATOR */ |
| 2424 |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
| 2425 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2426 |
} |
} |
| 2427 |
ecode++; |
ecode++; |
| 2428 |
break; |
break; |
| 2431 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2432 |
{ |
{ |
| 2433 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2434 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2435 |
} |
} |
| 2436 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2437 |
switch(c) |
switch(c) |
| 2438 |
{ |
{ |
| 2439 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 2440 |
case 0x0a: /* LF */ |
case 0x0a: /* LF */ |
| 2441 |
case 0x0b: /* VT */ |
case 0x0b: /* VT */ |
| 2442 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
| 2458 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2459 |
{ |
{ |
| 2460 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2461 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2462 |
} |
} |
| 2463 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2464 |
{ |
{ |
| 2467 |
switch(ecode[1]) |
switch(ecode[1]) |
| 2468 |
{ |
{ |
| 2469 |
case PT_ANY: |
case PT_ANY: |
| 2470 |
if (op == OP_NOTPROP) RRETURN(MATCH_NOMATCH); |
if (op == OP_NOTPROP) MRRETURN(MATCH_NOMATCH); |
| 2471 |
break; |
break; |
| 2472 |
|
|
| 2473 |
case PT_LAMP: |
case PT_LAMP: |
| 2474 |
if ((prop->chartype == ucp_Lu || |
if ((prop->chartype == ucp_Lu || |
| 2475 |
prop->chartype == ucp_Ll || |
prop->chartype == ucp_Ll || |
| 2476 |
prop->chartype == ucp_Lt) == (op == OP_NOTPROP)) |
prop->chartype == ucp_Lt) == (op == OP_NOTPROP)) |
| 2477 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2478 |
break; |
break; |
| 2479 |
|
|
| 2480 |
case PT_GC: |
case PT_GC: |
| 2481 |
if ((ecode[2] != _pcre_ucp_gentype[prop->chartype]) == (op == OP_PROP)) |
if ((ecode[2] != _pcre_ucp_gentype[prop->chartype]) == (op == OP_PROP)) |
| 2482 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2483 |
break; |
break; |
| 2484 |
|
|
| 2485 |
case PT_PC: |
case PT_PC: |
| 2486 |
if ((ecode[2] != prop->chartype) == (op == OP_PROP)) |
if ((ecode[2] != prop->chartype) == (op == OP_PROP)) |
| 2487 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2488 |
break; |
break; |
| 2489 |
|
|
| 2490 |
case PT_SC: |
case PT_SC: |
| 2491 |
if ((ecode[2] != prop->script) == (op == OP_PROP)) |
if ((ecode[2] != prop->script) == (op == OP_PROP)) |
| 2492 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2493 |
break; |
break; |
| 2494 |
|
|
| 2495 |
/* These are specials */ |
/* These are specials */ |
| 2497 |
case PT_ALNUM: |
case PT_ALNUM: |
| 2498 |
if ((_pcre_ucp_gentype[prop->chartype] == ucp_L || |
if ((_pcre_ucp_gentype[prop->chartype] == ucp_L || |
| 2499 |
_pcre_ucp_gentype[prop->chartype] == ucp_N) == (op == OP_NOTPROP)) |
_pcre_ucp_gentype[prop->chartype] == ucp_N) == (op == OP_NOTPROP)) |
| 2500 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2501 |
break; |
break; |
| 2502 |
|
|
| 2503 |
case PT_SPACE: /* Perl space */ |
case PT_SPACE: /* Perl space */ |
| 2504 |
if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z || |
if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z || |
| 2505 |
c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR) |
c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR) |
| 2506 |
== (op == OP_NOTPROP)) |
== (op == OP_NOTPROP)) |
| 2507 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2508 |
break; |
break; |
| 2509 |
|
|
| 2510 |
case PT_PXSPACE: /* POSIX space */ |
case PT_PXSPACE: /* POSIX space */ |
| 2512 |
c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || |
c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || |
| 2513 |
c == CHAR_FF || c == CHAR_CR) |
c == CHAR_FF || c == CHAR_CR) |
| 2514 |
== (op == OP_NOTPROP)) |
== (op == OP_NOTPROP)) |
| 2515 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2516 |
break; |
break; |
| 2517 |
|
|
| 2518 |
case PT_WORD: |
case PT_WORD: |
| 2519 |
if ((_pcre_ucp_gentype[prop->chartype] == ucp_L || |
if ((_pcre_ucp_gentype[prop->chartype] == ucp_L || |
| 2520 |
_pcre_ucp_gentype[prop->chartype] == ucp_N || |
_pcre_ucp_gentype[prop->chartype] == ucp_N || |
| 2521 |
c == CHAR_UNDERSCORE) == (op == OP_NOTPROP)) |
c == CHAR_UNDERSCORE) == (op == OP_NOTPROP)) |
| 2522 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2523 |
break; |
break; |
| 2524 |
|
|
| 2525 |
/* This should never occur */ |
/* This should never occur */ |
| 2539 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2540 |
{ |
{ |
| 2541 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2542 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2543 |
} |
} |
| 2544 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2545 |
if (UCD_CATEGORY(c) == ucp_M) RRETURN(MATCH_NOMATCH); |
if (UCD_CATEGORY(c) == ucp_M) MRRETURN(MATCH_NOMATCH); |
| 2546 |
while (eptr < md->end_subject) |
while (eptr < md->end_subject) |
| 2547 |
{ |
{ |
| 2548 |
int len = 1; |
int len = 1; |
| 2616 |
if ((length = match_ref(offset, eptr, length, md, caseless)) < 0) |
if ((length = match_ref(offset, eptr, length, md, caseless)) < 0) |
| 2617 |
{ |
{ |
| 2618 |
CHECK_PARTIAL(); |
CHECK_PARTIAL(); |
| 2619 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2620 |
} |
} |
| 2621 |
eptr += length; |
eptr += length; |
| 2622 |
continue; /* With the main loop */ |
continue; /* With the main loop */ |
| 2637 |
if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) |
if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) |
| 2638 |
{ |
{ |
| 2639 |
CHECK_PARTIAL(); |
CHECK_PARTIAL(); |
| 2640 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2641 |
} |
} |
| 2642 |
eptr += slength; |
eptr += slength; |
| 2643 |
} |
} |
| 2656 |
int slength; |
int slength; |
| 2657 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM14); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM14); |
| 2658 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 2659 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 2660 |
if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) |
if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) |
| 2661 |
{ |
{ |
| 2662 |
CHECK_PARTIAL(); |
CHECK_PARTIAL(); |
| 2663 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2664 |
} |
} |
| 2665 |
eptr += slength; |
eptr += slength; |
| 2666 |
} |
} |
| 2688 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 2689 |
eptr -= length; |
eptr -= length; |
| 2690 |
} |
} |
| 2691 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2692 |
} |
} |
| 2693 |
/* Control never gets here */ |
/* Control never gets here */ |
| 2694 |
|
|
| 2749 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2750 |
{ |
{ |
| 2751 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2752 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2753 |
} |
} |
| 2754 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 2755 |
if (c > 255) |
if (c > 255) |
| 2756 |
{ |
{ |
| 2757 |
if (op == OP_CLASS) RRETURN(MATCH_NOMATCH); |
if (op == OP_CLASS) MRRETURN(MATCH_NOMATCH); |
| 2758 |
} |
} |
| 2759 |
else |
else |
| 2760 |
{ |
{ |
| 2761 |
if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); |
if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); |
| 2762 |
} |
} |
| 2763 |
} |
} |
| 2764 |
} |
} |
| 2771 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2772 |
{ |
{ |
| 2773 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2774 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2775 |
} |
} |
| 2776 |
c = *eptr++; |
c = *eptr++; |
| 2777 |
if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); |
if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); |
| 2778 |
} |
} |
| 2779 |
} |
} |
| 2780 |
|
|
| 2796 |
{ |
{ |
| 2797 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM16); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM16); |
| 2798 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 2799 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 2800 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2801 |
{ |
{ |
| 2802 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2803 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2804 |
} |
} |
| 2805 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 2806 |
if (c > 255) |
if (c > 255) |
| 2807 |
{ |
{ |
| 2808 |
if (op == OP_CLASS) RRETURN(MATCH_NOMATCH); |
if (op == OP_CLASS) MRRETURN(MATCH_NOMATCH); |
| 2809 |
} |
} |
| 2810 |
else |
else |
| 2811 |
{ |
{ |
| 2812 |
if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); |
if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); |
| 2813 |
} |
} |
| 2814 |
} |
} |
| 2815 |
} |
} |
| 2821 |
{ |
{ |
| 2822 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM17); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM17); |
| 2823 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 2824 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 2825 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2826 |
{ |
{ |
| 2827 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2828 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2829 |
} |
} |
| 2830 |
c = *eptr++; |
c = *eptr++; |
| 2831 |
if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); |
if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); |
| 2832 |
} |
} |
| 2833 |
} |
} |
| 2834 |
/* Control never gets here */ |
/* Control never gets here */ |
| 2894 |
} |
} |
| 2895 |
} |
} |
| 2896 |
|
|
| 2897 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2898 |
} |
} |
| 2899 |
} |
} |
| 2900 |
/* Control never gets here */ |
/* Control never gets here */ |
| 2946 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2947 |
{ |
{ |
| 2948 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2949 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2950 |
} |
} |
| 2951 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2952 |
if (!_pcre_xclass(c, data)) RRETURN(MATCH_NOMATCH); |
if (!_pcre_xclass(c, data)) MRRETURN(MATCH_NOMATCH); |
| 2953 |
} |
} |
| 2954 |
|
|
| 2955 |
/* If max == min we can continue with the main loop without the |
/* If max == min we can continue with the main loop without the |
| 2966 |
{ |
{ |
| 2967 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM20); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM20); |
| 2968 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 2969 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 2970 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 2971 |
{ |
{ |
| 2972 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 2973 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 2974 |
} |
} |
| 2975 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 2976 |
if (!_pcre_xclass(c, data)) RRETURN(MATCH_NOMATCH); |
if (!_pcre_xclass(c, data)) MRRETURN(MATCH_NOMATCH); |
| 2977 |
} |
} |
| 2978 |
/* Control never gets here */ |
/* Control never gets here */ |
| 2979 |
} |
} |
| 3002 |
if (eptr-- == pp) break; /* Stop if tried at original pos */ |
if (eptr-- == pp) break; /* Stop if tried at original pos */ |
| 3003 |
if (utf8) BACKCHAR(eptr); |
if (utf8) BACKCHAR(eptr); |
| 3004 |
} |
} |
| 3005 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3006 |
} |
} |
| 3007 |
|
|
| 3008 |
/* Control never gets here */ |
/* Control never gets here */ |
| 3021 |
if (length > md->end_subject - eptr) |
if (length > md->end_subject - eptr) |
| 3022 |
{ |
{ |
| 3023 |
CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */ |
CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */ |
| 3024 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3025 |
} |
} |
| 3026 |
while (length-- > 0) if (*ecode++ != *eptr++) RRETURN(MATCH_NOMATCH); |
while (length-- > 0) if (*ecode++ != *eptr++) MRRETURN(MATCH_NOMATCH); |
| 3027 |
} |
} |
| 3028 |
else |
else |
| 3029 |
#endif |
#endif |
| 3033 |
if (md->end_subject - eptr < 1) |
if (md->end_subject - eptr < 1) |
| 3034 |
{ |
{ |
| 3035 |
SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */ |
SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */ |
| 3036 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3037 |
} |
} |
| 3038 |
if (ecode[1] != *eptr++) RRETURN(MATCH_NOMATCH); |
if (ecode[1] != *eptr++) MRRETURN(MATCH_NOMATCH); |
| 3039 |
ecode += 2; |
ecode += 2; |
| 3040 |
} |
} |
| 3041 |
break; |
break; |
| 3042 |
|
|
| 3043 |
/* Match a single character, caselessly. If we are at the end of the |
/* Match a single character, caselessly */ |
|
subject, give up immediately. */ |
|
| 3044 |
|
|
| 3045 |
case OP_CHARI: |
case OP_CHARI: |
|
if (eptr >= md->end_subject) |
|
|
{ |
|
|
SCHECK_PARTIAL(); |
|
|
RRETURN(MATCH_NOMATCH); |
|
|
} |
|
|
|
|
| 3046 |
#ifdef SUPPORT_UTF8 |
#ifdef SUPPORT_UTF8 |
| 3047 |
if (utf8) |
if (utf8) |
| 3048 |
{ |
{ |
| 3050 |
ecode++; |
ecode++; |
| 3051 |
GETCHARLEN(fc, ecode, length); |
GETCHARLEN(fc, ecode, length); |
| 3052 |
|
|
| 3053 |
|
if (length > md->end_subject - eptr) |
| 3054 |
|
{ |
| 3055 |
|
CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */ |
| 3056 |
|
MRRETURN(MATCH_NOMATCH); |
| 3057 |
|
} |
| 3058 |
|
|
| 3059 |
/* If the pattern character's value is < 128, we have only one byte, and |
/* If the pattern character's value is < 128, we have only one byte, and |
| 3060 |
we know that its other case must also be one byte long, so we can use the |
can use the fast lookup table. */ |
|
fast lookup table. We know that there is at least one byte left in the |
|
|
subject. */ |
|
| 3061 |
|
|
| 3062 |
if (fc < 128) |
if (fc < 128) |
| 3063 |
{ |
{ |
| 3064 |
if (md->lcc[*ecode++] != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); |
if (md->lcc[*ecode++] != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); |
| 3065 |
} |
} |
| 3066 |
|
|
| 3067 |
/* Otherwise we must pick up the subject character. Note that we cannot |
/* Otherwise we must pick up the subject character */ |
|
use the value of "length" to check for sufficient bytes left, because the |
|
|
other case of the character may have more or fewer bytes. */ |
|
| 3068 |
|
|
| 3069 |
else |
else |
| 3070 |
{ |
{ |
| 3080 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 3081 |
if (dc != UCD_OTHERCASE(fc)) |
if (dc != UCD_OTHERCASE(fc)) |
| 3082 |
#endif |
#endif |
| 3083 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3084 |
} |
} |
| 3085 |
} |
} |
| 3086 |
} |
} |
| 3089 |
|
|
| 3090 |
/* Non-UTF-8 mode */ |
/* Non-UTF-8 mode */ |
| 3091 |
{ |
{ |
| 3092 |
if (md->lcc[ecode[1]] != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); |
if (md->end_subject - eptr < 1) |
| 3093 |
|
{ |
| 3094 |
|
SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */ |
| 3095 |
|
MRRETURN(MATCH_NOMATCH); |
| 3096 |
|
} |
| 3097 |
|
if (md->lcc[ecode[1]] != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); |
| 3098 |
ecode += 2; |
ecode += 2; |
| 3099 |
} |
} |
| 3100 |
break; |
break; |
| 3200 |
else |
else |
| 3201 |
{ |
{ |
| 3202 |
CHECK_PARTIAL(); |
CHECK_PARTIAL(); |
| 3203 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3204 |
} |
} |
| 3205 |
} |
} |
| 3206 |
|
|
| 3212 |
{ |
{ |
| 3213 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM22); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM22); |
| 3214 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3215 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 3216 |
if (eptr <= md->end_subject - length && |
if (eptr <= md->end_subject - length && |
| 3217 |
memcmp(eptr, charptr, length) == 0) eptr += length; |
memcmp(eptr, charptr, length) == 0) eptr += length; |
| 3218 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 3223 |
else |
else |
| 3224 |
{ |
{ |
| 3225 |
CHECK_PARTIAL(); |
CHECK_PARTIAL(); |
| 3226 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3227 |
} |
} |
| 3228 |
} |
} |
| 3229 |
/* Control never gets here */ |
/* Control never gets here */ |
| 3254 |
{ |
{ |
| 3255 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM23); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM23); |
| 3256 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3257 |
if (eptr == pp) { RRETURN(MATCH_NOMATCH); } |
if (eptr == pp) { MRRETURN(MATCH_NOMATCH); } |
| 3258 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 3259 |
eptr--; |
eptr--; |
| 3260 |
BACKCHAR(eptr); |
BACKCHAR(eptr); |
| 3297 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3298 |
{ |
{ |
| 3299 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3300 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3301 |
} |
} |
| 3302 |
if (fc != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); |
if (fc != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); |
| 3303 |
} |
} |
| 3304 |
if (min == max) continue; |
if (min == max) continue; |
| 3305 |
if (minimize) |
if (minimize) |
| 3308 |
{ |
{ |
| 3309 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM24); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM24); |
| 3310 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3311 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 3312 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3313 |
{ |
{ |
| 3314 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3315 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3316 |
} |
} |
| 3317 |
if (fc != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); |
if (fc != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); |
| 3318 |
} |
} |
| 3319 |
/* Control never gets here */ |
/* Control never gets here */ |
| 3320 |
} |
} |
| 3340 |
eptr--; |
eptr--; |
| 3341 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3342 |
} |
} |
| 3343 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3344 |
} |
} |
| 3345 |
/* Control never gets here */ |
/* Control never gets here */ |
| 3346 |
} |
} |
| 3354 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3355 |
{ |
{ |
| 3356 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3357 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3358 |
} |
} |
| 3359 |
if (fc != *eptr++) RRETURN(MATCH_NOMATCH); |
if (fc != *eptr++) MRRETURN(MATCH_NOMATCH); |
| 3360 |
} |
} |
| 3361 |
|
|
| 3362 |
if (min == max) continue; |
if (min == max) continue; |
| 3367 |
{ |
{ |
| 3368 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM26); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM26); |
| 3369 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3370 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 3371 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3372 |
{ |
{ |
| 3373 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3374 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3375 |
} |
} |
| 3376 |
if (fc != *eptr++) RRETURN(MATCH_NOMATCH); |
if (fc != *eptr++) MRRETURN(MATCH_NOMATCH); |
| 3377 |
} |
} |
| 3378 |
/* Control never gets here */ |
/* Control never gets here */ |
| 3379 |
} |
} |
| 3398 |
eptr--; |
eptr--; |
| 3399 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3400 |
} |
} |
| 3401 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3402 |
} |
} |
| 3403 |
} |
} |
| 3404 |
/* Control never gets here */ |
/* Control never gets here */ |
| 3411 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3412 |
{ |
{ |
| 3413 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3414 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3415 |
} |
} |
| 3416 |
ecode++; |
ecode++; |
| 3417 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 3421 |
if (c < 256) |
if (c < 256) |
| 3422 |
#endif |
#endif |
| 3423 |
c = md->lcc[c]; |
c = md->lcc[c]; |
| 3424 |
if (md->lcc[*ecode++] == c) RRETURN(MATCH_NOMATCH); |
if (md->lcc[*ecode++] == c) MRRETURN(MATCH_NOMATCH); |
| 3425 |
} |
} |
| 3426 |
else /* Caseful */ |
else /* Caseful */ |
| 3427 |
{ |
{ |
| 3428 |
if (*ecode++ == c) RRETURN(MATCH_NOMATCH); |
if (*ecode++ == c) MRRETURN(MATCH_NOMATCH); |
| 3429 |
} |
} |
| 3430 |
break; |
break; |
| 3431 |
|
|
| 3532 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3533 |
{ |
{ |
| 3534 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3535 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3536 |
} |
} |
| 3537 |
GETCHARINC(d, eptr); |
GETCHARINC(d, eptr); |
| 3538 |
if (d < 256) d = md->lcc[d]; |
if (d < 256) d = md->lcc[d]; |
| 3539 |
if (fc == d) RRETURN(MATCH_NOMATCH); |
if (fc == d) MRRETURN(MATCH_NOMATCH); |
| 3540 |
} |
} |
| 3541 |
} |
} |
| 3542 |
else |
else |
| 3549 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3550 |
{ |
{ |
| 3551 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3552 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3553 |
} |
} |
| 3554 |
if (fc == md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); |
if (fc == md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); |
| 3555 |
} |
} |
| 3556 |
} |
} |
| 3557 |
|
|
| 3568 |
{ |
{ |
| 3569 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM28); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM28); |
| 3570 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3571 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 3572 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3573 |
{ |
{ |
| 3574 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3575 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3576 |
} |
} |
| 3577 |
GETCHARINC(d, eptr); |
GETCHARINC(d, eptr); |
| 3578 |
if (d < 256) d = md->lcc[d]; |
if (d < 256) d = md->lcc[d]; |
| 3579 |
if (fc == d) RRETURN(MATCH_NOMATCH); |
if (fc == d) MRRETURN(MATCH_NOMATCH); |
| 3580 |
} |
} |
| 3581 |
} |
} |
| 3582 |
else |
else |
| 3587 |
{ |
{ |
| 3588 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM29); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM29); |
| 3589 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3590 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 3591 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3592 |
{ |
{ |
| 3593 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3594 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3595 |
} |
} |
| 3596 |
if (fc == md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); |
if (fc == md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); |
| 3597 |
} |
} |
| 3598 |
} |
} |
| 3599 |
/* Control never gets here */ |
/* Control never gets here */ |
| 3655 |
} |
} |
| 3656 |
} |
} |
| 3657 |
|
|
| 3658 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3659 |
} |
} |
| 3660 |
/* Control never gets here */ |
/* Control never gets here */ |
| 3661 |
} |
} |
| 3674 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3675 |
{ |
{ |
| 3676 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3677 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3678 |
} |
} |
| 3679 |
GETCHARINC(d, eptr); |
GETCHARINC(d, eptr); |
| 3680 |
if (fc == d) RRETURN(MATCH_NOMATCH); |
if (fc == d) MRRETURN(MATCH_NOMATCH); |
| 3681 |
} |
} |
| 3682 |
} |
} |
| 3683 |
else |
else |
| 3689 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3690 |
{ |
{ |
| 3691 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3692 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3693 |
} |
} |
| 3694 |
if (fc == *eptr++) RRETURN(MATCH_NOMATCH); |
if (fc == *eptr++) MRRETURN(MATCH_NOMATCH); |
| 3695 |
} |
} |
| 3696 |
} |
} |
| 3697 |
|
|
| 3708 |
{ |
{ |
| 3709 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM32); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM32); |
| 3710 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3711 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 3712 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3713 |
{ |
{ |
| 3714 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3715 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3716 |
} |
} |
| 3717 |
GETCHARINC(d, eptr); |
GETCHARINC(d, eptr); |
| 3718 |
if (fc == d) RRETURN(MATCH_NOMATCH); |
if (fc == d) MRRETURN(MATCH_NOMATCH); |
| 3719 |
} |
} |
| 3720 |
} |
} |
| 3721 |
else |
else |
| 3726 |
{ |
{ |
| 3727 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM33); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM33); |
| 3728 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 3729 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 3730 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3731 |
{ |
{ |
| 3732 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3733 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3734 |
} |
} |
| 3735 |
if (fc == *eptr++) RRETURN(MATCH_NOMATCH); |
if (fc == *eptr++) MRRETURN(MATCH_NOMATCH); |
| 3736 |
} |
} |
| 3737 |
} |
} |
| 3738 |
/* Control never gets here */ |
/* Control never gets here */ |
| 3793 |
} |
} |
| 3794 |
} |
} |
| 3795 |
|
|
| 3796 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3797 |
} |
} |
| 3798 |
} |
} |
| 3799 |
/* Control never gets here */ |
/* Control never gets here */ |
| 3887 |
switch(prop_type) |
switch(prop_type) |
| 3888 |
{ |
{ |
| 3889 |
case PT_ANY: |
case PT_ANY: |
| 3890 |
if (prop_fail_result) RRETURN(MATCH_NOMATCH); |
if (prop_fail_result) MRRETURN(MATCH_NOMATCH); |
| 3891 |
for (i = 1; i <= min; i++) |
for (i = 1; i <= min; i++) |
| 3892 |
{ |
{ |
| 3893 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3894 |
{ |
{ |
| 3895 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3896 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3897 |
} |
} |
| 3898 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 3899 |
} |
} |
| 3906 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3907 |
{ |
{ |
| 3908 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3909 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3910 |
} |
} |
| 3911 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 3912 |
chartype = UCD_CHARTYPE(c); |
chartype = UCD_CHARTYPE(c); |
| 3913 |
if ((chartype == ucp_Lu || |
if ((chartype == ucp_Lu || |
| 3914 |
chartype == ucp_Ll || |
chartype == ucp_Ll || |
| 3915 |
chartype == ucp_Lt) == prop_fail_result) |
chartype == ucp_Lt) == prop_fail_result) |
| 3916 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3917 |
} |
} |
| 3918 |
break; |
break; |
| 3919 |
|
|
| 3923 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3924 |
{ |
{ |
| 3925 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3926 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3927 |
} |
} |
| 3928 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 3929 |
if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) |
if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) |
| 3930 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3931 |
} |
} |
| 3932 |
break; |
break; |
| 3933 |
|
|
| 3937 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3938 |
{ |
{ |
| 3939 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3940 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3941 |
} |
} |
| 3942 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 3943 |
if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) |
if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) |
| 3944 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3945 |
} |
} |
| 3946 |
break; |
break; |
| 3947 |
|
|
| 3951 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3952 |
{ |
{ |
| 3953 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3954 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3955 |
} |
} |
| 3956 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 3957 |
if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) |
if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) |
| 3958 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3959 |
} |
} |
| 3960 |
break; |
break; |
| 3961 |
|
|
| 3966 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3967 |
{ |
{ |
| 3968 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3969 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3970 |
} |
} |
| 3971 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 3972 |
category = UCD_CATEGORY(c); |
category = UCD_CATEGORY(c); |
| 3973 |
if ((category == ucp_L || category == ucp_N) == prop_fail_result) |
if ((category == ucp_L || category == ucp_N) == prop_fail_result) |
| 3974 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3975 |
} |
} |
| 3976 |
break; |
break; |
| 3977 |
|
|
| 3981 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3982 |
{ |
{ |
| 3983 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 3984 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3985 |
} |
} |
| 3986 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 3987 |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
| 3988 |
c == CHAR_FF || c == CHAR_CR) |
c == CHAR_FF || c == CHAR_CR) |
| 3989 |
== prop_fail_result) |
== prop_fail_result) |
| 3990 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 3991 |
} |
} |
| 3992 |
break; |
break; |
| 3993 |
|
|
| 3997 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 3998 |
{ |
{ |
| 3999 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4000 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4001 |
} |
} |
| 4002 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4003 |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
| 4004 |
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) |
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) |
| 4005 |
== prop_fail_result) |
== prop_fail_result) |
| 4006 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4007 |
} |
} |
| 4008 |
break; |
break; |
| 4009 |
|
|
| 4014 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4015 |
{ |
{ |
| 4016 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4017 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4018 |
} |
} |
| 4019 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4020 |
category = UCD_CATEGORY(c); |
category = UCD_CATEGORY(c); |
| 4021 |
if ((category == ucp_L || category == ucp_N || c == CHAR_UNDERSCORE) |
if ((category == ucp_L || category == ucp_N || c == CHAR_UNDERSCORE) |
| 4022 |
== prop_fail_result) |
== prop_fail_result) |
| 4023 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4024 |
} |
} |
| 4025 |
break; |
break; |
| 4026 |
|
|
| 4041 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4042 |
{ |
{ |
| 4043 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4044 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4045 |
} |
} |
| 4046 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4047 |
if (UCD_CATEGORY(c) == ucp_M) RRETURN(MATCH_NOMATCH); |
if (UCD_CATEGORY(c) == ucp_M) MRRETURN(MATCH_NOMATCH); |
| 4048 |
while (eptr < md->end_subject) |
while (eptr < md->end_subject) |
| 4049 |
{ |
{ |
| 4050 |
int len = 1; |
int len = 1; |
| 4069 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4070 |
{ |
{ |
| 4071 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4072 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4073 |
} |
} |
| 4074 |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); |
| 4075 |
eptr++; |
eptr++; |
| 4076 |
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
| 4077 |
} |
} |
| 4083 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4084 |
{ |
{ |
| 4085 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4086 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4087 |
} |
} |
| 4088 |
eptr++; |
eptr++; |
| 4089 |
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; |
| 4091 |
break; |
break; |
| 4092 |
|
|
| 4093 |
case OP_ANYBYTE: |
case OP_ANYBYTE: |
| 4094 |
if (eptr > md->end_subject - min) RRETURN(MATCH_NOMATCH); |
if (eptr > md->end_subject - min) MRRETURN(MATCH_NOMATCH); |
| 4095 |
eptr += min; |
eptr += min; |
| 4096 |
break; |
break; |
| 4097 |
|
|
| 4101 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4102 |
{ |
{ |
| 4103 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4104 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4105 |
} |
} |
| 4106 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 4107 |
switch(c) |
switch(c) |
| 4108 |
{ |
{ |
| 4109 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 4110 |
|
|
| 4111 |
case 0x000d: |
case 0x000d: |
| 4112 |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
| 4120 |
case 0x0085: |
case 0x0085: |
| 4121 |
case 0x2028: |
case 0x2028: |
| 4122 |
case 0x2029: |
case 0x2029: |
| 4123 |
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); |
if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); |
| 4124 |
break; |
break; |
| 4125 |
} |
} |
| 4126 |
} |
} |
| 4132 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4133 |
{ |
{ |
| 4134 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4135 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4136 |
} |
} |
| 4137 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 4138 |
switch(c) |
switch(c) |
| 4157 |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
| 4158 |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
| 4159 |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
| 4160 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4161 |
} |
} |
| 4162 |
} |
} |
| 4163 |
break; |
break; |
| 4168 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4169 |
{ |
{ |
| 4170 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4171 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4172 |
} |
} |
| 4173 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 4174 |
switch(c) |
switch(c) |
| 4175 |
{ |
{ |
| 4176 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 4177 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
| 4178 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
| 4179 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
| 4204 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4205 |
{ |
{ |
| 4206 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4207 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4208 |
} |
} |
| 4209 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 4210 |
switch(c) |
switch(c) |
| 4217 |
case 0x85: /* NEL */ |
case 0x85: /* NEL */ |
| 4218 |
case 0x2028: /* LINE SEPARATOR */ |
case 0x2028: /* LINE SEPARATOR */ |
| 4219 |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
| 4220 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4221 |
} |
} |
| 4222 |
} |
} |
| 4223 |
break; |
break; |
| 4228 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4229 |
{ |
{ |
| 4230 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4231 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4232 |
} |
} |
| 4233 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 4234 |
switch(c) |
switch(c) |
| 4235 |
{ |
{ |
| 4236 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 4237 |
case 0x0a: /* LF */ |
case 0x0a: /* LF */ |
| 4238 |
case 0x0b: /* VT */ |
case 0x0b: /* VT */ |
| 4239 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
| 4252 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4253 |
{ |
{ |
| 4254 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4255 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4256 |
} |
} |
| 4257 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 4258 |
if (c < 128 && (md->ctypes[c] & ctype_digit) != 0) |
if (c < 128 && (md->ctypes[c] & ctype_digit) != 0) |
| 4259 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4260 |
} |
} |
| 4261 |
break; |
break; |
| 4262 |
|
|
| 4266 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4267 |
{ |
{ |
| 4268 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4269 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4270 |
} |
} |
| 4271 |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_digit) == 0) |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_digit) == 0) |
| 4272 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4273 |
/* No need to skip more bytes - we know it's a 1-byte character */ |
/* No need to skip more bytes - we know it's a 1-byte character */ |
| 4274 |
} |
} |
| 4275 |
break; |
break; |
| 4280 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4281 |
{ |
{ |
| 4282 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4283 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4284 |
} |
} |
| 4285 |
if (*eptr < 128 && (md->ctypes[*eptr] & ctype_space) != 0) |
if (*eptr < 128 && (md->ctypes[*eptr] & ctype_space) != 0) |
| 4286 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4287 |
while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80); |
while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80); |
| 4288 |
} |
} |
| 4289 |
break; |
break; |
| 4294 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4295 |
{ |
{ |
| 4296 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4297 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4298 |
} |
} |
| 4299 |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_space) == 0) |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_space) == 0) |
| 4300 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4301 |
/* No need to skip more bytes - we know it's a 1-byte character */ |
/* No need to skip more bytes - we know it's a 1-byte character */ |
| 4302 |
} |
} |
| 4303 |
break; |
break; |
| 4308 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4309 |
{ |
{ |
| 4310 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4311 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4312 |
} |
} |
| 4313 |
if (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0) |
if (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0) |
| 4314 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4315 |
while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80); |
while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80); |
| 4316 |
} |
} |
| 4317 |
break; |
break; |
| 4322 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4323 |
{ |
{ |
| 4324 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4325 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4326 |
} |
} |
| 4327 |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_word) == 0) |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_word) == 0) |
| 4328 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4329 |
/* No need to skip more bytes - we know it's a 1-byte character */ |
/* No need to skip more bytes - we know it's a 1-byte character */ |
| 4330 |
} |
} |
| 4331 |
break; |
break; |
| 4348 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4349 |
{ |
{ |
| 4350 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4351 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4352 |
} |
} |
| 4353 |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); |
| 4354 |
eptr++; |
eptr++; |
| 4355 |
} |
} |
| 4356 |
break; |
break; |
| 4359 |
if (eptr > md->end_subject - min) |
if (eptr > md->end_subject - min) |
| 4360 |
{ |
{ |
| 4361 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4362 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4363 |
} |
} |
| 4364 |
eptr += min; |
eptr += min; |
| 4365 |
break; |
break; |
| 4368 |
if (eptr > md->end_subject - min) |
if (eptr > md->end_subject - min) |
| 4369 |
{ |
{ |
| 4370 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4371 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4372 |
} |
} |
| 4373 |
eptr += min; |
eptr += min; |
| 4374 |
break; |
break; |
| 4379 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4380 |
{ |
{ |
| 4381 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4382 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4383 |
} |
} |
| 4384 |
switch(*eptr++) |
switch(*eptr++) |
| 4385 |
{ |
{ |
| 4386 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 4387 |
|
|
| 4388 |
case 0x000d: |
case 0x000d: |
| 4389 |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
| 4395 |
case 0x000b: |
case 0x000b: |
| 4396 |
case 0x000c: |
case 0x000c: |
| 4397 |
case 0x0085: |
case 0x0085: |
| 4398 |
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); |
if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); |
| 4399 |
break; |
break; |
| 4400 |
} |
} |
| 4401 |
} |
} |
| 4407 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4408 |
{ |
{ |
| 4409 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4410 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4411 |
} |
} |
| 4412 |
switch(*eptr++) |
switch(*eptr++) |
| 4413 |
{ |
{ |
| 4415 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
| 4416 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
| 4417 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
| 4418 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4419 |
} |
} |
| 4420 |
} |
} |
| 4421 |
break; |
break; |
| 4426 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4427 |
{ |
{ |
| 4428 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4429 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4430 |
} |
} |
| 4431 |
switch(*eptr++) |
switch(*eptr++) |
| 4432 |
{ |
{ |
| 4433 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 4434 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
| 4435 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
| 4436 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
| 4445 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4446 |
{ |
{ |
| 4447 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4448 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4449 |
} |
} |
| 4450 |
switch(*eptr++) |
switch(*eptr++) |
| 4451 |
{ |
{ |
| 4455 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
| 4456 |
case 0x0d: /* CR */ |
case 0x0d: /* CR */ |
| 4457 |
case 0x85: /* NEL */ |
case 0x85: /* NEL */ |
| 4458 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4459 |
} |
} |
| 4460 |
} |
} |
| 4461 |
break; |
break; |
| 4466 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4467 |
{ |
{ |
| 4468 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4469 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4470 |
} |
} |
| 4471 |
switch(*eptr++) |
switch(*eptr++) |
| 4472 |
{ |
{ |
| 4473 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 4474 |
case 0x0a: /* LF */ |
case 0x0a: /* LF */ |
| 4475 |
case 0x0b: /* VT */ |
case 0x0b: /* VT */ |
| 4476 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
| 4487 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4488 |
{ |
{ |
| 4489 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4490 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4491 |
} |
} |
| 4492 |
if ((md->ctypes[*eptr++] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH); |
if ((md->ctypes[*eptr++] & ctype_digit) != 0) MRRETURN(MATCH_NOMATCH); |
| 4493 |
} |
} |
| 4494 |
break; |
break; |
| 4495 |
|
|
| 4499 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4500 |
{ |
{ |
| 4501 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4502 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4503 |
} |
} |
| 4504 |
if ((md->ctypes[*eptr++] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH); |
if ((md->ctypes[*eptr++] & ctype_digit) == 0) MRRETURN(MATCH_NOMATCH); |
| 4505 |
} |
} |
| 4506 |
break; |
break; |
| 4507 |
|
|
| 4511 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4512 |
{ |
{ |
| 4513 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4514 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4515 |
} |
} |
| 4516 |
if ((md->ctypes[*eptr++] & ctype_space) != 0) RRETURN(MATCH_NOMATCH); |
if ((md->ctypes[*eptr++] & ctype_space) != 0) MRRETURN(MATCH_NOMATCH); |
| 4517 |
} |
} |
| 4518 |
break; |
break; |
| 4519 |
|
|
| 4523 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4524 |
{ |
{ |
| 4525 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4526 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4527 |
} |
} |
| 4528 |
if ((md->ctypes[*eptr++] & ctype_space) == 0) RRETURN(MATCH_NOMATCH); |
if ((md->ctypes[*eptr++] & ctype_space) == 0) MRRETURN(MATCH_NOMATCH); |
| 4529 |
} |
} |
| 4530 |
break; |
break; |
| 4531 |
|
|
| 4535 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4536 |
{ |
{ |
| 4537 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4538 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4539 |
} |
} |
| 4540 |
if ((md->ctypes[*eptr++] & ctype_word) != 0) |
if ((md->ctypes[*eptr++] & ctype_word) != 0) |
| 4541 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4542 |
} |
} |
| 4543 |
break; |
break; |
| 4544 |
|
|
| 4548 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4549 |
{ |
{ |
| 4550 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4551 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4552 |
} |
} |
| 4553 |
if ((md->ctypes[*eptr++] & ctype_word) == 0) |
if ((md->ctypes[*eptr++] & ctype_word) == 0) |
| 4554 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4555 |
} |
} |
| 4556 |
break; |
break; |
| 4557 |
|
|
| 4580 |
{ |
{ |
| 4581 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM36); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM36); |
| 4582 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4583 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4584 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4585 |
{ |
{ |
| 4586 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4587 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4588 |
} |
} |
| 4589 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4590 |
if (prop_fail_result) RRETURN(MATCH_NOMATCH); |
if (prop_fail_result) MRRETURN(MATCH_NOMATCH); |
| 4591 |
} |
} |
| 4592 |
/* Control never gets here */ |
/* Control never gets here */ |
| 4593 |
|
|
| 4597 |
int chartype; |
int chartype; |
| 4598 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM37); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM37); |
| 4599 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4600 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4601 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4602 |
{ |
{ |
| 4603 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4604 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4605 |
} |
} |
| 4606 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4607 |
chartype = UCD_CHARTYPE(c); |
chartype = UCD_CHARTYPE(c); |
| 4608 |
if ((chartype == ucp_Lu || |
if ((chartype == ucp_Lu || |
| 4609 |
chartype == ucp_Ll || |
chartype == ucp_Ll || |
| 4610 |
chartype == ucp_Lt) == prop_fail_result) |
chartype == ucp_Lt) == prop_fail_result) |
| 4611 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4612 |
} |
} |
| 4613 |
/* Control never gets here */ |
/* Control never gets here */ |
| 4614 |
|
|
| 4617 |
{ |
{ |
| 4618 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM38); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM38); |
| 4619 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4620 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4621 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4622 |
{ |
{ |
| 4623 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4624 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4625 |
} |
} |
| 4626 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4627 |
if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) |
if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) |
| 4628 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4629 |
} |
} |
| 4630 |
/* Control never gets here */ |
/* Control never gets here */ |
| 4631 |
|
|
| 4634 |
{ |
{ |
| 4635 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM39); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM39); |
| 4636 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4637 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4638 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4639 |
{ |
{ |
| 4640 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4641 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4642 |
} |
} |
| 4643 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4644 |
if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) |
if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) |
| 4645 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4646 |
} |
} |
| 4647 |
/* Control never gets here */ |
/* Control never gets here */ |
| 4648 |
|
|
| 4651 |
{ |
{ |
| 4652 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM40); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM40); |
| 4653 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4654 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4655 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4656 |
{ |
{ |
| 4657 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4658 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4659 |
} |
} |
| 4660 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4661 |
if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) |
if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) |
| 4662 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4663 |
} |
} |
| 4664 |
/* Control never gets here */ |
/* Control never gets here */ |
| 4665 |
|
|
| 4669 |
int category; |
int category; |
| 4670 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM59); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM59); |
| 4671 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4672 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4673 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4674 |
{ |
{ |
| 4675 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4676 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4677 |
} |
} |
| 4678 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4679 |
category = UCD_CATEGORY(c); |
category = UCD_CATEGORY(c); |
| 4680 |
if ((category == ucp_L || category == ucp_N) == prop_fail_result) |
if ((category == ucp_L || category == ucp_N) == prop_fail_result) |
| 4681 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4682 |
} |
} |
| 4683 |
/* Control never gets here */ |
/* Control never gets here */ |
| 4684 |
|
|
| 4687 |
{ |
{ |
| 4688 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM60); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM60); |
| 4689 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4690 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4691 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4692 |
{ |
{ |
| 4693 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4694 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4695 |
} |
} |
| 4696 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4697 |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
| 4698 |
c == CHAR_FF || c == CHAR_CR) |
c == CHAR_FF || c == CHAR_CR) |
| 4699 |
== prop_fail_result) |
== prop_fail_result) |
| 4700 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4701 |
} |
} |
| 4702 |
/* Control never gets here */ |
/* Control never gets here */ |
| 4703 |
|
|
| 4706 |
{ |
{ |
| 4707 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM61); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM61); |
| 4708 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4709 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4710 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4711 |
{ |
{ |
| 4712 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4713 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4714 |
} |
} |
| 4715 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4716 |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
| 4717 |
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) |
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) |
| 4718 |
== prop_fail_result) |
== prop_fail_result) |
| 4719 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4720 |
} |
} |
| 4721 |
/* Control never gets here */ |
/* Control never gets here */ |
| 4722 |
|
|
| 4726 |
int category; |
int category; |
| 4727 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM62); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM62); |
| 4728 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4729 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4730 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4731 |
{ |
{ |
| 4732 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4733 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4734 |
} |
} |
| 4735 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4736 |
category = UCD_CATEGORY(c); |
category = UCD_CATEGORY(c); |
| 4738 |
category == ucp_N || |
category == ucp_N || |
| 4739 |
c == CHAR_UNDERSCORE) |
c == CHAR_UNDERSCORE) |
| 4740 |
== prop_fail_result) |
== prop_fail_result) |
| 4741 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4742 |
} |
} |
| 4743 |
/* Control never gets here */ |
/* Control never gets here */ |
| 4744 |
|
|
| 4758 |
{ |
{ |
| 4759 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM41); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM41); |
| 4760 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4761 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4762 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4763 |
{ |
{ |
| 4764 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4765 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4766 |
} |
} |
| 4767 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
| 4768 |
if (UCD_CATEGORY(c) == ucp_M) RRETURN(MATCH_NOMATCH); |
if (UCD_CATEGORY(c) == ucp_M) MRRETURN(MATCH_NOMATCH); |
| 4769 |
while (eptr < md->end_subject) |
while (eptr < md->end_subject) |
| 4770 |
{ |
{ |
| 4771 |
int len = 1; |
int len = 1; |
| 4786 |
{ |
{ |
| 4787 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM42); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM42); |
| 4788 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4789 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4790 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4791 |
{ |
{ |
| 4792 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4793 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4794 |
} |
} |
| 4795 |
if (ctype == OP_ANY && IS_NEWLINE(eptr)) |
if (ctype == OP_ANY && IS_NEWLINE(eptr)) |
| 4796 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4797 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 4798 |
switch(ctype) |
switch(ctype) |
| 4799 |
{ |
{ |
| 4805 |
case OP_ANYNL: |
case OP_ANYNL: |
| 4806 |
switch(c) |
switch(c) |
| 4807 |
{ |
{ |
| 4808 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 4809 |
case 0x000d: |
case 0x000d: |
| 4810 |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
| 4811 |
break; |
break; |
| 4817 |
case 0x0085: |
case 0x0085: |
| 4818 |
case 0x2028: |
case 0x2028: |
| 4819 |
case 0x2029: |
case 0x2029: |
| 4820 |
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); |
if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); |
| 4821 |
break; |
break; |
| 4822 |
} |
} |
| 4823 |
break; |
break; |
| 4845 |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
| 4846 |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
| 4847 |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
| 4848 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4849 |
} |
} |
| 4850 |
break; |
break; |
| 4851 |
|
|
| 4852 |
case OP_HSPACE: |
case OP_HSPACE: |
| 4853 |
switch(c) |
switch(c) |
| 4854 |
{ |
{ |
| 4855 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 4856 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
| 4857 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
| 4858 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
| 4887 |
case 0x85: /* NEL */ |
case 0x85: /* NEL */ |
| 4888 |
case 0x2028: /* LINE SEPARATOR */ |
case 0x2028: /* LINE SEPARATOR */ |
| 4889 |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
| 4890 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4891 |
} |
} |
| 4892 |
break; |
break; |
| 4893 |
|
|
| 4894 |
case OP_VSPACE: |
case OP_VSPACE: |
| 4895 |
switch(c) |
switch(c) |
| 4896 |
{ |
{ |
| 4897 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 4898 |
case 0x0a: /* LF */ |
case 0x0a: /* LF */ |
| 4899 |
case 0x0b: /* VT */ |
case 0x0b: /* VT */ |
| 4900 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
| 4908 |
|
|
| 4909 |
case OP_NOT_DIGIT: |
case OP_NOT_DIGIT: |
| 4910 |
if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) |
if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) |
| 4911 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4912 |
break; |
break; |
| 4913 |
|
|
| 4914 |
case OP_DIGIT: |
case OP_DIGIT: |
| 4915 |
if (c >= 256 || (md->ctypes[c] & ctype_digit) == 0) |
if (c >= 256 || (md->ctypes[c] & ctype_digit) == 0) |
| 4916 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4917 |
break; |
break; |
| 4918 |
|
|
| 4919 |
case OP_NOT_WHITESPACE: |
case OP_NOT_WHITESPACE: |
| 4920 |
if (c < 256 && (md->ctypes[c] & ctype_space) != 0) |
if (c < 256 && (md->ctypes[c] & ctype_space) != 0) |
| 4921 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4922 |
break; |
break; |
| 4923 |
|
|
| 4924 |
case OP_WHITESPACE: |
case OP_WHITESPACE: |
| 4925 |
if (c >= 256 || (md->ctypes[c] & ctype_space) == 0) |
if (c >= 256 || (md->ctypes[c] & ctype_space) == 0) |
| 4926 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4927 |
break; |
break; |
| 4928 |
|
|
| 4929 |
case OP_NOT_WORDCHAR: |
case OP_NOT_WORDCHAR: |
| 4930 |
if (c < 256 && (md->ctypes[c] & ctype_word) != 0) |
if (c < 256 && (md->ctypes[c] & ctype_word) != 0) |
| 4931 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4932 |
break; |
break; |
| 4933 |
|
|
| 4934 |
case OP_WORDCHAR: |
case OP_WORDCHAR: |
| 4935 |
if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) |
if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) |
| 4936 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4937 |
break; |
break; |
| 4938 |
|
|
| 4939 |
default: |
default: |
| 4949 |
{ |
{ |
| 4950 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM43); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM43); |
| 4951 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
| 4952 |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
| 4953 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
| 4954 |
{ |
{ |
| 4955 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
| 4956 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4957 |
} |
} |
| 4958 |
if (ctype == OP_ANY && IS_NEWLINE(eptr)) |
if (ctype == OP_ANY && IS_NEWLINE(eptr)) |
| 4959 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4960 |
c = *eptr++; |
c = *eptr++; |
| 4961 |
switch(ctype) |
switch(ctype) |
| 4962 |
{ |
{ |
| 4968 |
case OP_ANYNL: |
case OP_ANYNL: |
| 4969 |
switch(c) |
switch(c) |
| 4970 |
{ |
{ |
| 4971 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 4972 |
case 0x000d: |
case 0x000d: |
| 4973 |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
| 4974 |
break; |
break; |
| 4979 |
case 0x000b: |
case 0x000b: |
| 4980 |
case 0x000c: |
case 0x000c: |
| 4981 |
case 0x0085: |
case 0x0085: |
| 4982 |
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); |
if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); |
| 4983 |
break; |
break; |
| 4984 |
} |
} |
| 4985 |
break; |
break; |
| 4991 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
| 4992 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
| 4993 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
| 4994 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 4995 |
} |
} |
| 4996 |
break; |
break; |
| 4997 |
|
|
| 4998 |
case OP_HSPACE: |
case OP_HSPACE: |
| 4999 |
switch(c) |
switch(c) |
| 5000 |
{ |
{ |
| 5001 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 5002 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
| 5003 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
| 5004 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
| 5015 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
| 5016 |
case 0x0d: /* CR */ |
case 0x0d: /* CR */ |
| 5017 |
case 0x85: /* NEL */ |
case 0x85: /* NEL */ |
| 5018 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 5019 |
} |
} |
| 5020 |
break; |
break; |
| 5021 |
|
|
| 5022 |
case OP_VSPACE: |
case OP_VSPACE: |
| 5023 |
switch(c) |
switch(c) |
| 5024 |
{ |
{ |
| 5025 |
default: RRETURN(MATCH_NOMATCH); |
default: MRRETURN(MATCH_NOMATCH); |
| 5026 |
case 0x0a: /* LF */ |
case 0x0a: /* LF */ |
| 5027 |
case 0x0b: /* VT */ |
case 0x0b: /* VT */ |
| 5028 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
| 5033 |
break; |
break; |
| 5034 |
|
|
| 5035 |
case OP_NOT_DIGIT: |
case OP_NOT_DIGIT: |
| 5036 |
if ((md->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_digit) != 0) MRRETURN(MATCH_NOMATCH); |
| 5037 |
break; |
break; |
| 5038 |
|
|
| 5039 |
case OP_DIGIT: |
case OP_DIGIT: |
| 5040 |
if ((md->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_digit) == 0) MRRETURN(MATCH_NOMATCH); |
| 5041 |
break; |
break; |
| 5042 |
|
|
| 5043 |
case OP_NOT_WHITESPACE: |
case OP_NOT_WHITESPACE: |
| 5044 |
if ((md->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_space) != 0) MRRETURN(MATCH_NOMATCH); |
| 5045 |
break; |
break; |
| 5046 |
|
|
| 5047 |
case OP_WHITESPACE: |
case OP_WHITESPACE: |
| 5048 |
if ((md->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_space) == 0) MRRETURN(MATCH_NOMATCH); |
| 5049 |
break; |
break; |
| 5050 |
|
|
| 5051 |
case OP_NOT_WORDCHAR: |
case OP_NOT_WORDCHAR: |
| 5052 |
if ((md->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_word) != 0) MRRETURN(MATCH_NOMATCH); |
| 5053 |
break; |
break; |
| 5054 |
|
|
| 5055 |
case OP_WORDCHAR: |
case OP_WORDCHAR: |
| 5056 |
if ((md->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_word) == 0) MRRETURN(MATCH_NOMATCH); |
| 5057 |
break; |
break; |
| 5058 |
|
|
| 5059 |
default: |
default: |
| 5795 |
|
|
| 5796 |
/* Get here if we can't make it match with any permitted repetitions */ |
/* Get here if we can't make it match with any permitted repetitions */ |
| 5797 |
|
|
| 5798 |
RRETURN(MATCH_NOMATCH); |
MRRETURN(MATCH_NOMATCH); |
| 5799 |
} |
} |
| 5800 |
/* Control never gets here */ |
/* Control never gets here */ |
| 5801 |
|
|
| 6090 |
md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0; |
md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0; |
| 6091 |
md->use_ucp = (re->options & PCRE_UCP) != 0; |
md->use_ucp = (re->options & PCRE_UCP) != 0; |
| 6092 |
md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0; |
md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0; |
|
md->ignore_skip_arg = FALSE; |
|
| 6093 |
|
|
| 6094 |
/* Some options are unpacked into BOOL variables in the hope that testing |
/* Some options are unpacked into BOOL variables in the hope that testing |
| 6095 |
them will be faster than individual option bits. */ |
them will be faster than individual option bits. */ |
| 6100 |
md->notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0; |
md->notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0; |
| 6101 |
|
|
| 6102 |
md->hitend = FALSE; |
md->hitend = FALSE; |
| 6103 |
md->mark = md->nomatch_mark = NULL; /* In case never set */ |
md->mark = NULL; /* In case never set */ |
| 6104 |
|
|
| 6105 |
md->recursive = NULL; /* No recursion at top level */ |
md->recursive = NULL; /* No recursion at top level */ |
| 6106 |
md->hasthen = (re->flags & PCRE_HASTHEN) != 0; |
md->hasthen = (re->flags & PCRE_HASTHEN) != 0; |
| 6452 |
md->match_call_count = 0; |
md->match_call_count = 0; |
| 6453 |
md->match_function_type = 0; |
md->match_function_type = 0; |
| 6454 |
md->end_offset_top = 0; |
md->end_offset_top = 0; |
| 6455 |
rc = match(start_match, md->start_code, start_match, 2, md, NULL, 0); |
rc = match(start_match, md->start_code, start_match, NULL, 2, md, NULL, 0); |
| 6456 |
if (md->hitend && start_partial == NULL) start_partial = md->start_used_ptr; |
if (md->hitend && start_partial == NULL) start_partial = md->start_used_ptr; |
| 6457 |
|
|
| 6458 |
switch(rc) |
switch(rc) |
| 6459 |
{ |
{ |
|
/* If MATCH_SKIP_ARG reaches this level it means that a MARK that matched |
|
|
the SKIP's arg was not found. In this circumstance, Perl ignores the SKIP |
|
|
entirely. The only way we can do that is to re-do the match at the same |
|
|
point, with a flag to force SKIP with an argument to be ignored. Just |
|
|
treating this case as NOMATCH does not work because it does not check other |
|
|
alternatives in patterns such as A(*SKIP:A)B|AC when the subject is AC. */ |
|
|
|
|
|
case MATCH_SKIP_ARG: |
|
|
new_start_match = start_match; |
|
|
md->ignore_skip_arg = TRUE; |
|
|
break; |
|
|
|
|
| 6460 |
/* SKIP passes back the next starting point explicitly, but if it is the |
/* SKIP passes back the next starting point explicitly, but if it is the |
| 6461 |
same as the match we have just done, treat it as NOMATCH. */ |
same as the match we have just done, treat it as NOMATCH. */ |
| 6462 |
|
|
| 6468 |
} |
} |
| 6469 |
/* Fall through */ |
/* Fall through */ |
| 6470 |
|
|
| 6471 |
|
/* If MATCH_SKIP_ARG reaches this level it means that a MARK that matched |
| 6472 |
|
the SKIP's arg was not found. We also treat this as NOMATCH. */ |
| 6473 |
|
|
| 6474 |
|
case MATCH_SKIP_ARG: |
| 6475 |
|
/* Fall through */ |
| 6476 |
|
|
| 6477 |
/* NOMATCH and PRUNE advance by one character. THEN at this level acts |
/* NOMATCH and PRUNE advance by one character. THEN at this level acts |
| 6478 |
exactly like PRUNE. Unset the ignore SKIP-with-argument flag. */ |
exactly like PRUNE. */ |
| 6479 |
|
|
| 6480 |
case MATCH_NOMATCH: |
case MATCH_NOMATCH: |
| 6481 |
case MATCH_PRUNE: |
case MATCH_PRUNE: |
| 6482 |
case MATCH_THEN: |
case MATCH_THEN: |
|
md->ignore_skip_arg = FALSE; |
|
| 6483 |
new_start_match = start_match + 1; |
new_start_match = start_match + 1; |
| 6484 |
#ifdef SUPPORT_UTF8 |
#ifdef SUPPORT_UTF8 |
| 6485 |
if (utf8) |
if (utf8) |
| 6608 |
offsets[1] = (int)(md->end_match_ptr - md->start_subject); |
offsets[1] = (int)(md->end_match_ptr - md->start_subject); |
| 6609 |
} |
} |
| 6610 |
|
|
|
/* Return MARK data if requested */ |
|
|
|
|
|
if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0) |
|
|
*(extra_data->mark) = (unsigned char *)(md->mark); |
|
| 6611 |
DPRINTF((">>>> returning %d\n", rc)); |
DPRINTF((">>>> returning %d\n", rc)); |
| 6612 |
return rc; |
goto RETURN_MARK; |
| 6613 |
} |
} |
| 6614 |
|
|
| 6615 |
/* Control gets here if there has been an error, or if the overall match |
/* Control gets here if there has been an error, or if the overall match |
| 6653 |
|
|
| 6654 |
/* Return the MARK data if it has been requested. */ |
/* Return the MARK data if it has been requested. */ |
| 6655 |
|
|
| 6656 |
|
RETURN_MARK: |
| 6657 |
|
|
| 6658 |
if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0) |
if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0) |
| 6659 |
*(extra_data->mark) = (unsigned char *)(md->nomatch_mark); |
*(extra_data->mark) = (unsigned char *)(md->mark); |
| 6660 |
return rc; |
return rc; |
| 6661 |
} |
} |
| 6662 |
|
|