82 |
#define MATCH_SKIP_ARG (-993) |
#define MATCH_SKIP_ARG (-993) |
83 |
#define MATCH_THEN (-992) |
#define MATCH_THEN (-992) |
84 |
|
|
|
/* This is a convenience macro for code that occurs many times. */ |
|
|
|
|
|
#define MRRETURN(ra) \ |
|
|
{ \ |
|
|
md->mark = markptr; \ |
|
|
RRETURN(ra); \ |
|
|
} |
|
|
|
|
85 |
/* 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. |
86 |
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, |
87 |
because the offset vector is always a multiple of 3 long. */ |
because the offset vector is always a multiple of 3 long. */ |
217 |
while (length-- > 0) if (*p++ != *eptr++) return -1; |
while (length-- > 0) if (*p++ != *eptr++) return -1; |
218 |
} |
} |
219 |
|
|
220 |
return eptr - eptr_start; |
return (int)(eptr - eptr_start); |
221 |
} |
} |
222 |
|
|
223 |
|
|
282 |
#define RMATCH(ra,rb,rc,rd,re,rw) \ |
#define RMATCH(ra,rb,rc,rd,re,rw) \ |
283 |
{ \ |
{ \ |
284 |
printf("match() called in line %d\n", __LINE__); \ |
printf("match() called in line %d\n", __LINE__); \ |
285 |
rrc = match(ra,rb,mstart,markptr,rc,rd,re,rdepth+1); \ |
rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1); \ |
286 |
printf("to line %d\n", __LINE__); \ |
printf("to line %d\n", __LINE__); \ |
287 |
} |
} |
288 |
#define RRETURN(ra) \ |
#define RRETURN(ra) \ |
292 |
} |
} |
293 |
#else |
#else |
294 |
#define RMATCH(ra,rb,rc,rd,re,rw) \ |
#define RMATCH(ra,rb,rc,rd,re,rw) \ |
295 |
rrc = match(ra,rb,mstart,markptr,rc,rd,re,rdepth+1) |
rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1) |
296 |
#define RRETURN(ra) return ra |
#define RRETURN(ra) return ra |
297 |
#endif |
#endif |
298 |
|
|
313 |
newframe->Xeptr = ra;\ |
newframe->Xeptr = ra;\ |
314 |
newframe->Xecode = rb;\ |
newframe->Xecode = rb;\ |
315 |
newframe->Xmstart = mstart;\ |
newframe->Xmstart = mstart;\ |
|
newframe->Xmarkptr = markptr;\ |
|
316 |
newframe->Xoffset_top = rc;\ |
newframe->Xoffset_top = rc;\ |
317 |
newframe->Xeptrb = re;\ |
newframe->Xeptrb = re;\ |
318 |
newframe->Xrdepth = frame->Xrdepth + 1;\ |
newframe->Xrdepth = frame->Xrdepth + 1;\ |
348 |
PCRE_PUCHAR Xeptr; |
PCRE_PUCHAR Xeptr; |
349 |
const pcre_uchar *Xecode; |
const pcre_uchar *Xecode; |
350 |
PCRE_PUCHAR Xmstart; |
PCRE_PUCHAR Xmstart; |
|
PCRE_PUCHAR Xmarkptr; |
|
351 |
int Xoffset_top; |
int Xoffset_top; |
352 |
eptrblock *Xeptrb; |
eptrblock *Xeptrb; |
353 |
unsigned int Xrdepth; |
unsigned int Xrdepth; |
417 |
same response. */ |
same response. */ |
418 |
|
|
419 |
/* 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 |
420 |
appears several times in the code. We set the "hit end" flag if the pointer is |
appear several times in the code. We set the "hit end" flag if the pointer is |
421 |
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. |
422 |
something has been matched). For hard partial matching, we then return |
something has been matched). For hard partial matching, we then return |
423 |
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 |
428 |
eptr > md->start_used_ptr) \ |
eptr > md->start_used_ptr) \ |
429 |
{ \ |
{ \ |
430 |
md->hitend = TRUE; \ |
md->hitend = TRUE; \ |
431 |
if (md->partial > 1) MRRETURN(PCRE_ERROR_PARTIAL); \ |
if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \ |
432 |
} |
} |
433 |
|
|
434 |
#define SCHECK_PARTIAL()\ |
#define SCHECK_PARTIAL()\ |
435 |
if (md->partial != 0 && eptr > md->start_used_ptr) \ |
if (md->partial != 0 && eptr > md->start_used_ptr) \ |
436 |
{ \ |
{ \ |
437 |
md->hitend = TRUE; \ |
md->hitend = TRUE; \ |
438 |
if (md->partial > 1) MRRETURN(PCRE_ERROR_PARTIAL); \ |
if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \ |
439 |
} |
} |
440 |
|
|
441 |
|
|
449 |
ecode pointer to current position in compiled code |
ecode pointer to current position in compiled code |
450 |
mstart pointer to the current match start position (can be modified |
mstart pointer to the current match start position (can be modified |
451 |
by encountering \K) |
by encountering \K) |
|
markptr pointer to the most recent MARK name, or NULL |
|
452 |
offset_top current top pointer |
offset_top current top pointer |
453 |
md pointer to "static" info for the match |
md pointer to "static" info for the match |
454 |
eptrb pointer to chain of blocks containing eptr at start of |
eptrb pointer to chain of blocks containing eptr at start of |
464 |
|
|
465 |
static int |
static int |
466 |
match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode, |
match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode, |
467 |
PCRE_PUCHAR mstart, const pcre_uchar *markptr, int offset_top, |
PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb, |
468 |
match_data *md, eptrblock *eptrb, unsigned int rdepth) |
unsigned int rdepth) |
469 |
{ |
{ |
470 |
/* 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, |
471 |
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 |
495 |
frame->Xeptr = eptr; |
frame->Xeptr = eptr; |
496 |
frame->Xecode = ecode; |
frame->Xecode = ecode; |
497 |
frame->Xmstart = mstart; |
frame->Xmstart = mstart; |
|
frame->Xmarkptr = markptr; |
|
498 |
frame->Xoffset_top = offset_top; |
frame->Xoffset_top = offset_top; |
499 |
frame->Xeptrb = eptrb; |
frame->Xeptrb = eptrb; |
500 |
frame->Xrdepth = rdepth; |
frame->Xrdepth = rdepth; |
508 |
#define eptr frame->Xeptr |
#define eptr frame->Xeptr |
509 |
#define ecode frame->Xecode |
#define ecode frame->Xecode |
510 |
#define mstart frame->Xmstart |
#define mstart frame->Xmstart |
|
#define markptr frame->Xmarkptr |
|
511 |
#define offset_top frame->Xoffset_top |
#define offset_top frame->Xoffset_top |
512 |
#define eptrb frame->Xeptrb |
#define eptrb frame->Xeptrb |
513 |
#define rdepth frame->Xrdepth |
#define rdepth frame->Xrdepth |
689 |
switch(op) |
switch(op) |
690 |
{ |
{ |
691 |
case OP_MARK: |
case OP_MARK: |
692 |
markptr = ecode + 2; |
md->nomatch_mark = ecode + 2; |
693 |
|
md->mark = NULL; /* In case previously set by assertion */ |
694 |
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md, |
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md, |
695 |
eptrb, RM55); |
eptrb, RM55); |
696 |
|
if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) && |
697 |
|
md->mark == NULL) md->mark = ecode + 2; |
698 |
|
|
699 |
/* 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 |
700 |
argument, and we must check whether that argument matches this MARK's |
argument, and we must check whether that argument matches this MARK's |
703 |
position and return MATCH_SKIP. Otherwise, pass back the return code |
position and return MATCH_SKIP. Otherwise, pass back the return code |
704 |
unaltered. */ |
unaltered. */ |
705 |
|
|
706 |
if (rrc == MATCH_SKIP_ARG && |
else if (rrc == MATCH_SKIP_ARG && |
707 |
STRCMP_UC_UC(markptr, md->start_match_ptr) == 0) |
STRCMP_UC_UC(ecode + 2, md->start_match_ptr) == 0) |
708 |
{ |
{ |
709 |
md->start_match_ptr = eptr; |
md->start_match_ptr = eptr; |
710 |
RRETURN(MATCH_SKIP); |
RRETURN(MATCH_SKIP); |
711 |
} |
} |
|
|
|
|
if (md->mark == NULL) md->mark = markptr; |
|
712 |
RRETURN(rrc); |
RRETURN(rrc); |
713 |
|
|
714 |
case OP_FAIL: |
case OP_FAIL: |
715 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
716 |
|
|
717 |
/* COMMIT overrides PRUNE, SKIP, and THEN */ |
/* COMMIT overrides PRUNE, SKIP, and THEN */ |
718 |
|
|
723 |
rrc != MATCH_SKIP && rrc != MATCH_SKIP_ARG && |
rrc != MATCH_SKIP && rrc != MATCH_SKIP_ARG && |
724 |
rrc != MATCH_THEN) |
rrc != MATCH_THEN) |
725 |
RRETURN(rrc); |
RRETURN(rrc); |
726 |
MRRETURN(MATCH_COMMIT); |
RRETURN(MATCH_COMMIT); |
727 |
|
|
728 |
/* PRUNE overrides THEN */ |
/* PRUNE overrides THEN */ |
729 |
|
|
731 |
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, |
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, |
732 |
eptrb, RM51); |
eptrb, RM51); |
733 |
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); |
734 |
MRRETURN(MATCH_PRUNE); |
RRETURN(MATCH_PRUNE); |
735 |
|
|
736 |
case OP_PRUNE_ARG: |
case OP_PRUNE_ARG: |
737 |
|
md->nomatch_mark = ecode + 2; |
738 |
|
md->mark = NULL; /* In case previously set by assertion */ |
739 |
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md, |
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md, |
740 |
eptrb, RM56); |
eptrb, RM56); |
741 |
|
if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) && |
742 |
|
md->mark == NULL) md->mark = ecode + 2; |
743 |
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); |
|
md->mark = ecode + 2; |
|
744 |
RRETURN(MATCH_PRUNE); |
RRETURN(MATCH_PRUNE); |
745 |
|
|
746 |
/* SKIP overrides PRUNE and THEN */ |
/* SKIP overrides PRUNE and THEN */ |
751 |
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE && rrc != MATCH_THEN) |
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE && rrc != MATCH_THEN) |
752 |
RRETURN(rrc); |
RRETURN(rrc); |
753 |
md->start_match_ptr = eptr; /* Pass back current position */ |
md->start_match_ptr = eptr; /* Pass back current position */ |
754 |
MRRETURN(MATCH_SKIP); |
RRETURN(MATCH_SKIP); |
755 |
|
|
756 |
|
/* Note that, for Perl compatibility, SKIP with an argument does NOT set |
757 |
|
nomatch_mark. There is a flag that disables this opcode when re-matching a |
758 |
|
pattern that ended with a SKIP for which there was not a matching MARK. */ |
759 |
|
|
760 |
case OP_SKIP_ARG: |
case OP_SKIP_ARG: |
761 |
|
if (md->ignore_skip_arg) |
762 |
|
{ |
763 |
|
ecode += PRIV(OP_lengths)[*ecode] + ecode[1]; |
764 |
|
break; |
765 |
|
} |
766 |
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md, |
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md, |
767 |
eptrb, RM57); |
eptrb, RM57); |
768 |
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE && rrc != MATCH_THEN) |
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE && rrc != MATCH_THEN) |
770 |
|
|
771 |
/* 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 |
772 |
returning the special MATCH_SKIP_ARG return code. This will either be |
returning the special MATCH_SKIP_ARG return code. This will either be |
773 |
caught by a matching MARK, or get to the top, where it is treated the same |
caught by a matching MARK, or get to the top, where it causes a rematch |
774 |
as PRUNE. */ |
with the md->ignore_skip_arg flag set. */ |
775 |
|
|
776 |
md->start_match_ptr = ecode + 2; |
md->start_match_ptr = ecode + 2; |
777 |
RRETURN(MATCH_SKIP_ARG); |
RRETURN(MATCH_SKIP_ARG); |
785 |
eptrb, RM54); |
eptrb, RM54); |
786 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
787 |
md->start_match_ptr = ecode; |
md->start_match_ptr = ecode; |
788 |
MRRETURN(MATCH_THEN); |
RRETURN(MATCH_THEN); |
789 |
|
|
790 |
case OP_THEN_ARG: |
case OP_THEN_ARG: |
791 |
|
md->nomatch_mark = ecode + 2; |
792 |
|
md->mark = NULL; /* In case previously set by assertion */ |
793 |
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, |
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, |
794 |
md, eptrb, RM58); |
md, eptrb, RM58); |
795 |
|
if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) && |
796 |
|
md->mark == NULL) md->mark = ecode + 2; |
797 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
798 |
md->start_match_ptr = ecode; |
md->start_match_ptr = ecode; |
|
md->mark = ecode + 2; |
|
799 |
RRETURN(MATCH_THEN); |
RRETURN(MATCH_THEN); |
800 |
|
|
801 |
/* Handle an atomic group that does not contain any capturing parentheses. |
/* Handle an atomic group that does not contain any capturing parentheses. |
820 |
if (rrc == MATCH_MATCH) /* Note: _not_ MATCH_ACCEPT */ |
if (rrc == MATCH_MATCH) /* Note: _not_ MATCH_ACCEPT */ |
821 |
{ |
{ |
822 |
mstart = md->start_match_ptr; |
mstart = md->start_match_ptr; |
|
markptr = md->mark; |
|
823 |
break; |
break; |
824 |
} |
} |
825 |
if (rrc == MATCH_THEN) |
if (rrc == MATCH_THEN) |
957 |
|
|
958 |
/* 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. */ |
959 |
|
|
|
if (md->mark == NULL) md->mark = markptr; |
|
960 |
RRETURN(rrc); |
RRETURN(rrc); |
961 |
} |
} |
962 |
|
|
1044 |
if (*ecode != OP_ALT) break; |
if (*ecode != OP_ALT) break; |
1045 |
} |
} |
1046 |
|
|
|
if (md->mark == NULL) md->mark = markptr; |
|
1047 |
RRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
1048 |
|
|
1049 |
/* Handle possessive capturing brackets with an unlimited repeat. We come |
/* Handle possessive capturing brackets with an unlimited repeat. We come |
1072 |
if (offset < md->offset_max) |
if (offset < md->offset_max) |
1073 |
{ |
{ |
1074 |
matched_once = FALSE; |
matched_once = FALSE; |
1075 |
code_offset = ecode - md->start_code; |
code_offset = (int)(ecode - md->start_code); |
1076 |
|
|
1077 |
save_offset1 = md->offset_vector[offset]; |
save_offset1 = md->offset_vector[offset]; |
1078 |
save_offset2 = md->offset_vector[offset+1]; |
save_offset2 = md->offset_vector[offset+1]; |
1131 |
md->offset_vector[md->offset_end - number] = save_offset3; |
md->offset_vector[md->offset_end - number] = save_offset3; |
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 = ecode - md->start_code; |
code_offset = (int)(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 = (unsigned char *)markptr; |
cb.mark = md->nomatch_mark; |
1236 |
if ((rrc = (*pcre_callout)(&cb)) > 0) MRRETURN(MATCH_NOMATCH); |
if ((rrc = (*pcre_callout)(&cb)) > 0) RRETURN(MATCH_NOMATCH); |
1237 |
if (rrc < 0) RRETURN(rrc); |
if (rrc < 0) RRETURN(rrc); |
1238 |
} |
} |
1239 |
ecode += PRIV(OP_lengths)[OP_CALLOUT]; |
ecode += PRIV(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 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(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 MRRETURN when the heap is in use. */ |
given as the argument to RRETURN 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 |
MRRETURN(rrc); |
RRETURN(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 */ |
|
markptr = md->mark; |
|
1531 |
break; |
break; |
1532 |
} |
} |
1533 |
|
|
1539 |
} |
} |
1540 |
while (*ecode == OP_ALT); |
while (*ecode == OP_ALT); |
1541 |
|
|
1542 |
if (*ecode == OP_KET) MRRETURN(MATCH_NOMATCH); |
if (*ecode == OP_KET) RRETURN(MATCH_NOMATCH); |
1543 |
|
|
1544 |
/* If checking an assertion for a condition, return MATCH_MATCH. */ |
/* If checking an assertion for a condition, return MATCH_MATCH. */ |
1545 |
|
|
1569 |
do |
do |
1570 |
{ |
{ |
1571 |
RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM5); |
RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM5); |
1572 |
if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) MRRETURN(MATCH_NOMATCH); |
if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) RRETURN(MATCH_NOMATCH); |
1573 |
if (rrc == MATCH_SKIP || rrc == MATCH_PRUNE || rrc == MATCH_COMMIT) |
if (rrc == MATCH_SKIP || rrc == MATCH_PRUNE || rrc == MATCH_COMMIT) |
1574 |
{ |
{ |
1575 |
do ecode += GET(ecode,1); while (*ecode == OP_ALT); |
do ecode += GET(ecode,1); while (*ecode == OP_ALT); |
1602 |
while (i-- > 0) |
while (i-- > 0) |
1603 |
{ |
{ |
1604 |
eptr--; |
eptr--; |
1605 |
if (eptr < md->start_subject) MRRETURN(MATCH_NOMATCH); |
if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH); |
1606 |
BACKCHAR(eptr); |
BACKCHAR(eptr); |
1607 |
} |
} |
1608 |
} |
} |
1613 |
|
|
1614 |
{ |
{ |
1615 |
eptr -= GET(ecode, 1); |
eptr -= GET(ecode, 1); |
1616 |
if (eptr < md->start_subject) MRRETURN(MATCH_NOMATCH); |
if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH); |
1617 |
} |
} |
1618 |
|
|
1619 |
/* Save the earliest consulted character, then skip to next op code */ |
/* Save the earliest consulted character, then skip to next op code */ |
1642 |
cb.capture_top = offset_top/2; |
cb.capture_top = offset_top/2; |
1643 |
cb.capture_last = md->capture_last; |
cb.capture_last = md->capture_last; |
1644 |
cb.callout_data = md->callout_data; |
cb.callout_data = md->callout_data; |
1645 |
cb.mark = (unsigned char *)markptr; |
cb.mark = md->nomatch_mark; |
1646 |
if ((rrc = (*pcre_callout)(&cb)) > 0) MRRETURN(MATCH_NOMATCH); |
if ((rrc = (*pcre_callout)(&cb)) > 0) RRETURN(MATCH_NOMATCH); |
1647 |
if (rrc < 0) RRETURN(rrc); |
if (rrc < 0) RRETURN(rrc); |
1648 |
} |
} |
1649 |
ecode += 2 + 2*LINK_SIZE; |
ecode += 2 + 2*LINK_SIZE; |
1757 |
md->recursive = new_recursive.prevrec; |
md->recursive = new_recursive.prevrec; |
1758 |
if (new_recursive.offset_save != stacksave) |
if (new_recursive.offset_save != stacksave) |
1759 |
(pcre_free)(new_recursive.offset_save); |
(pcre_free)(new_recursive.offset_save); |
1760 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
1761 |
} |
} |
1762 |
|
|
1763 |
RECURSION_MATCHED: |
RECURSION_MATCHED: |
1837 |
md->end_match_ptr = eptr; /* For ONCE_NC */ |
md->end_match_ptr = eptr; /* For ONCE_NC */ |
1838 |
md->end_offset_top = offset_top; |
md->end_offset_top = offset_top; |
1839 |
md->start_match_ptr = mstart; |
md->start_match_ptr = mstart; |
1840 |
MRRETURN(MATCH_MATCH); /* Sets md->mark */ |
RRETURN(MATCH_MATCH); /* Sets md->mark */ |
1841 |
} |
} |
1842 |
|
|
1843 |
/* 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 |
1979 |
/* Not multiline mode: start of subject assertion, unless notbol. */ |
/* Not multiline mode: start of subject assertion, unless notbol. */ |
1980 |
|
|
1981 |
case OP_CIRC: |
case OP_CIRC: |
1982 |
if (md->notbol && eptr == md->start_subject) MRRETURN(MATCH_NOMATCH); |
if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH); |
1983 |
|
|
1984 |
/* Start of subject assertion */ |
/* Start of subject assertion */ |
1985 |
|
|
1986 |
case OP_SOD: |
case OP_SOD: |
1987 |
if (eptr != md->start_subject) MRRETURN(MATCH_NOMATCH); |
if (eptr != md->start_subject) RRETURN(MATCH_NOMATCH); |
1988 |
ecode++; |
ecode++; |
1989 |
break; |
break; |
1990 |
|
|
1991 |
/* Multiline mode: start of subject unless notbol, or after any newline. */ |
/* Multiline mode: start of subject unless notbol, or after any newline. */ |
1992 |
|
|
1993 |
case OP_CIRCM: |
case OP_CIRCM: |
1994 |
if (md->notbol && eptr == md->start_subject) MRRETURN(MATCH_NOMATCH); |
if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH); |
1995 |
if (eptr != md->start_subject && |
if (eptr != md->start_subject && |
1996 |
(eptr == md->end_subject || !WAS_NEWLINE(eptr))) |
(eptr == md->end_subject || !WAS_NEWLINE(eptr))) |
1997 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
1998 |
ecode++; |
ecode++; |
1999 |
break; |
break; |
2000 |
|
|
2001 |
/* Start of match assertion */ |
/* Start of match assertion */ |
2002 |
|
|
2003 |
case OP_SOM: |
case OP_SOM: |
2004 |
if (eptr != md->start_subject + md->start_offset) MRRETURN(MATCH_NOMATCH); |
if (eptr != md->start_subject + md->start_offset) RRETURN(MATCH_NOMATCH); |
2005 |
ecode++; |
ecode++; |
2006 |
break; |
break; |
2007 |
|
|
2017 |
|
|
2018 |
case OP_DOLLM: |
case OP_DOLLM: |
2019 |
if (eptr < md->end_subject) |
if (eptr < md->end_subject) |
2020 |
{ if (!IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); } |
{ if (!IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); } |
2021 |
else |
else |
2022 |
{ |
{ |
2023 |
if (md->noteol) MRRETURN(MATCH_NOMATCH); |
if (md->noteol) RRETURN(MATCH_NOMATCH); |
2024 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2025 |
} |
} |
2026 |
ecode++; |
ecode++; |
2030 |
subject unless noteol is set. */ |
subject unless noteol is set. */ |
2031 |
|
|
2032 |
case OP_DOLL: |
case OP_DOLL: |
2033 |
if (md->noteol) MRRETURN(MATCH_NOMATCH); |
if (md->noteol) RRETURN(MATCH_NOMATCH); |
2034 |
if (!md->endonly) goto ASSERT_NL_OR_EOS; |
if (!md->endonly) goto ASSERT_NL_OR_EOS; |
2035 |
|
|
2036 |
/* ... else fall through for endonly */ |
/* ... else fall through for endonly */ |
2038 |
/* End of subject assertion (\z) */ |
/* End of subject assertion (\z) */ |
2039 |
|
|
2040 |
case OP_EOD: |
case OP_EOD: |
2041 |
if (eptr < md->end_subject) MRRETURN(MATCH_NOMATCH); |
if (eptr < md->end_subject) RRETURN(MATCH_NOMATCH); |
2042 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2043 |
ecode++; |
ecode++; |
2044 |
break; |
break; |
2049 |
ASSERT_NL_OR_EOS: |
ASSERT_NL_OR_EOS: |
2050 |
if (eptr < md->end_subject && |
if (eptr < md->end_subject && |
2051 |
(!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen)) |
(!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen)) |
2052 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2053 |
|
|
2054 |
/* Either at end of string or \n before end. */ |
/* Either at end of string or \n before end. */ |
2055 |
|
|
2171 |
|
|
2172 |
if ((*ecode++ == OP_WORD_BOUNDARY)? |
if ((*ecode++ == OP_WORD_BOUNDARY)? |
2173 |
cur_is_word == prev_is_word : cur_is_word != prev_is_word) |
cur_is_word == prev_is_word : cur_is_word != prev_is_word) |
2174 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2175 |
} |
} |
2176 |
break; |
break; |
2177 |
|
|
2178 |
/* Match a single character type; inline for speed */ |
/* Match a single character type; inline for speed */ |
2179 |
|
|
2180 |
case OP_ANY: |
case OP_ANY: |
2181 |
if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
2182 |
/* Fall through */ |
/* Fall through */ |
2183 |
|
|
2184 |
case OP_ALLANY: |
case OP_ALLANY: |
2185 |
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 */ |
2186 |
{ /* not be updated before SCHECK_PARTIAL. */ |
{ /* not be updated before SCHECK_PARTIAL. */ |
2187 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2188 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2189 |
} |
} |
2190 |
eptr++; |
eptr++; |
2191 |
#ifdef SUPPORT_UTF |
#ifdef SUPPORT_UTF |
2201 |
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 */ |
2202 |
{ /* not be updated before SCHECK_PARTIAL. */ |
{ /* not be updated before SCHECK_PARTIAL. */ |
2203 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2204 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2205 |
} |
} |
2206 |
eptr++; |
eptr++; |
2207 |
ecode++; |
ecode++; |
2211 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2212 |
{ |
{ |
2213 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2214 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2215 |
} |
} |
2216 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2217 |
if ( |
if ( |
2220 |
#endif |
#endif |
2221 |
(md->ctypes[c] & ctype_digit) != 0 |
(md->ctypes[c] & ctype_digit) != 0 |
2222 |
) |
) |
2223 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2224 |
ecode++; |
ecode++; |
2225 |
break; |
break; |
2226 |
|
|
2228 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2229 |
{ |
{ |
2230 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2231 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2232 |
} |
} |
2233 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2234 |
if ( |
if ( |
2237 |
#endif |
#endif |
2238 |
(md->ctypes[c] & ctype_digit) == 0 |
(md->ctypes[c] & ctype_digit) == 0 |
2239 |
) |
) |
2240 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2241 |
ecode++; |
ecode++; |
2242 |
break; |
break; |
2243 |
|
|
2245 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2246 |
{ |
{ |
2247 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2248 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2249 |
} |
} |
2250 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2251 |
if ( |
if ( |
2254 |
#endif |
#endif |
2255 |
(md->ctypes[c] & ctype_space) != 0 |
(md->ctypes[c] & ctype_space) != 0 |
2256 |
) |
) |
2257 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2258 |
ecode++; |
ecode++; |
2259 |
break; |
break; |
2260 |
|
|
2262 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2263 |
{ |
{ |
2264 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2265 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2266 |
} |
} |
2267 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2268 |
if ( |
if ( |
2271 |
#endif |
#endif |
2272 |
(md->ctypes[c] & ctype_space) == 0 |
(md->ctypes[c] & ctype_space) == 0 |
2273 |
) |
) |
2274 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2275 |
ecode++; |
ecode++; |
2276 |
break; |
break; |
2277 |
|
|
2279 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2280 |
{ |
{ |
2281 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2282 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2283 |
} |
} |
2284 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2285 |
if ( |
if ( |
2288 |
#endif |
#endif |
2289 |
(md->ctypes[c] & ctype_word) != 0 |
(md->ctypes[c] & ctype_word) != 0 |
2290 |
) |
) |
2291 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2292 |
ecode++; |
ecode++; |
2293 |
break; |
break; |
2294 |
|
|
2296 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2297 |
{ |
{ |
2298 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2299 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2300 |
} |
} |
2301 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2302 |
if ( |
if ( |
2305 |
#endif |
#endif |
2306 |
(md->ctypes[c] & ctype_word) == 0 |
(md->ctypes[c] & ctype_word) == 0 |
2307 |
) |
) |
2308 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2309 |
ecode++; |
ecode++; |
2310 |
break; |
break; |
2311 |
|
|
2313 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2314 |
{ |
{ |
2315 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2316 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2317 |
} |
} |
2318 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2319 |
switch(c) |
switch(c) |
2320 |
{ |
{ |
2321 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
2322 |
|
|
2323 |
case 0x000d: |
case 0x000d: |
2324 |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
2332 |
case 0x0085: |
case 0x0085: |
2333 |
case 0x2028: |
case 0x2028: |
2334 |
case 0x2029: |
case 0x2029: |
2335 |
if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); |
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); |
2336 |
break; |
break; |
2337 |
} |
} |
2338 |
ecode++; |
ecode++; |
2342 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2343 |
{ |
{ |
2344 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2345 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2346 |
} |
} |
2347 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2348 |
switch(c) |
switch(c) |
2367 |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
2368 |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
2369 |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
2370 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2371 |
} |
} |
2372 |
ecode++; |
ecode++; |
2373 |
break; |
break; |
2376 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2377 |
{ |
{ |
2378 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2379 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2380 |
} |
} |
2381 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2382 |
switch(c) |
switch(c) |
2383 |
{ |
{ |
2384 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
2385 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
2386 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
2387 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
2410 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2411 |
{ |
{ |
2412 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2413 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2414 |
} |
} |
2415 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2416 |
switch(c) |
switch(c) |
2423 |
case 0x85: /* NEL */ |
case 0x85: /* NEL */ |
2424 |
case 0x2028: /* LINE SEPARATOR */ |
case 0x2028: /* LINE SEPARATOR */ |
2425 |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
2426 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2427 |
} |
} |
2428 |
ecode++; |
ecode++; |
2429 |
break; |
break; |
2432 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2433 |
{ |
{ |
2434 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2435 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2436 |
} |
} |
2437 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2438 |
switch(c) |
switch(c) |
2439 |
{ |
{ |
2440 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
2441 |
case 0x0a: /* LF */ |
case 0x0a: /* LF */ |
2442 |
case 0x0b: /* VT */ |
case 0x0b: /* VT */ |
2443 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
2459 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2460 |
{ |
{ |
2461 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2462 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2463 |
} |
} |
2464 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2465 |
{ |
{ |
2468 |
switch(ecode[1]) |
switch(ecode[1]) |
2469 |
{ |
{ |
2470 |
case PT_ANY: |
case PT_ANY: |
2471 |
if (op == OP_NOTPROP) MRRETURN(MATCH_NOMATCH); |
if (op == OP_NOTPROP) RRETURN(MATCH_NOMATCH); |
2472 |
break; |
break; |
2473 |
|
|
2474 |
case PT_LAMP: |
case PT_LAMP: |
2475 |
if ((prop->chartype == ucp_Lu || |
if ((prop->chartype == ucp_Lu || |
2476 |
prop->chartype == ucp_Ll || |
prop->chartype == ucp_Ll || |
2477 |
prop->chartype == ucp_Lt) == (op == OP_NOTPROP)) |
prop->chartype == ucp_Lt) == (op == OP_NOTPROP)) |
2478 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2479 |
break; |
break; |
2480 |
|
|
2481 |
case PT_GC: |
case PT_GC: |
2482 |
if ((ecode[2] != PRIV(ucp_gentype)[prop->chartype]) == (op == OP_PROP)) |
if ((ecode[2] != PRIV(ucp_gentype)[prop->chartype]) == (op == OP_PROP)) |
2483 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2484 |
break; |
break; |
2485 |
|
|
2486 |
case PT_PC: |
case PT_PC: |
2487 |
if ((ecode[2] != prop->chartype) == (op == OP_PROP)) |
if ((ecode[2] != prop->chartype) == (op == OP_PROP)) |
2488 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2489 |
break; |
break; |
2490 |
|
|
2491 |
case PT_SC: |
case PT_SC: |
2492 |
if ((ecode[2] != prop->script) == (op == OP_PROP)) |
if ((ecode[2] != prop->script) == (op == OP_PROP)) |
2493 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2494 |
break; |
break; |
2495 |
|
|
2496 |
/* These are specials */ |
/* These are specials */ |
2498 |
case PT_ALNUM: |
case PT_ALNUM: |
2499 |
if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L || |
if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L || |
2500 |
PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (op == OP_NOTPROP)) |
PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (op == OP_NOTPROP)) |
2501 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2502 |
break; |
break; |
2503 |
|
|
2504 |
case PT_SPACE: /* Perl space */ |
case PT_SPACE: /* Perl space */ |
2505 |
if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z || |
if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z || |
2506 |
c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR) |
c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR) |
2507 |
== (op == OP_NOTPROP)) |
== (op == OP_NOTPROP)) |
2508 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2509 |
break; |
break; |
2510 |
|
|
2511 |
case PT_PXSPACE: /* POSIX space */ |
case PT_PXSPACE: /* POSIX space */ |
2513 |
c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || |
c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || |
2514 |
c == CHAR_FF || c == CHAR_CR) |
c == CHAR_FF || c == CHAR_CR) |
2515 |
== (op == OP_NOTPROP)) |
== (op == OP_NOTPROP)) |
2516 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2517 |
break; |
break; |
2518 |
|
|
2519 |
case PT_WORD: |
case PT_WORD: |
2520 |
if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L || |
if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L || |
2521 |
PRIV(ucp_gentype)[prop->chartype] == ucp_N || |
PRIV(ucp_gentype)[prop->chartype] == ucp_N || |
2522 |
c == CHAR_UNDERSCORE) == (op == OP_NOTPROP)) |
c == CHAR_UNDERSCORE) == (op == OP_NOTPROP)) |
2523 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2524 |
break; |
break; |
2525 |
|
|
2526 |
/* This should never occur */ |
/* This should never occur */ |
2540 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2541 |
{ |
{ |
2542 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2543 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2544 |
} |
} |
2545 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2546 |
if (UCD_CATEGORY(c) == ucp_M) MRRETURN(MATCH_NOMATCH); |
if (UCD_CATEGORY(c) == ucp_M) RRETURN(MATCH_NOMATCH); |
2547 |
while (eptr < md->end_subject) |
while (eptr < md->end_subject) |
2548 |
{ |
{ |
2549 |
int len = 1; |
int len = 1; |
2617 |
if ((length = match_ref(offset, eptr, length, md, caseless)) < 0) |
if ((length = match_ref(offset, eptr, length, md, caseless)) < 0) |
2618 |
{ |
{ |
2619 |
CHECK_PARTIAL(); |
CHECK_PARTIAL(); |
2620 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2621 |
} |
} |
2622 |
eptr += length; |
eptr += length; |
2623 |
continue; /* With the main loop */ |
continue; /* With the main loop */ |
2638 |
if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) |
if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) |
2639 |
{ |
{ |
2640 |
CHECK_PARTIAL(); |
CHECK_PARTIAL(); |
2641 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2642 |
} |
} |
2643 |
eptr += slength; |
eptr += slength; |
2644 |
} |
} |
2657 |
int slength; |
int slength; |
2658 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM14); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM14); |
2659 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
2660 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
2661 |
if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) |
if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) |
2662 |
{ |
{ |
2663 |
CHECK_PARTIAL(); |
CHECK_PARTIAL(); |
2664 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2665 |
} |
} |
2666 |
eptr += slength; |
eptr += slength; |
2667 |
} |
} |
2689 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
2690 |
eptr -= length; |
eptr -= length; |
2691 |
} |
} |
2692 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2693 |
} |
} |
2694 |
/* Control never gets here */ |
/* Control never gets here */ |
2695 |
|
|
2752 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2753 |
{ |
{ |
2754 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2755 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2756 |
} |
} |
2757 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
2758 |
if (c > 255) |
if (c > 255) |
2759 |
{ |
{ |
2760 |
if (op == OP_CLASS) MRRETURN(MATCH_NOMATCH); |
if (op == OP_CLASS) RRETURN(MATCH_NOMATCH); |
2761 |
} |
} |
2762 |
else |
else |
2763 |
if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); |
if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); |
2764 |
} |
} |
2765 |
} |
} |
2766 |
else |
else |
2772 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2773 |
{ |
{ |
2774 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2775 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2776 |
} |
} |
2777 |
c = *eptr++; |
c = *eptr++; |
2778 |
#ifndef COMPILE_PCRE8 |
#ifndef COMPILE_PCRE8 |
2779 |
if (c > 255) |
if (c > 255) |
2780 |
{ |
{ |
2781 |
if (op == OP_CLASS) MRRETURN(MATCH_NOMATCH); |
if (op == OP_CLASS) RRETURN(MATCH_NOMATCH); |
2782 |
} |
} |
2783 |
else |
else |
2784 |
#endif |
#endif |
2785 |
if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); |
if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); |
2786 |
} |
} |
2787 |
} |
} |
2788 |
|
|
2803 |
{ |
{ |
2804 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM16); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM16); |
2805 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
2806 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
2807 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2808 |
{ |
{ |
2809 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2810 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2811 |
} |
} |
2812 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
2813 |
if (c > 255) |
if (c > 255) |
2814 |
{ |
{ |
2815 |
if (op == OP_CLASS) MRRETURN(MATCH_NOMATCH); |
if (op == OP_CLASS) RRETURN(MATCH_NOMATCH); |
2816 |
} |
} |
2817 |
else |
else |
2818 |
if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); |
if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); |
2819 |
} |
} |
2820 |
} |
} |
2821 |
else |
else |
2826 |
{ |
{ |
2827 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM17); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM17); |
2828 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
2829 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
2830 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2831 |
{ |
{ |
2832 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2833 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2834 |
} |
} |
2835 |
c = *eptr++; |
c = *eptr++; |
2836 |
#ifndef COMPILE_PCRE8 |
#ifndef COMPILE_PCRE8 |
2837 |
if (c > 255) |
if (c > 255) |
2838 |
{ |
{ |
2839 |
if (op == OP_CLASS) MRRETURN(MATCH_NOMATCH); |
if (op == OP_CLASS) RRETURN(MATCH_NOMATCH); |
2840 |
} |
} |
2841 |
else |
else |
2842 |
#endif |
#endif |
2843 |
if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); |
if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); |
2844 |
} |
} |
2845 |
} |
} |
2846 |
/* Control never gets here */ |
/* Control never gets here */ |
2910 |
} |
} |
2911 |
} |
} |
2912 |
|
|
2913 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2914 |
} |
} |
2915 |
#undef BYTE_MAP |
#undef BYTE_MAP |
2916 |
} |
} |
2963 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2964 |
{ |
{ |
2965 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2966 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2967 |
} |
} |
2968 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2969 |
if (!PRIV(xclass)(c, data, utf)) MRRETURN(MATCH_NOMATCH); |
if (!PRIV(xclass)(c, data, utf)) RRETURN(MATCH_NOMATCH); |
2970 |
} |
} |
2971 |
|
|
2972 |
/* If max == min we can continue with the main loop without the |
/* If max == min we can continue with the main loop without the |
2983 |
{ |
{ |
2984 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM20); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM20); |
2985 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
2986 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
2987 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
2988 |
{ |
{ |
2989 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
2990 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
2991 |
} |
} |
2992 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
2993 |
if (!PRIV(xclass)(c, data, utf)) MRRETURN(MATCH_NOMATCH); |
if (!PRIV(xclass)(c, data, utf)) RRETURN(MATCH_NOMATCH); |
2994 |
} |
} |
2995 |
/* Control never gets here */ |
/* Control never gets here */ |
2996 |
} |
} |
3025 |
if (utf) BACKCHAR(eptr); |
if (utf) BACKCHAR(eptr); |
3026 |
#endif |
#endif |
3027 |
} |
} |
3028 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3029 |
} |
} |
3030 |
|
|
3031 |
/* Control never gets here */ |
/* Control never gets here */ |
3044 |
if (length > md->end_subject - eptr) |
if (length > md->end_subject - eptr) |
3045 |
{ |
{ |
3046 |
CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */ |
CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */ |
3047 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3048 |
} |
} |
3049 |
while (length-- > 0) if (*ecode++ != *eptr++) MRRETURN(MATCH_NOMATCH); |
while (length-- > 0) if (*ecode++ != *eptr++) RRETURN(MATCH_NOMATCH); |
3050 |
} |
} |
3051 |
else |
else |
3052 |
#endif |
#endif |
3055 |
if (md->end_subject - eptr < 1) |
if (md->end_subject - eptr < 1) |
3056 |
{ |
{ |
3057 |
SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */ |
SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */ |
3058 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3059 |
} |
} |
3060 |
if (ecode[1] != *eptr++) MRRETURN(MATCH_NOMATCH); |
if (ecode[1] != *eptr++) RRETURN(MATCH_NOMATCH); |
3061 |
ecode += 2; |
ecode += 2; |
3062 |
} |
} |
3063 |
break; |
break; |
3064 |
|
|
3065 |
/* Match a single character, caselessly */ |
/* Match a single character, caselessly. If we are at the end of the |
3066 |
|
subject, give up immediately. */ |
3067 |
|
|
3068 |
case OP_CHARI: |
case OP_CHARI: |
3069 |
|
if (eptr >= md->end_subject) |
3070 |
|
{ |
3071 |
|
SCHECK_PARTIAL(); |
3072 |
|
RRETURN(MATCH_NOMATCH); |
3073 |
|
} |
3074 |
|
|
3075 |
#ifdef SUPPORT_UTF |
#ifdef SUPPORT_UTF |
3076 |
if (utf) |
if (utf) |
3077 |
{ |
{ |
3079 |
ecode++; |
ecode++; |
3080 |
GETCHARLEN(fc, ecode, length); |
GETCHARLEN(fc, ecode, length); |
3081 |
|
|
|
if (length > md->end_subject - eptr) |
|
|
{ |
|
|
CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */ |
|
|
MRRETURN(MATCH_NOMATCH); |
|
|
} |
|
|
|
|
3082 |
/* 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 |
3083 |
can use the fast lookup table. */ |
we know that its other case must also be one byte long, so we can use the |
3084 |
|
fast lookup table. We know that there is at least one byte left in the |
3085 |
|
subject. */ |
3086 |
|
|
3087 |
if (fc < 128) |
if (fc < 128) |
3088 |
{ |
{ |
3089 |
if (md->lcc[fc] |
if (md->lcc[fc] |
3090 |
!= TABLE_GET(*eptr, md->lcc, *eptr)) MRRETURN(MATCH_NOMATCH); |
!= TABLE_GET(*eptr, md->lcc, *eptr)) RRETURN(MATCH_NOMATCH); |
3091 |
ecode++; |
ecode++; |
3092 |
eptr++; |
eptr++; |
3093 |
} |
} |
3094 |
|
|
3095 |
/* Otherwise we must pick up the subject character */ |
/* Otherwise we must pick up the subject character. Note that we cannot |
3096 |
|
use the value of "length" to check for sufficient bytes left, because the |
3097 |
|
other case of the character may have more or fewer bytes. */ |
3098 |
|
|
3099 |
else |
else |
3100 |
{ |
{ |
3110 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
3111 |
if (dc != UCD_OTHERCASE(fc)) |
if (dc != UCD_OTHERCASE(fc)) |
3112 |
#endif |
#endif |
3113 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3114 |
} |
} |
3115 |
} |
} |
3116 |
} |
} |
3119 |
|
|
3120 |
/* Not UTF mode */ |
/* Not UTF mode */ |
3121 |
{ |
{ |
|
if (md->end_subject - eptr < 1) |
|
|
{ |
|
|
SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */ |
|
|
MRRETURN(MATCH_NOMATCH); |
|
|
} |
|
3122 |
if (TABLE_GET(ecode[1], md->lcc, ecode[1]) |
if (TABLE_GET(ecode[1], md->lcc, ecode[1]) |
3123 |
!= TABLE_GET(*eptr, md->lcc, *eptr)) MRRETURN(MATCH_NOMATCH); |
!= TABLE_GET(*eptr, md->lcc, *eptr)) RRETURN(MATCH_NOMATCH); |
3124 |
eptr++; |
eptr++; |
3125 |
ecode += 2; |
ecode += 2; |
3126 |
} |
} |
3227 |
else |
else |
3228 |
{ |
{ |
3229 |
CHECK_PARTIAL(); |
CHECK_PARTIAL(); |
3230 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3231 |
} |
} |
3232 |
} |
} |
3233 |
|
|
3239 |
{ |
{ |
3240 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM22); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM22); |
3241 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
3242 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
3243 |
if (eptr <= md->end_subject - length && |
if (eptr <= md->end_subject - length && |
3244 |
memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length; |
memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length; |
3245 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
3250 |
else |
else |
3251 |
{ |
{ |
3252 |
CHECK_PARTIAL(); |
CHECK_PARTIAL(); |
3253 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3254 |
} |
} |
3255 |
} |
} |
3256 |
/* Control never gets here */ |
/* Control never gets here */ |
3281 |
{ |
{ |
3282 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM23); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM23); |
3283 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
3284 |
if (eptr == pp) { MRRETURN(MATCH_NOMATCH); } |
if (eptr == pp) { RRETURN(MATCH_NOMATCH); } |
3285 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
3286 |
eptr--; |
eptr--; |
3287 |
BACKCHAR(eptr); |
BACKCHAR(eptr); |
3338 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3339 |
{ |
{ |
3340 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3341 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3342 |
} |
} |
3343 |
if (fc != *eptr && foc != *eptr) MRRETURN(MATCH_NOMATCH); |
if (fc != *eptr && foc != *eptr) RRETURN(MATCH_NOMATCH); |
3344 |
eptr++; |
eptr++; |
3345 |
} |
} |
3346 |
if (min == max) continue; |
if (min == max) continue; |
3350 |
{ |
{ |
3351 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM24); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM24); |
3352 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
3353 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
3354 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3355 |
{ |
{ |
3356 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3357 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3358 |
} |
} |
3359 |
if (fc != *eptr && foc != *eptr) MRRETURN(MATCH_NOMATCH); |
if (fc != *eptr && foc != *eptr) RRETURN(MATCH_NOMATCH); |
3360 |
eptr++; |
eptr++; |
3361 |
} |
} |
3362 |
/* Control never gets here */ |
/* Control never gets here */ |
3383 |
eptr--; |
eptr--; |
3384 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
3385 |
} |
} |
3386 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3387 |
} |
} |
3388 |
/* Control never gets here */ |
/* Control never gets here */ |
3389 |
} |
} |
3397 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3398 |
{ |
{ |
3399 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3400 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3401 |
} |
} |
3402 |
if (fc != *eptr++) MRRETURN(MATCH_NOMATCH); |
if (fc != *eptr++) RRETURN(MATCH_NOMATCH); |
3403 |
} |
} |
3404 |
|
|
3405 |
if (min == max) continue; |
if (min == max) continue; |
3410 |
{ |
{ |
3411 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM26); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM26); |
3412 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
3413 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
3414 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3415 |
{ |
{ |
3416 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3417 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3418 |
} |
} |
3419 |
if (fc != *eptr++) MRRETURN(MATCH_NOMATCH); |
if (fc != *eptr++) RRETURN(MATCH_NOMATCH); |
3420 |
} |
} |
3421 |
/* Control never gets here */ |
/* Control never gets here */ |
3422 |
} |
} |
3441 |
eptr--; |
eptr--; |
3442 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
3443 |
} |
} |
3444 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3445 |
} |
} |
3446 |
} |
} |
3447 |
/* Control never gets here */ |
/* Control never gets here */ |
3454 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3455 |
{ |
{ |
3456 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3457 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3458 |
} |
} |
3459 |
ecode++; |
ecode++; |
3460 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
3478 |
#endif /* SUPPORT_UTF */ |
#endif /* SUPPORT_UTF */ |
3479 |
och = TABLE_GET(ch, md->fcc, ch); |
och = TABLE_GET(ch, md->fcc, ch); |
3480 |
#endif /* COMPILE_PCRE8 */ |
#endif /* COMPILE_PCRE8 */ |
3481 |
if (ch == c || och == c) MRRETURN(MATCH_NOMATCH); |
if (ch == c || och == c) RRETURN(MATCH_NOMATCH); |
3482 |
} |
} |
3483 |
else /* Caseful */ |
else /* Caseful */ |
3484 |
{ |
{ |
3485 |
if (*ecode++ == c) MRRETURN(MATCH_NOMATCH); |
if (*ecode++ == c) RRETURN(MATCH_NOMATCH); |
3486 |
} |
} |
3487 |
break; |
break; |
3488 |
|
|
3603 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3604 |
{ |
{ |
3605 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3606 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3607 |
} |
} |
3608 |
GETCHARINC(d, eptr); |
GETCHARINC(d, eptr); |
3609 |
if (fc == d || foc == d) MRRETURN(MATCH_NOMATCH); |
if (fc == d || foc == d) RRETURN(MATCH_NOMATCH); |
3610 |
} |
} |
3611 |
} |
} |
3612 |
else |
else |
3618 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3619 |
{ |
{ |
3620 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3621 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3622 |
} |
} |
3623 |
if (fc == *eptr || foc == *eptr) MRRETURN(MATCH_NOMATCH); |
if (fc == *eptr || foc == *eptr) RRETURN(MATCH_NOMATCH); |
3624 |
eptr++; |
eptr++; |
3625 |
} |
} |
3626 |
} |
} |
3637 |
{ |
{ |
3638 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM28); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM28); |
3639 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
3640 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
3641 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3642 |
{ |
{ |
3643 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3644 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3645 |
} |
} |
3646 |
GETCHARINC(d, eptr); |
GETCHARINC(d, eptr); |
3647 |
if (fc == d || foc == d) MRRETURN(MATCH_NOMATCH); |
if (fc == d || foc == d) RRETURN(MATCH_NOMATCH); |
3648 |
} |
} |
3649 |
} |
} |
3650 |
else |
else |
3655 |
{ |
{ |
3656 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM29); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM29); |
3657 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
3658 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
3659 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3660 |
{ |
{ |
3661 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3662 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3663 |
} |
} |
3664 |
if (fc == *eptr || foc == *eptr) MRRETURN(MATCH_NOMATCH); |
if (fc == *eptr || foc == *eptr) RRETURN(MATCH_NOMATCH); |
3665 |
eptr++; |
eptr++; |
3666 |
} |
} |
3667 |
} |
} |
3722 |
} |
} |
3723 |
} |
} |
3724 |
|
|
3725 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3726 |
} |
} |
3727 |
/* Control never gets here */ |
/* Control never gets here */ |
3728 |
} |
} |
3740 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3741 |
{ |
{ |
3742 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3743 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3744 |
} |
} |
3745 |
GETCHARINC(d, eptr); |
GETCHARINC(d, eptr); |
3746 |
if (fc == d) MRRETURN(MATCH_NOMATCH); |
if (fc == d) RRETURN(MATCH_NOMATCH); |
3747 |
} |
} |
3748 |
} |
} |
3749 |
else |
else |
3755 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3756 |
{ |
{ |
3757 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3758 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3759 |
} |
} |
3760 |
if (fc == *eptr++) MRRETURN(MATCH_NOMATCH); |
if (fc == *eptr++) RRETURN(MATCH_NOMATCH); |
3761 |
} |
} |
3762 |
} |
} |
3763 |
|
|
3773 |
{ |
{ |
3774 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM32); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM32); |
3775 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
3776 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
3777 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3778 |
{ |
{ |
3779 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3780 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3781 |
} |
} |
3782 |
GETCHARINC(d, eptr); |
GETCHARINC(d, eptr); |
3783 |
if (fc == d) MRRETURN(MATCH_NOMATCH); |
if (fc == d) RRETURN(MATCH_NOMATCH); |
3784 |
} |
} |
3785 |
} |
} |
3786 |
else |
else |
3791 |
{ |
{ |
3792 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM33); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM33); |
3793 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
3794 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
3795 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3796 |
{ |
{ |
3797 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3798 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3799 |
} |
} |
3800 |
if (fc == *eptr++) MRRETURN(MATCH_NOMATCH); |
if (fc == *eptr++) RRETURN(MATCH_NOMATCH); |
3801 |
} |
} |
3802 |
} |
} |
3803 |
/* Control never gets here */ |
/* Control never gets here */ |
3857 |
} |
} |
3858 |
} |
} |
3859 |
|
|
3860 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3861 |
} |
} |
3862 |
} |
} |
3863 |
/* Control never gets here */ |
/* Control never gets here */ |
3951 |
switch(prop_type) |
switch(prop_type) |
3952 |
{ |
{ |
3953 |
case PT_ANY: |
case PT_ANY: |
3954 |
if (prop_fail_result) MRRETURN(MATCH_NOMATCH); |
if (prop_fail_result) RRETURN(MATCH_NOMATCH); |
3955 |
for (i = 1; i <= min; i++) |
for (i = 1; i <= min; i++) |
3956 |
{ |
{ |
3957 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3958 |
{ |
{ |
3959 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3960 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3961 |
} |
} |
3962 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
3963 |
} |
} |
3970 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3971 |
{ |
{ |
3972 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3973 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3974 |
} |
} |
3975 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
3976 |
chartype = UCD_CHARTYPE(c); |
chartype = UCD_CHARTYPE(c); |
3977 |
if ((chartype == ucp_Lu || |
if ((chartype == ucp_Lu || |
3978 |
chartype == ucp_Ll || |
chartype == ucp_Ll || |
3979 |
chartype == ucp_Lt) == prop_fail_result) |
chartype == ucp_Lt) == prop_fail_result) |
3980 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3981 |
} |
} |
3982 |
break; |
break; |
3983 |
|
|
3987 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
3988 |
{ |
{ |
3989 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
3990 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3991 |
} |
} |
3992 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
3993 |
if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) |
if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) |
3994 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
3995 |
} |
} |
3996 |
break; |
break; |
3997 |
|
|
4001 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4002 |
{ |
{ |
4003 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4004 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4005 |
} |
} |
4006 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4007 |
if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) |
if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) |
4008 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4009 |
} |
} |
4010 |
break; |
break; |
4011 |
|
|
4015 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4016 |
{ |
{ |
4017 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4018 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4019 |
} |
} |
4020 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4021 |
if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) |
if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) |
4022 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4023 |
} |
} |
4024 |
break; |
break; |
4025 |
|
|
4030 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4031 |
{ |
{ |
4032 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4033 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4034 |
} |
} |
4035 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4036 |
category = UCD_CATEGORY(c); |
category = UCD_CATEGORY(c); |
4037 |
if ((category == ucp_L || category == ucp_N) == prop_fail_result) |
if ((category == ucp_L || category == ucp_N) == prop_fail_result) |
4038 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4039 |
} |
} |
4040 |
break; |
break; |
4041 |
|
|
4045 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4046 |
{ |
{ |
4047 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4048 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4049 |
} |
} |
4050 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4051 |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
4052 |
c == CHAR_FF || c == CHAR_CR) |
c == CHAR_FF || c == CHAR_CR) |
4053 |
== prop_fail_result) |
== prop_fail_result) |
4054 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4055 |
} |
} |
4056 |
break; |
break; |
4057 |
|
|
4061 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4062 |
{ |
{ |
4063 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4064 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4065 |
} |
} |
4066 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4067 |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
4068 |
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) |
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) |
4069 |
== prop_fail_result) |
== prop_fail_result) |
4070 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4071 |
} |
} |
4072 |
break; |
break; |
4073 |
|
|
4078 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4079 |
{ |
{ |
4080 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4081 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4082 |
} |
} |
4083 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4084 |
category = UCD_CATEGORY(c); |
category = UCD_CATEGORY(c); |
4085 |
if ((category == ucp_L || category == ucp_N || c == CHAR_UNDERSCORE) |
if ((category == ucp_L || category == ucp_N || c == CHAR_UNDERSCORE) |
4086 |
== prop_fail_result) |
== prop_fail_result) |
4087 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4088 |
} |
} |
4089 |
break; |
break; |
4090 |
|
|
4105 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4106 |
{ |
{ |
4107 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4108 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4109 |
} |
} |
4110 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4111 |
if (UCD_CATEGORY(c) == ucp_M) MRRETURN(MATCH_NOMATCH); |
if (UCD_CATEGORY(c) == ucp_M) RRETURN(MATCH_NOMATCH); |
4112 |
while (eptr < md->end_subject) |
while (eptr < md->end_subject) |
4113 |
{ |
{ |
4114 |
int len = 1; |
int len = 1; |
4133 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4134 |
{ |
{ |
4135 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4136 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4137 |
} |
} |
4138 |
if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
4139 |
eptr++; |
eptr++; |
4140 |
ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); |
ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); |
4141 |
} |
} |
4147 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4148 |
{ |
{ |
4149 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4150 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4151 |
} |
} |
4152 |
eptr++; |
eptr++; |
4153 |
ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); |
ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); |
4155 |
break; |
break; |
4156 |
|
|
4157 |
case OP_ANYBYTE: |
case OP_ANYBYTE: |
4158 |
if (eptr > md->end_subject - min) MRRETURN(MATCH_NOMATCH); |
if (eptr > md->end_subject - min) RRETURN(MATCH_NOMATCH); |
4159 |
eptr += min; |
eptr += min; |
4160 |
break; |
break; |
4161 |
|
|
4165 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4166 |
{ |
{ |
4167 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4168 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4169 |
} |
} |
4170 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
4171 |
switch(c) |
switch(c) |
4172 |
{ |
{ |
4173 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
4174 |
|
|
4175 |
case 0x000d: |
case 0x000d: |
4176 |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
4184 |
case 0x0085: |
case 0x0085: |
4185 |
case 0x2028: |
case 0x2028: |
4186 |
case 0x2029: |
case 0x2029: |
4187 |
if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); |
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); |
4188 |
break; |
break; |
4189 |
} |
} |
4190 |
} |
} |
4196 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4197 |
{ |
{ |
4198 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4199 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4200 |
} |
} |
4201 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
4202 |
switch(c) |
switch(c) |
4221 |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
4222 |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
4223 |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
4224 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4225 |
} |
} |
4226 |
} |
} |
4227 |
break; |
break; |
4232 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4233 |
{ |
{ |
4234 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4235 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4236 |
} |
} |
4237 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
4238 |
switch(c) |
switch(c) |
4239 |
{ |
{ |
4240 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
4241 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
4242 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
4243 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
4268 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4269 |
{ |
{ |
4270 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4271 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4272 |
} |
} |
4273 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
4274 |
switch(c) |
switch(c) |
4281 |
case 0x85: /* NEL */ |
case 0x85: /* NEL */ |
4282 |
case 0x2028: /* LINE SEPARATOR */ |
case 0x2028: /* LINE SEPARATOR */ |
4283 |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
4284 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4285 |
} |
} |
4286 |
} |
} |
4287 |
break; |
break; |
4292 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4293 |
{ |
{ |
4294 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4295 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4296 |
} |
} |
4297 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
4298 |
switch(c) |
switch(c) |
4299 |
{ |
{ |
4300 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
4301 |
case 0x0a: /* LF */ |
case 0x0a: /* LF */ |
4302 |
case 0x0b: /* VT */ |
case 0x0b: /* VT */ |
4303 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
4316 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4317 |
{ |
{ |
4318 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4319 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4320 |
} |
} |
4321 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
4322 |
if (c < 128 && (md->ctypes[c] & ctype_digit) != 0) |
if (c < 128 && (md->ctypes[c] & ctype_digit) != 0) |
4323 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4324 |
} |
} |
4325 |
break; |
break; |
4326 |
|
|
4330 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4331 |
{ |
{ |
4332 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4333 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4334 |
} |
} |
4335 |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_digit) == 0) |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_digit) == 0) |
4336 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4337 |
/* 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 */ |
4338 |
} |
} |
4339 |
break; |
break; |
4344 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4345 |
{ |
{ |
4346 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4347 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4348 |
} |
} |
4349 |
if (*eptr < 128 && (md->ctypes[*eptr] & ctype_space) != 0) |
if (*eptr < 128 && (md->ctypes[*eptr] & ctype_space) != 0) |
4350 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4351 |
eptr++; |
eptr++; |
4352 |
ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); |
ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); |
4353 |
} |
} |
4359 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4360 |
{ |
{ |
4361 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4362 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4363 |
} |
} |
4364 |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_space) == 0) |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_space) == 0) |
4365 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4366 |
/* 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 */ |
4367 |
} |
} |
4368 |
break; |
break; |
4373 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4374 |
{ |
{ |
4375 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4376 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4377 |
} |
} |
4378 |
if (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0) |
if (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0) |
4379 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4380 |
eptr++; |
eptr++; |
4381 |
ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); |
ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++); |
4382 |
} |
} |
4388 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4389 |
{ |
{ |
4390 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4391 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4392 |
} |
} |
4393 |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_word) == 0) |
if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_word) == 0) |
4394 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4395 |
/* 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 */ |
4396 |
} |
} |
4397 |
break; |
break; |
4414 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4415 |
{ |
{ |
4416 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4417 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4418 |
} |
} |
4419 |
if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); |
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); |
4420 |
eptr++; |
eptr++; |
4421 |
} |
} |
4422 |
break; |
break; |
4425 |
if (eptr > md->end_subject - min) |
if (eptr > md->end_subject - min) |
4426 |
{ |
{ |
4427 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4428 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4429 |
} |
} |
4430 |
eptr += min; |
eptr += min; |
4431 |
break; |
break; |
4434 |
if (eptr > md->end_subject - min) |
if (eptr > md->end_subject - min) |
4435 |
{ |
{ |
4436 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4437 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4438 |
} |
} |
4439 |
eptr += min; |
eptr += min; |
4440 |
break; |
break; |
4445 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4446 |
{ |
{ |
4447 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4448 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4449 |
} |
} |
4450 |
switch(*eptr++) |
switch(*eptr++) |
4451 |
{ |
{ |
4452 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
4453 |
|
|
4454 |
case 0x000d: |
case 0x000d: |
4455 |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
4461 |
case 0x000b: |
case 0x000b: |
4462 |
case 0x000c: |
case 0x000c: |
4463 |
case 0x0085: |
case 0x0085: |
4464 |
if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); |
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); |
4465 |
break; |
break; |
4466 |
} |
} |
4467 |
} |
} |
4473 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4474 |
{ |
{ |
4475 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4476 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4477 |
} |
} |
4478 |
switch(*eptr++) |
switch(*eptr++) |
4479 |
{ |
{ |
4481 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
4482 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
4483 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
4484 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4485 |
} |
} |
4486 |
} |
} |
4487 |
break; |
break; |
4492 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4493 |
{ |
{ |
4494 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4495 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4496 |
} |
} |
4497 |
switch(*eptr++) |
switch(*eptr++) |
4498 |
{ |
{ |
4499 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
4500 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
4501 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
4502 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
4511 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4512 |
{ |
{ |
4513 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4514 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4515 |
} |
} |
4516 |
switch(*eptr++) |
switch(*eptr++) |
4517 |
{ |
{ |
4521 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
4522 |
case 0x0d: /* CR */ |
case 0x0d: /* CR */ |
4523 |
case 0x85: /* NEL */ |
case 0x85: /* NEL */ |
4524 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4525 |
} |
} |
4526 |
} |
} |
4527 |
break; |
break; |
4532 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4533 |
{ |
{ |
4534 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4535 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4536 |
} |
} |
4537 |
switch(*eptr++) |
switch(*eptr++) |
4538 |
{ |
{ |
4539 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
4540 |
case 0x0a: /* LF */ |
case 0x0a: /* LF */ |
4541 |
case 0x0b: /* VT */ |
case 0x0b: /* VT */ |
4542 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
4553 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4554 |
{ |
{ |
4555 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4556 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4557 |
} |
} |
4558 |
if ((md->ctypes[*eptr++] & ctype_digit) != 0) MRRETURN(MATCH_NOMATCH); |
if ((md->ctypes[*eptr++] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH); |
4559 |
} |
} |
4560 |
break; |
break; |
4561 |
|
|
4565 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4566 |
{ |
{ |
4567 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4568 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4569 |
} |
} |
4570 |
if ((md->ctypes[*eptr++] & ctype_digit) == 0) MRRETURN(MATCH_NOMATCH); |
if ((md->ctypes[*eptr++] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH); |
4571 |
} |
} |
4572 |
break; |
break; |
4573 |
|
|
4577 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4578 |
{ |
{ |
4579 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4580 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4581 |
} |
} |
4582 |
if ((md->ctypes[*eptr++] & ctype_space) != 0) MRRETURN(MATCH_NOMATCH); |
if ((md->ctypes[*eptr++] & ctype_space) != 0) RRETURN(MATCH_NOMATCH); |
4583 |
} |
} |
4584 |
break; |
break; |
4585 |
|
|
4589 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4590 |
{ |
{ |
4591 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4592 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4593 |
} |
} |
4594 |
if ((md->ctypes[*eptr++] & ctype_space) == 0) MRRETURN(MATCH_NOMATCH); |
if ((md->ctypes[*eptr++] & ctype_space) == 0) RRETURN(MATCH_NOMATCH); |
4595 |
} |
} |
4596 |
break; |
break; |
4597 |
|
|
4601 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4602 |
{ |
{ |
4603 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4604 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4605 |
} |
} |
4606 |
if ((md->ctypes[*eptr++] & ctype_word) != 0) |
if ((md->ctypes[*eptr++] & ctype_word) != 0) |
4607 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4608 |
} |
} |
4609 |
break; |
break; |
4610 |
|
|
4614 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4615 |
{ |
{ |
4616 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4617 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4618 |
} |
} |
4619 |
if ((md->ctypes[*eptr++] & ctype_word) == 0) |
if ((md->ctypes[*eptr++] & ctype_word) == 0) |
4620 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4621 |
} |
} |
4622 |
break; |
break; |
4623 |
|
|
4646 |
{ |
{ |
4647 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM36); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM36); |
4648 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4649 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4650 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4651 |
{ |
{ |
4652 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4653 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4654 |
} |
} |
4655 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4656 |
if (prop_fail_result) MRRETURN(MATCH_NOMATCH); |
if (prop_fail_result) RRETURN(MATCH_NOMATCH); |
4657 |
} |
} |
4658 |
/* Control never gets here */ |
/* Control never gets here */ |
4659 |
|
|
4663 |
int chartype; |
int chartype; |
4664 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM37); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM37); |
4665 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4666 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4667 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4668 |
{ |
{ |
4669 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4670 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4671 |
} |
} |
4672 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4673 |
chartype = UCD_CHARTYPE(c); |
chartype = UCD_CHARTYPE(c); |
4674 |
if ((chartype == ucp_Lu || |
if ((chartype == ucp_Lu || |
4675 |
chartype == ucp_Ll || |
chartype == ucp_Ll || |
4676 |
chartype == ucp_Lt) == prop_fail_result) |
chartype == ucp_Lt) == prop_fail_result) |
4677 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4678 |
} |
} |
4679 |
/* Control never gets here */ |
/* Control never gets here */ |
4680 |
|
|
4683 |
{ |
{ |
4684 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM38); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM38); |
4685 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4686 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4687 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4688 |
{ |
{ |
4689 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4690 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4691 |
} |
} |
4692 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4693 |
if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) |
if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) |
4694 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4695 |
} |
} |
4696 |
/* Control never gets here */ |
/* Control never gets here */ |
4697 |
|
|
4700 |
{ |
{ |
4701 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM39); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM39); |
4702 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4703 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4704 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4705 |
{ |
{ |
4706 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4707 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4708 |
} |
} |
4709 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4710 |
if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) |
if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) |
4711 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4712 |
} |
} |
4713 |
/* Control never gets here */ |
/* Control never gets here */ |
4714 |
|
|
4717 |
{ |
{ |
4718 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM40); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM40); |
4719 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4720 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4721 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4722 |
{ |
{ |
4723 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4724 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4725 |
} |
} |
4726 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4727 |
if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) |
if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) |
4728 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4729 |
} |
} |
4730 |
/* Control never gets here */ |
/* Control never gets here */ |
4731 |
|
|
4735 |
int category; |
int category; |
4736 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM59); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM59); |
4737 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4738 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4739 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4740 |
{ |
{ |
4741 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4742 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4743 |
} |
} |
4744 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4745 |
category = UCD_CATEGORY(c); |
category = UCD_CATEGORY(c); |
4746 |
if ((category == ucp_L || category == ucp_N) == prop_fail_result) |
if ((category == ucp_L || category == ucp_N) == prop_fail_result) |
4747 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4748 |
} |
} |
4749 |
/* Control never gets here */ |
/* Control never gets here */ |
4750 |
|
|
4753 |
{ |
{ |
4754 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM60); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM60); |
4755 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4756 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4757 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4758 |
{ |
{ |
4759 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4760 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4761 |
} |
} |
4762 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4763 |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
4764 |
c == CHAR_FF || c == CHAR_CR) |
c == CHAR_FF || c == CHAR_CR) |
4765 |
== prop_fail_result) |
== prop_fail_result) |
4766 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4767 |
} |
} |
4768 |
/* Control never gets here */ |
/* Control never gets here */ |
4769 |
|
|
4772 |
{ |
{ |
4773 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM61); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM61); |
4774 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4775 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4776 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4777 |
{ |
{ |
4778 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4779 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4780 |
} |
} |
4781 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4782 |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL || |
4783 |
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) |
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) |
4784 |
== prop_fail_result) |
== prop_fail_result) |
4785 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4786 |
} |
} |
4787 |
/* Control never gets here */ |
/* Control never gets here */ |
4788 |
|
|
4792 |
int category; |
int category; |
4793 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM62); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM62); |
4794 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4795 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4796 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4797 |
{ |
{ |
4798 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4799 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4800 |
} |
} |
4801 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4802 |
category = UCD_CATEGORY(c); |
category = UCD_CATEGORY(c); |
4804 |
category == ucp_N || |
category == ucp_N || |
4805 |
c == CHAR_UNDERSCORE) |
c == CHAR_UNDERSCORE) |
4806 |
== prop_fail_result) |
== prop_fail_result) |
4807 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4808 |
} |
} |
4809 |
/* Control never gets here */ |
/* Control never gets here */ |
4810 |
|
|
4824 |
{ |
{ |
4825 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM41); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM41); |
4826 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4827 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4828 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4829 |
{ |
{ |
4830 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4831 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4832 |
} |
} |
4833 |
GETCHARINCTEST(c, eptr); |
GETCHARINCTEST(c, eptr); |
4834 |
if (UCD_CATEGORY(c) == ucp_M) MRRETURN(MATCH_NOMATCH); |
if (UCD_CATEGORY(c) == ucp_M) RRETURN(MATCH_NOMATCH); |
4835 |
while (eptr < md->end_subject) |
while (eptr < md->end_subject) |
4836 |
{ |
{ |
4837 |
int len = 1; |
int len = 1; |
4851 |
{ |
{ |
4852 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM42); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM42); |
4853 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
4854 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
4855 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
4856 |
{ |
{ |
4857 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
4858 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4859 |
} |
} |
4860 |
if (ctype == OP_ANY && IS_NEWLINE(eptr)) |
if (ctype == OP_ANY && IS_NEWLINE(eptr)) |
4861 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4862 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
4863 |
switch(ctype) |
switch(ctype) |
4864 |
{ |
{ |
4870 |
case OP_ANYNL: |
case OP_ANYNL: |
4871 |
switch(c) |
switch(c) |
4872 |
{ |
{ |
4873 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
4874 |
case 0x000d: |
case 0x000d: |
4875 |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
4876 |
break; |
break; |
4882 |
case 0x0085: |
case 0x0085: |
4883 |
case 0x2028: |
case 0x2028: |
4884 |
case 0x2029: |
case 0x2029: |
4885 |
if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); |
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); |
4886 |
break; |
break; |
4887 |
} |
} |
4888 |
break; |
break; |
4910 |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
case 0x202f: /* NARROW NO-BREAK SPACE */ |
4911 |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ |
4912 |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
case 0x3000: /* IDEOGRAPHIC SPACE */ |
4913 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4914 |
} |
} |
4915 |
break; |
break; |
4916 |
|
|
4917 |
case OP_HSPACE: |
case OP_HSPACE: |
4918 |
switch(c) |
switch(c) |
4919 |
{ |
{ |
4920 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
4921 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
4922 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
4923 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
4952 |
case 0x85: /* NEL */ |
case 0x85: /* NEL */ |
4953 |
case 0x2028: /* LINE SEPARATOR */ |
case 0x2028: /* LINE SEPARATOR */ |
4954 |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
case 0x2029: /* PARAGRAPH SEPARATOR */ |
4955 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4956 |
} |
} |
4957 |
break; |
break; |
4958 |
|
|
4959 |
case OP_VSPACE: |
case OP_VSPACE: |
4960 |
switch(c) |
switch(c) |
4961 |
{ |
{ |
4962 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
4963 |
case 0x0a: /* LF */ |
case 0x0a: /* LF */ |
4964 |
case 0x0b: /* VT */ |
case 0x0b: /* VT */ |
4965 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
4973 |
|
|
4974 |
case OP_NOT_DIGIT: |
case OP_NOT_DIGIT: |
4975 |
if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) |
if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) |
4976 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4977 |
break; |
break; |
4978 |
|
|
4979 |
case OP_DIGIT: |
case OP_DIGIT: |
4980 |
if (c >= 256 || (md->ctypes[c] & ctype_digit) == 0) |
if (c >= 256 || (md->ctypes[c] & ctype_digit) == 0) |
4981 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4982 |
break; |
break; |
4983 |
|
|
4984 |
case OP_NOT_WHITESPACE: |
case OP_NOT_WHITESPACE: |
4985 |
if (c < 256 && (md->ctypes[c] & ctype_space) != 0) |
if (c < 256 && (md->ctypes[c] & ctype_space) != 0) |
4986 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4987 |
break; |
break; |
4988 |
|
|
4989 |
case OP_WHITESPACE: |
case OP_WHITESPACE: |
4990 |
if (c >= 256 || (md->ctypes[c] & ctype_space) == 0) |
if (c >= 256 || (md->ctypes[c] & ctype_space) == 0) |
4991 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4992 |
break; |
break; |
4993 |
|
|
4994 |
case OP_NOT_WORDCHAR: |
case OP_NOT_WORDCHAR: |
4995 |
if (c < 256 && (md->ctypes[c] & ctype_word) != 0) |
if (c < 256 && (md->ctypes[c] & ctype_word) != 0) |
4996 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
4997 |
break; |
break; |
4998 |
|
|
4999 |
case OP_WORDCHAR: |
case OP_WORDCHAR: |
5000 |
if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) |
if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) |
5001 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
5002 |
break; |
break; |
5003 |
|
|
5004 |
default: |
default: |
5014 |
{ |
{ |
5015 |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM43); |
RMATCH(eptr, ecode, offset_top, md, eptrb, RM43); |
5016 |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
if (rrc != MATCH_NOMATCH) RRETURN(rrc); |
5017 |
if (fi >= max) MRRETURN(MATCH_NOMATCH); |
if (fi >= max) RRETURN(MATCH_NOMATCH); |
5018 |
if (eptr >= md->end_subject) |
if (eptr >= md->end_subject) |
5019 |
{ |
{ |
5020 |
SCHECK_PARTIAL(); |
SCHECK_PARTIAL(); |
5021 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
5022 |
} |
} |
5023 |
if (ctype == OP_ANY && IS_NEWLINE(eptr)) |
if (ctype == OP_ANY && IS_NEWLINE(eptr)) |
5024 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
5025 |
c = *eptr++; |
c = *eptr++; |
5026 |
switch(ctype) |
switch(ctype) |
5027 |
{ |
{ |
5033 |
case OP_ANYNL: |
case OP_ANYNL: |
5034 |
switch(c) |
switch(c) |
5035 |
{ |
{ |
5036 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
5037 |
case 0x000d: |
case 0x000d: |
5038 |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
if (eptr < md->end_subject && *eptr == 0x0a) eptr++; |
5039 |
break; |
break; |
5044 |
case 0x000b: |
case 0x000b: |
5045 |
case 0x000c: |
case 0x000c: |
5046 |
case 0x0085: |
case 0x0085: |
5047 |
if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); |
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); |
5048 |
break; |
break; |
5049 |
} |
} |
5050 |
break; |
break; |
5056 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
5057 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
5058 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
5059 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
5060 |
} |
} |
5061 |
break; |
break; |
5062 |
|
|
5063 |
case OP_HSPACE: |
case OP_HSPACE: |
5064 |
switch(c) |
switch(c) |
5065 |
{ |
{ |
5066 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
5067 |
case 0x09: /* HT */ |
case 0x09: /* HT */ |
5068 |
case 0x20: /* SPACE */ |
case 0x20: /* SPACE */ |
5069 |
case 0xa0: /* NBSP */ |
case 0xa0: /* NBSP */ |
5080 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
5081 |
case 0x0d: /* CR */ |
case 0x0d: /* CR */ |
5082 |
case 0x85: /* NEL */ |
case 0x85: /* NEL */ |
5083 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
5084 |
} |
} |
5085 |
break; |
break; |
5086 |
|
|
5087 |
case OP_VSPACE: |
case OP_VSPACE: |
5088 |
switch(c) |
switch(c) |
5089 |
{ |
{ |
5090 |
default: MRRETURN(MATCH_NOMATCH); |
default: RRETURN(MATCH_NOMATCH); |
5091 |
case 0x0a: /* LF */ |
case 0x0a: /* LF */ |
5092 |
case 0x0b: /* VT */ |
case 0x0b: /* VT */ |
5093 |
case 0x0c: /* FF */ |
case 0x0c: /* FF */ |
5098 |
break; |
break; |
5099 |
|
|
5100 |
case OP_NOT_DIGIT: |
case OP_NOT_DIGIT: |
5101 |
if ((md->ctypes[c] & ctype_digit) != 0) MRRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH); |
5102 |
break; |
break; |
5103 |
|
|
5104 |
case OP_DIGIT: |
case OP_DIGIT: |
5105 |
if ((md->ctypes[c] & ctype_digit) == 0) MRRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH); |
5106 |
break; |
break; |
5107 |
|
|
5108 |
case OP_NOT_WHITESPACE: |
case OP_NOT_WHITESPACE: |
5109 |
if ((md->ctypes[c] & ctype_space) != 0) MRRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH); |
5110 |
break; |
break; |
5111 |
|
|
5112 |
case OP_WHITESPACE: |
case OP_WHITESPACE: |
5113 |
if ((md->ctypes[c] & ctype_space) == 0) MRRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH); |
5114 |
break; |
break; |
5115 |
|
|
5116 |
case OP_NOT_WORDCHAR: |
case OP_NOT_WORDCHAR: |
5117 |
if ((md->ctypes[c] & ctype_word) != 0) MRRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH); |
5118 |
break; |
break; |
5119 |
|
|
5120 |
case OP_WORDCHAR: |
case OP_WORDCHAR: |
5121 |
if ((md->ctypes[c] & ctype_word) == 0) MRRETURN(MATCH_NOMATCH); |
if ((md->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH); |
5122 |
break; |
break; |
5123 |
|
|
5124 |
default: |
default: |
5857 |
|
|
5858 |
/* 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 */ |
5859 |
|
|
5860 |
MRRETURN(MATCH_NOMATCH); |
RRETURN(MATCH_NOMATCH); |
5861 |
} |
} |
5862 |
/* Control never gets here */ |
/* Control never gets here */ |
5863 |
|
|
6163 |
md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0; |
md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0; |
6164 |
md->use_ucp = (re->options & PCRE_UCP) != 0; |
md->use_ucp = (re->options & PCRE_UCP) != 0; |
6165 |
md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0; |
md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0; |
6166 |
|
md->ignore_skip_arg = FALSE; |
6167 |
|
|
6168 |
/* Some options are unpacked into BOOL variables in the hope that testing |
/* Some options are unpacked into BOOL variables in the hope that testing |
6169 |
them will be faster than individual option bits. */ |
them will be faster than individual option bits. */ |
6174 |
md->notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0; |
md->notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0; |
6175 |
|
|
6176 |
md->hitend = FALSE; |
md->hitend = FALSE; |
6177 |
md->mark = NULL; /* In case never set */ |
md->mark = md->nomatch_mark = NULL; /* In case never set */ |
6178 |
|
|
6179 |
md->recursive = NULL; /* No recursion at top level */ |
md->recursive = NULL; /* No recursion at top level */ |
6180 |
md->hasthen = (re->flags & PCRE_HASTHEN) != 0; |
md->hasthen = (re->flags & PCRE_HASTHEN) != 0; |
6545 |
md->match_call_count = 0; |
md->match_call_count = 0; |
6546 |
md->match_function_type = 0; |
md->match_function_type = 0; |
6547 |
md->end_offset_top = 0; |
md->end_offset_top = 0; |
6548 |
rc = match(start_match, md->start_code, start_match, NULL, 2, md, NULL, 0); |
rc = match(start_match, md->start_code, start_match, 2, md, NULL, 0); |
6549 |
if (md->hitend && start_partial == NULL) start_partial = md->start_used_ptr; |
if (md->hitend && start_partial == NULL) start_partial = md->start_used_ptr; |
6550 |
|
|
6551 |
switch(rc) |
switch(rc) |
6552 |
{ |
{ |
6553 |
|
/* If MATCH_SKIP_ARG reaches this level it means that a MARK that matched |
6554 |
|
the SKIP's arg was not found. In this circumstance, Perl ignores the SKIP |
6555 |
|
entirely. The only way we can do that is to re-do the match at the same |
6556 |
|
point, with a flag to force SKIP with an argument to be ignored. Just |
6557 |
|
treating this case as NOMATCH does not work because it does not check other |
6558 |
|
alternatives in patterns such as A(*SKIP:A)B|AC when the subject is AC. */ |
6559 |
|
|
6560 |
|
case MATCH_SKIP_ARG: |
6561 |
|
new_start_match = start_match; |
6562 |
|
md->ignore_skip_arg = TRUE; |
6563 |
|
break; |
6564 |
|
|
6565 |
/* 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 |
6566 |
same as the match we have just done, treat it as NOMATCH. */ |
same as the match we have just done, treat it as NOMATCH. */ |
6567 |
|
|
6573 |
} |
} |
6574 |
/* Fall through */ |
/* Fall through */ |
6575 |
|
|
|
/* If MATCH_SKIP_ARG reaches this level it means that a MARK that matched |
|
|
the SKIP's arg was not found. We also treat this as NOMATCH. */ |
|
|
|
|
|
case MATCH_SKIP_ARG: |
|
|
/* Fall through */ |
|
|
|
|
6576 |
/* NOMATCH and PRUNE advance by one character. THEN at this level acts |
/* NOMATCH and PRUNE advance by one character. THEN at this level acts |
6577 |
exactly like PRUNE. */ |
exactly like PRUNE. Unset the ignore SKIP-with-argument flag. */ |
6578 |
|
|
6579 |
case MATCH_NOMATCH: |
case MATCH_NOMATCH: |
6580 |
case MATCH_PRUNE: |
case MATCH_PRUNE: |
6581 |
case MATCH_THEN: |
case MATCH_THEN: |
6582 |
|
md->ignore_skip_arg = FALSE; |
6583 |
new_start_match = start_match + 1; |
new_start_match = start_match + 1; |
6584 |
#ifdef SUPPORT_UTF |
#ifdef SUPPORT_UTF |
6585 |
if (utf) |
if (utf) |
6708 |
offsets[1] = (int)(md->end_match_ptr - md->start_subject); |
offsets[1] = (int)(md->end_match_ptr - md->start_subject); |
6709 |
} |
} |
6710 |
|
|
6711 |
|
/* Return MARK data if requested */ |
6712 |
|
|
6713 |
|
if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0) |
6714 |
|
*(extra_data->mark) = (unsigned char *)(md->mark); |
6715 |
DPRINTF((">>>> returning %d\n", rc)); |
DPRINTF((">>>> returning %d\n", rc)); |
6716 |
goto RETURN_MARK; |
return rc; |
6717 |
} |
} |
6718 |
|
|
6719 |
/* 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 |
6757 |
|
|
6758 |
/* Return the MARK data if it has been requested. */ |
/* Return the MARK data if it has been requested. */ |
6759 |
|
|
|
RETURN_MARK: |
|
|
|
|
6760 |
if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0) |
if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0) |
6761 |
*(extra_data->mark) = (unsigned char *)(md->mark); |
*(extra_data->mark) = (unsigned char *)(md->nomatch_mark); |
6762 |
return rc; |
return rc; |
6763 |
} |
} |
6764 |
|
|