Lines Matching refs:mb
65 #define NLBLOCK mb /* Block containing newline information */
220 match_block *mb, pcre2_match_data *match_data, const char *s, ...) in display_frames() argument
240 i, Q->group_frame_type, Q->eptr - mb->start_subject, *(Q->ecode), in display_frames()
273 do_callout(heapframe *F, match_block *mb, PCRE2_SIZE *lengthptr) in do_callout() argument
283 if (mb->callout == NULL) return 0; /* No callout function provided */ in do_callout()
301 cb = mb->cb; in do_callout()
305 cb->mark = mb->nomatch_mark; in do_callout()
306 cb->current_position = (PCRE2_SIZE)(Feptr - mb->start_subject); in do_callout()
329 rc = mb->callout(cb, mb->callout_data); in do_callout()
361 match_ref(PCRE2_SIZE offset, BOOL caseless, heapframe *F, match_block *mb, in match_ref() argument
374 if ((mb->poptions & PCRE2_MATCH_UNSET_BACKREF) != 0) in match_ref()
385 p = mb->start_subject + Fovector[offset]; in match_ref()
391 BOOL utf = (mb->poptions & PCRE2_UTF) != 0; in match_ref()
393 if (utf || (mb->poptions & PCRE2_UCP) != 0) in match_ref()
410 if (eptr >= mb->end_subject) return 1; /* Partial match */ in match_ref()
443 if (eptr >= mb->end_subject) return 1; /* Partial match */ in match_ref()
446 if (TABLE_GET(cp, mb->lcc, cp) != TABLE_GET(cc, mb->lcc, cc)) in match_ref()
460 if (mb->partial != 0) in match_ref()
464 if (eptr >= mb->end_subject) return 1; /* Partial match */ in match_ref()
473 if ((PCRE2_SIZE)(mb->end_subject - eptr) < length) return 1; /* Partial */ in match_ref()
532 if (Feptr >= mb->end_subject) \
538 if (mb->partial != 0 && \
539 (Feptr > mb->start_used_ptr || mb->allowemptypartial)) \
541 mb->hitend = TRUE; \
542 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; \
595 PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb) in match() argument
633 BOOL utf = (mb->poptions & PCRE2_UTF) != 0; in match()
634 BOOL ucp = (mb->poptions & PCRE2_UCP) != 0; in match()
683 if (newsize / 1024 >= mb->heap_limit) in match()
686 if (mb->heap_limit <= old_size) in match()
690 PCRE2_SIZE max_delta = 1024 * (mb->heap_limit - old_size); in match()
782 if (mb->match_call_count++ >= mb->match_limit) return PCRE2_ERROR_MATCHLIMIT; in match()
783 if (Frdepth >= mb->match_limit_depth) return PCRE2_ERROR_DEPTHLIMIT; in match()
787 GF_IDMASK(Fgroup_frame_type), Feptr - mb->start_subject); in match()
793 fprintf(stderr, "++ %2ld op=%3d %s\n", Fecode - mb->start_code, *Fecode, in match()
824 Fovector[offset] = P->eptr - mb->start_subject; in match()
825 Fovector[offset+1] = Feptr - mb->start_subject; in match()
838 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; in match()
887 ((mb->moptions & PCRE2_NOTEMPTY) != 0 || in match()
888 ((mb->moptions & PCRE2_NOTEMPTY_ATSTART) != 0 && in match()
889 Fstart_match == mb->start_subject + mb->start_offset))) in match()
902 if (Feptr < mb->end_subject && in match()
903 ((mb->moptions | mb->poptions) & PCRE2_ENDANCHORED) != 0) in match()
926 mb->end_match_ptr = Feptr; /* Record where we ended */ in match()
927 mb->end_offset_top = Foffset_top; /* and how many extracts were taken */ in match()
928 mb->mark = Fmark; /* and the last success mark */ in match()
929 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; in match()
931 match_data->ovector[0] = Fstart_match - mb->start_subject; in match()
932 match_data->ovector[1] = Feptr - mb->start_subject; in match()
949 if (mb->partial != 0 && in match()
950 Feptr == mb->end_subject - 1 && in match()
955 mb->hitend = TRUE; in match()
956 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
963 if (Feptr >= mb->end_subject) /* DO NOT merge the Feptr++ here; it must */ in match()
970 if (utf) ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
982 if (Feptr >= mb->end_subject) /* DO NOT merge the Feptr++ here; it must */ in match()
1002 if (Flength > (PCRE2_SIZE)(mb->end_subject - Feptr)) in match()
1017 if (mb->end_subject - Feptr < 1) in match()
1035 if (Feptr >= mb->end_subject) in match()
1056 if (mb->lcc[fc] != TABLE_GET(cc, mb->lcc, cc)) RRETURN(MATCH_NOMATCH); in match()
1084 if (mb->lcc[fc] != TABLE_GET(cc, mb->lcc, cc)) RRETURN(MATCH_NOMATCH); in match()
1099 if (TABLE_GET(Fecode[1], mb->lcc, Fecode[1]) in match()
1100 != TABLE_GET(*Feptr, mb->lcc, *Feptr)) RRETURN(MATCH_NOMATCH); in match()
1112 if (Feptr >= mb->end_subject) in match()
1134 ch = (mb->fcc)[ch]; in match()
1157 ch = (mb->fcc)[ch]; in match()
1170 if (ch == fc || (Fop == OP_NOTI && TABLE_GET(ch, mb->fcc, ch) == fc)) in match()
1298 if (Feptr <= mb->end_subject - Flength && in match()
1301 Feptr <= mb->end_subject - Loclength && in match()
1320 if (Feptr <= mb->end_subject - Flength && in match()
1323 Feptr <= mb->end_subject - Loclength && in match()
1340 if (Feptr <= mb->end_subject - Flength && in match()
1344 Feptr <= mb->end_subject - Loclength && in match()
1393 Loc = mb->fcc[Lc]; in match()
1399 Loc = TABLE_GET(Lc, mb->fcc, Lc); in match()
1405 if (Feptr >= mb->end_subject) in match()
1424 if (Feptr >= mb->end_subject) in match()
1442 if (Feptr >= mb->end_subject) in match()
1467 if (Feptr >= mb->end_subject) in match()
1484 if (Feptr >= mb->end_subject) in match()
1498 if (Feptr >= mb->end_subject) in match()
1634 Loc = TABLE_GET(Lc, mb->fcc, Lc); /* Other case from table */ in match()
1642 if (Feptr >= mb->end_subject) in match()
1658 if (Feptr >= mb->end_subject) in match()
1681 if (Feptr >= mb->end_subject) in match()
1700 if (Feptr >= mb->end_subject) in match()
1725 if (Feptr >= mb->end_subject) in match()
1755 if (Feptr >= mb->end_subject) in match()
1784 if (Feptr >= mb->end_subject) in match()
1799 if (Feptr >= mb->end_subject) in match()
1821 if (Feptr >= mb->end_subject) in match()
1839 if (Feptr >= mb->end_subject) in match()
1863 if (Feptr >= mb->end_subject) in match()
1892 if (Feptr >= mb->end_subject) in match()
1981 if (Feptr >= mb->end_subject) in match()
2001 if (Feptr >= mb->end_subject) in match()
2035 if (Feptr >= mb->end_subject) in match()
2058 if (Feptr >= mb->end_subject) in match()
2089 if (Feptr >= mb->end_subject) in match()
2124 if (Feptr >= mb->end_subject) in match()
2216 if (Feptr >= mb->end_subject) in match()
2239 if (Feptr >= mb->end_subject) in match()
2258 if (Feptr >= mb->end_subject) in match()
2306 if (Feptr >= mb->end_subject) in match()
2312 if (CHMAX_255(fc) && (mb->ctypes[fc] & ctype_digit) != 0) in match()
2318 if (Feptr >= mb->end_subject) in match()
2324 if (!CHMAX_255(fc) || (mb->ctypes[fc] & ctype_digit) == 0) in match()
2330 if (Feptr >= mb->end_subject) in match()
2336 if (CHMAX_255(fc) && (mb->ctypes[fc] & ctype_space) != 0) in match()
2342 if (Feptr >= mb->end_subject) in match()
2348 if (!CHMAX_255(fc) || (mb->ctypes[fc] & ctype_space) == 0) in match()
2354 if (Feptr >= mb->end_subject) in match()
2360 if (CHMAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0) in match()
2366 if (Feptr >= mb->end_subject) in match()
2372 if (!CHMAX_255(fc) || (mb->ctypes[fc] & ctype_word) == 0) in match()
2378 if (Feptr >= mb->end_subject) in match()
2389 if (Feptr >= mb->end_subject) in match()
2406 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH); in match()
2413 if (Feptr >= mb->end_subject) in match()
2428 if (Feptr >= mb->end_subject) in match()
2443 if (Feptr >= mb->end_subject) in match()
2458 if (Feptr >= mb->end_subject) in match()
2481 if (Feptr >= mb->end_subject) in match()
2622 if (Feptr >= mb->end_subject) in match()
2630 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, mb->end_subject, utf, in match()
2735 if (Feptr >= mb->end_subject) in match()
2748 if (Feptr >= mb->end_subject) in match()
2765 if (Feptr >= mb->end_subject) in match()
2779 if (Feptr >= mb->end_subject) in match()
2793 if (Feptr >= mb->end_subject) in match()
2809 if (Feptr >= mb->end_subject) in match()
2827 if (Feptr >= mb->end_subject) in match()
2847 if (Feptr >= mb->end_subject) in match()
2872 if (Feptr >= mb->end_subject) in match()
2890 if (Feptr >= mb->end_subject) in match()
2923 if (Feptr >= mb->end_subject) in match()
2939 if (Feptr >= mb->end_subject) in match()
2955 if (Feptr >= mb->end_subject) in match()
2983 if (Feptr >= mb->end_subject) in match()
2991 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, in match()
2992 mb->end_subject, utf, NULL); in match()
3008 if (Feptr >= mb->end_subject) in match()
3014 if (mb->partial != 0 && in match()
3015 Feptr + 1 >= mb->end_subject && in match()
3020 mb->hitend = TRUE; in match()
3021 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
3024 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
3031 if (Feptr >= mb->end_subject) in match()
3037 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
3042 if (Feptr > mb->end_subject - Lmin) RRETURN(MATCH_NOMATCH); in match()
3049 if (Feptr >= mb->end_subject) in match()
3060 if (Feptr < mb->end_subject && UCHAR21(Feptr) == CHAR_LF) Feptr++; in match()
3073 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH); in match()
3082 if (Feptr >= mb->end_subject) in match()
3099 if (Feptr >= mb->end_subject) in match()
3116 if (Feptr >= mb->end_subject) in match()
3133 if (Feptr >= mb->end_subject) in match()
3150 if (Feptr >= mb->end_subject) in match()
3156 if (fc < 128 && (mb->ctypes[fc] & ctype_digit) != 0) in match()
3165 if (Feptr >= mb->end_subject) in match()
3171 if (cc >= 128 || (mb->ctypes[cc] & ctype_digit) == 0) in match()
3182 if (Feptr >= mb->end_subject) in match()
3188 if (cc < 128 && (mb->ctypes[cc] & ctype_space) != 0) in match()
3191 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
3199 if (Feptr >= mb->end_subject) in match()
3205 if (cc >= 128 || (mb->ctypes[cc] & ctype_space) == 0) in match()
3216 if (Feptr >= mb->end_subject) in match()
3222 if (cc < 128 && (mb->ctypes[cc] & ctype_word) != 0) in match()
3225 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
3233 if (Feptr >= mb->end_subject) in match()
3239 if (cc >= 128 || (mb->ctypes[cc] & ctype_word) == 0) in match()
3261 if (Feptr >= mb->end_subject) in match()
3267 if (mb->partial != 0 && in match()
3268 Feptr + 1 >= mb->end_subject && in match()
3273 mb->hitend = TRUE; in match()
3274 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
3281 if (Feptr > mb->end_subject - Lmin) in match()
3305 if (Feptr >= mb->end_subject) in match()
3315 if (Feptr < mb->end_subject && *Feptr == CHAR_LF) Feptr++; in match()
3328 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH); in match()
3337 if (Feptr >= mb->end_subject) in match()
3357 if (Feptr >= mb->end_subject) in match()
3377 if (Feptr >= mb->end_subject) in match()
3397 if (Feptr >= mb->end_subject) in match()
3417 if (Feptr >= mb->end_subject) in match()
3422 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_digit) != 0) in match()
3431 if (Feptr >= mb->end_subject) in match()
3436 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_digit) == 0) in match()
3445 if (Feptr >= mb->end_subject) in match()
3450 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_space) != 0) in match()
3459 if (Feptr >= mb->end_subject) in match()
3464 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_space) == 0) in match()
3473 if (Feptr >= mb->end_subject) in match()
3478 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_word) != 0) in match()
3487 if (Feptr >= mb->end_subject) in match()
3492 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_word) == 0) in match()
3525 if (Feptr >= mb->end_subject) in match()
3542 if (Feptr >= mb->end_subject) in match()
3562 if (Feptr >= mb->end_subject) in match()
3579 if (Feptr >= mb->end_subject) in match()
3596 if (Feptr >= mb->end_subject) in match()
3615 if (Feptr >= mb->end_subject) in match()
3636 if (Feptr >= mb->end_subject) in match()
3659 if (Feptr >= mb->end_subject) in match()
3687 if (Feptr >= mb->end_subject) in match()
3710 if (Feptr >= mb->end_subject) in match()
3746 if (Feptr >= mb->end_subject) in match()
3765 if (Feptr >= mb->end_subject) in match()
3784 if (Feptr >= mb->end_subject) in match()
3814 if (Feptr >= mb->end_subject) in match()
3822 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, mb->end_subject, in match()
3841 if (Feptr >= mb->end_subject) in match()
3851 if (mb->partial != 0 && /* Take care with CRLF partial */ in match()
3852 Feptr >= mb->end_subject && in match()
3857 mb->hitend = TRUE; in match()
3858 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
3872 if (Feptr < mb->end_subject && UCHAR21(Feptr) == CHAR_LF) Feptr++; in match()
3885 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) in match()
3924 if (fc < 256 && (mb->ctypes[fc] & ctype_digit) != 0) in match()
3929 if (fc >= 256 || (mb->ctypes[fc] & ctype_digit) == 0) in match()
3934 if (fc < 256 && (mb->ctypes[fc] & ctype_space) != 0) in match()
3939 if (fc >= 256 || (mb->ctypes[fc] & ctype_space) == 0) in match()
3944 if (fc < 256 && (mb->ctypes[fc] & ctype_word) != 0) in match()
3949 if (fc >= 256 || (mb->ctypes[fc] & ctype_word) == 0) in match()
3968 if (Feptr >= mb->end_subject) in match()
3979 if (mb->partial != 0 && /* Take care with CRLF partial */ in match()
3980 Feptr >= mb->end_subject && in match()
3985 mb->hitend = TRUE; in match()
3986 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
4000 if (Feptr < mb->end_subject && *Feptr == CHAR_LF) Feptr++; in match()
4013 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) in match()
4068 if (MAX_255(fc) && (mb->ctypes[fc] & ctype_digit) != 0) in match()
4073 if (!MAX_255(fc) || (mb->ctypes[fc] & ctype_digit) == 0) in match()
4078 if (MAX_255(fc) && (mb->ctypes[fc] & ctype_space) != 0) in match()
4083 if (!MAX_255(fc) || (mb->ctypes[fc] & ctype_space) == 0) in match()
4088 if (MAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0) in match()
4093 if (!MAX_255(fc) || (mb->ctypes[fc] & ctype_word) == 0) in match()
4124 if (Feptr >= mb->end_subject) in match()
4140 if (Feptr >= mb->end_subject) in match()
4159 if (Feptr >= mb->end_subject) in match()
4174 if (Feptr >= mb->end_subject) in match()
4189 if (Feptr >= mb->end_subject) in match()
4206 if (Feptr >= mb->end_subject) in match()
4225 if (Feptr >= mb->end_subject) in match()
4247 if (Feptr >= mb->end_subject) in match()
4275 if (Feptr >= mb->end_subject) in match()
4297 if (Feptr >= mb->end_subject) in match()
4330 if (Feptr >= mb->end_subject) in match()
4348 if (Feptr >= mb->end_subject) in match()
4365 if (Feptr >= mb->end_subject) in match()
4408 if (Feptr >= mb->end_subject) in match()
4416 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, mb->end_subject, in match()
4480 if (Feptr >= mb->end_subject) in match()
4486 if (mb->partial != 0 && /* Take care with CRLF partial */ in match()
4487 Feptr + 1 >= mb->end_subject && in match()
4492 mb->hitend = TRUE; in match()
4493 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
4496 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
4505 if (Feptr >= mb->end_subject) in match()
4511 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
4516 Feptr = mb->end_subject; /* Unlimited UTF-8 repeat */ in match()
4525 if (fc > (uint32_t)(mb->end_subject - Feptr)) in match()
4527 Feptr = mb->end_subject; in match()
4537 if (Feptr >= mb->end_subject) in match()
4545 if (++Feptr >= mb->end_subject) break; in match()
4551 (mb->bsr_convention == PCRE2_BSR_ANYCRLF || in match()
4569 if (Feptr >= mb->end_subject) in match()
4591 if (Feptr >= mb->end_subject) in match()
4611 if (Feptr >= mb->end_subject) in match()
4617 if (fc < 256 && (mb->ctypes[fc] & ctype_digit) != 0) break; in match()
4626 if (Feptr >= mb->end_subject) in match()
4632 if (fc >= 256 ||(mb->ctypes[fc] & ctype_digit) == 0) break; in match()
4641 if (Feptr >= mb->end_subject) in match()
4647 if (fc < 256 && (mb->ctypes[fc] & ctype_space) != 0) break; in match()
4656 if (Feptr >= mb->end_subject) in match()
4662 if (fc >= 256 ||(mb->ctypes[fc] & ctype_space) == 0) break; in match()
4671 if (Feptr >= mb->end_subject) in match()
4677 if (fc < 256 && (mb->ctypes[fc] & ctype_word) != 0) break; in match()
4686 if (Feptr >= mb->end_subject) in match()
4692 if (fc >= 256 || (mb->ctypes[fc] & ctype_word) == 0) break; in match()
4729 if (Feptr >= mb->end_subject) in match()
4735 if (mb->partial != 0 && /* Take care with CRLF partial */ in match()
4736 Feptr + 1 >= mb->end_subject && in match()
4741 mb->hitend = TRUE; in match()
4742 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
4751 if (fc > (uint32_t)(mb->end_subject - Feptr)) in match()
4753 Feptr = mb->end_subject; in match()
4762 if (Feptr >= mb->end_subject) in match()
4770 if (++Feptr >= mb->end_subject) break; in match()
4775 if (fc != CHAR_LF && (mb->bsr_convention == PCRE2_BSR_ANYCRLF || in match()
4789 if (Feptr >= mb->end_subject) in match()
4810 if (Feptr >= mb->end_subject) in match()
4831 if (Feptr >= mb->end_subject) in match()
4852 if (Feptr >= mb->end_subject) in match()
4873 if (Feptr >= mb->end_subject) in match()
4878 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_digit) != 0) in match()
4887 if (Feptr >= mb->end_subject) in match()
4892 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_digit) == 0) in match()
4901 if (Feptr >= mb->end_subject) in match()
4906 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_space) != 0) in match()
4915 if (Feptr >= mb->end_subject) in match()
4920 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_space) == 0) in match()
4929 if (Feptr >= mb->end_subject) in match()
4934 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_word) != 0) in match()
4943 if (Feptr >= mb->end_subject) in match()
4948 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_word) == 0) in match()
4999 PCRE2_SPTR slot = mb->name_table + GET2(Fecode, 1) * mb->name_entry_size; in match()
5006 slot += mb->name_entry_size; in match()
5047 rrc = match_ref(Loffset, Lcaseless, F, mb, &length); in match()
5050 if (rrc > 0) Feptr = mb->end_subject; /* Partial match */ in match()
5072 if (Lmin == 0 || (mb->poptions & PCRE2_MATCH_UNSET_BACKREF) != 0) in match()
5081 rrc = match_ref(Loffset, Lcaseless, F, mb, &slength); in match()
5084 if (rrc > 0) Feptr = mb->end_subject; /* Partial match */ in match()
5105 rrc = match_ref(Loffset, Lcaseless, F, mb, &slength); in match()
5108 if (rrc > 0) Feptr = mb->end_subject; /* Partial match */ in match()
5129 rrc = match_ref(Loffset, Lcaseless, F, mb, &slength); in match()
5135 if (rrc > 0 && mb->partial != 0 && in match()
5136 mb->end_subject > mb->start_used_ptr) in match()
5138 mb->hitend = TRUE; in match()
5139 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
5180 (void)match_ref(Loffset, Lcaseless, F, mb, &slength); in match()
5310 if (mb->verb_ecode_ptr < next_ecode && in match()
5350 if (mb->hasthen || Frdepth == 0) in match()
5404 if (mb->verb_ecode_ptr < next_ecode && in match()
5428 bracode = mb->start_code + GET(Fecode, 1); in match()
5429 number = (bracode == mb->start_code)? 0 : GET2(bracode, 1 + LINK_SIZE); in match()
5447 if (Feptr == P->eptr && mb->last_used_ptr == P->recurse_last_used && in match()
5448 (mb->moptions & PCRE2_DISABLE_RECURSELOOP_CHECK) == 0) in match()
5459 F->recurse_last_used = mb->last_used_ptr; in match()
5482 mb->verb_current_recurse == (Lframe_type ^ GF_RECURSE)) in match()
5484 if (rrc == MATCH_THEN && mb->verb_ecode_ptr < next_ecode && in match()
5596 rrc = do_callout(F, mb, &length); in match()
5629 rrc = do_callout(F, mb, &length); in match()
5657 PCRE2_SPTR slot = mb->name_table + GET2(Fecode, 1) * mb->name_entry_size; in match()
5663 slot += mb->name_entry_size; in match()
5676 PCRE2_SPTR slot = mb->name_table + GET2(Fecode, 1) * mb->name_entry_size; in match()
5682 slot += mb->name_entry_size; in match()
5800 if (Feptr <= mb->check_subject) RRETURN(MATCH_NOMATCH); in match()
5811 if ((ptrdiff_t)number > Feptr - mb->start_subject) RRETURN(MATCH_NOMATCH); in match()
5817 if (Feptr < mb->start_used_ptr) mb->start_used_ptr = Feptr; in match()
5848 if (Feptr == mb->start_subject) in match()
5864 ptrdiff_t diff = Feptr - mb->start_subject; in match()
5881 if (utf) { FORWARDCHARTEST(Feptr, mb->end_subject); } in match()
5931 (char *)P->eptr - (char *)mb->start_subject); in match()
6000 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; in match()
6014 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; in match()
6081 Fovector[offset] = P->eptr - mb->start_subject; in match()
6082 Fovector[offset+1] = Feptr - mb->start_subject; in match()
6134 if (Feptr != mb->start_subject || (mb->moptions & PCRE2_NOTBOL) != 0) in match()
6140 if (Feptr != mb->start_subject) RRETURN(MATCH_NOMATCH); in match()
6148 if ((mb->moptions & PCRE2_NOTEOL) != 0) RRETURN(MATCH_NOMATCH); in match()
6149 if ((mb->poptions & PCRE2_DOLLAR_ENDONLY) == 0) goto ASSERT_NL_OR_EOS; in match()
6155 if (Feptr < mb->true_end_subject) RRETURN(MATCH_NOMATCH); in match()
6156 if (mb->partial != 0) in match()
6158 mb->hitend = TRUE; in match()
6159 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
6168 if (Feptr < mb->end_subject && in match()
6169 (!IS_NEWLINE(Feptr) || Feptr != mb->end_subject - mb->nllen)) in match()
6171 if (mb->partial != 0 && in match()
6172 Feptr + 1 >= mb->end_subject && in match()
6177 mb->hitend = TRUE; in match()
6178 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
6185 if (mb->partial != 0) in match()
6187 mb->hitend = TRUE; in match()
6188 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
6201 if ((mb->moptions & PCRE2_NOTBOL) != 0 && Feptr == mb->start_subject) in match()
6203 if (Feptr != mb->start_subject && in match()
6204 ((Feptr == mb->end_subject && in match()
6205 (mb->poptions & PCRE2_ALT_CIRCUMFLEX) == 0) || in match()
6215 if (Feptr < mb->end_subject) in match()
6219 if (mb->partial != 0 && in match()
6220 Feptr + 1 >= mb->end_subject && in match()
6225 mb->hitend = TRUE; in match()
6226 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
6233 if ((mb->moptions & PCRE2_NOTEOL) != 0) RRETURN(MATCH_NOMATCH); in match()
6244 if (Feptr != mb->start_subject + mb->start_offset) RRETURN(MATCH_NOMATCH); in match()
6269 if (Feptr == mb->check_subject) prev_is_word = FALSE; else in match()
6281 if (lastptr < mb->start_used_ptr) mb->start_used_ptr = lastptr; in match()
6292 prev_is_word = CHMAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0; in match()
6297 if (Feptr >= mb->end_subject) in match()
6308 FORWARDCHARTEST(nextptr, mb->end_subject); in match()
6314 if (nextptr > mb->last_used_ptr) mb->last_used_ptr = nextptr; in match()
6325 cur_is_word = CHMAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0; in match()
6341 Fmark = mb->nomatch_mark = Fecode + 2; in match()
6352 PRIV(strcmp)(Fecode + 2, mb->verb_skip_ptr) == 0) in match()
6354 mb->verb_skip_ptr = Feptr; /* Pass back current position */ in match()
6369 mb->verb_current_recurse = Fcurrent_recurse; in match()
6373 Fmark = mb->nomatch_mark = Fecode + 2; in match()
6376 mb->verb_current_recurse = Fcurrent_recurse; in match()
6382 mb->verb_current_recurse = Fcurrent_recurse; in match()
6386 Fmark = mb->nomatch_mark = Fecode + 2; in match()
6389 mb->verb_current_recurse = Fcurrent_recurse; in match()
6395 mb->verb_skip_ptr = Feptr; /* Pass back current position */ in match()
6396 mb->verb_current_recurse = Fcurrent_recurse; in match()
6408 mb->skip_arg_count++; in match()
6409 if (mb->skip_arg_count <= mb->ignore_skip_arg) in match()
6422 mb->verb_skip_ptr = Fecode + 2; in match()
6423 mb->verb_current_recurse = Fcurrent_recurse; in match()
6432 mb->verb_ecode_ptr = Fecode; in match()
6433 mb->verb_current_recurse = Fcurrent_recurse; in match()
6437 Fmark = mb->nomatch_mark = Fecode + 2; in match()
6440 mb->verb_ecode_ptr = Fecode; in match()
6441 mb->verb_current_recurse = Fcurrent_recurse; in match()
6470 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; in match()
6473 mb->cb->callout_flags |= PCRE2_CALLOUT_BACKTRACK; /* Note for callouts */ in match()
6589 match_block *mb = &actual_match_block; in pcre2_match() local
6658 mb->partial = ((options & PCRE2_PARTIAL_HARD) != 0)? 2 : in pcre2_match()
6664 if (mb->partial != 0 && in pcre2_match()
6795 mb->check_subject = subject; in pcre2_match()
6851 mb->check_subject = start_match; in pcre2_match()
6861 for (i = re->max_lookbehind; i > 0 && mb->check_subject > subject; i--) in pcre2_match()
6863 mb->check_subject--; in pcre2_match()
6864 while (mb->check_subject > subject && in pcre2_match()
6866 (*mb->check_subject & 0xc0) == 0x80) in pcre2_match()
6868 (*mb->check_subject & 0xfc00) == 0xdc00) in pcre2_match()
6870 mb->check_subject--; in pcre2_match()
6880 mb->check_subject -= re->max_lookbehind; in pcre2_match()
6882 mb->check_subject = subject; in pcre2_match()
6891 match_data->rc = PRIV(valid_utf)(mb->check_subject, in pcre2_match()
6892 length - (mb->check_subject - subject), &(match_data->startchar)); in pcre2_match()
6901 match_data->startchar += mb->check_subject - subject; in pcre2_match()
6912 mb->check_subject = end_subject + 1; in pcre2_match()
6914 while (mb->check_subject < start_match && NOT_FIRSTCU(*mb->check_subject)) in pcre2_match()
6915 mb->check_subject++; in pcre2_match()
6937 mb->memctl = re->memctl; in pcre2_match()
6939 else mb->memctl = mcontext->memctl; in pcre2_match()
6950 mb->cb = &cb; in pcre2_match()
6959 mb->callout = mcontext->callout; in pcre2_match()
6960 mb->callout_data = mcontext->callout_data; in pcre2_match()
6962 mb->start_subject = subject; in pcre2_match()
6963 mb->start_offset = start_offset; in pcre2_match()
6964 mb->end_subject = end_subject; in pcre2_match()
6965 mb->true_end_subject = true_end_subject; in pcre2_match()
6966 mb->hasthen = (re->flags & PCRE2_HASTHEN) != 0; in pcre2_match()
6967 mb->allowemptypartial = (re->max_lookbehind > 0) || in pcre2_match()
6969 mb->poptions = re->overall_options; /* Pattern options */ in pcre2_match()
6970 mb->ignore_skip_arg = 0; in pcre2_match()
6971 mb->mark = mb->nomatch_mark = NULL; /* In case never set */ in pcre2_match()
6976 mb->name_table = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)); in pcre2_match()
6977 mb->name_count = re->name_count; in pcre2_match()
6978 mb->name_entry_size = re->name_entry_size; in pcre2_match()
6979 mb->start_code = mb->name_table + re->name_count * re->name_entry_size; in pcre2_match()
6983 mb->bsr_convention = re->bsr_convention; in pcre2_match()
6984 mb->nltype = NLTYPE_FIXED; in pcre2_match()
6988 mb->nllen = 1; in pcre2_match()
6989 mb->nl[0] = CHAR_CR; in pcre2_match()
6993 mb->nllen = 1; in pcre2_match()
6994 mb->nl[0] = CHAR_NL; in pcre2_match()
6998 mb->nllen = 1; in pcre2_match()
6999 mb->nl[0] = CHAR_NUL; in pcre2_match()
7003 mb->nllen = 2; in pcre2_match()
7004 mb->nl[0] = CHAR_CR; in pcre2_match()
7005 mb->nl[1] = CHAR_NL; in pcre2_match()
7009 mb->nltype = NLTYPE_ANY; in pcre2_match()
7013 mb->nltype = NLTYPE_ANYCRLF; in pcre2_match()
7039 mb->heap_limit = ((mcontext->heap_limit < re->limit_heap)? in pcre2_match()
7042 mb->match_limit = (mcontext->match_limit < re->limit_match)? in pcre2_match()
7045 mb->match_limit_depth = (mcontext->depth_limit < re->limit_depth)? in pcre2_match()
7055 if (heapframes_size / 1024 > mb->heap_limit) in pcre2_match()
7057 PCRE2_SIZE max_size = 1024 * mb->heap_limit; in pcre2_match()
7087 mb->lcc = re->tables + lcc_offset; in pcre2_match()
7088 mb->fcc = re->tables + fcc_offset; in pcre2_match()
7089 mb->ctypes = re->tables + ctypes_offset; in pcre2_match()
7100 first_cu2 = TABLE_GET(first_cu, mb->fcc, first_cu); in pcre2_match()
7122 req_cu2 = TABLE_GET(req_cu, mb->fcc, req_cu); in pcre2_match()
7144 mb->hitend = FALSE; in pcre2_match()
7311 if (mb->partial == 0 && start_match >= mb->end_subject) in pcre2_match()
7323 if (start_match > mb->start_subject + start_offset) in pcre2_match()
7344 (mb->nltype == NLTYPE_ANY || mb->nltype == NLTYPE_ANYCRLF) && in pcre2_match()
7370 if (mb->partial == 0 && start_match >= mb->end_subject) in pcre2_match()
7380 end_subject = mb->end_subject; in pcre2_match()
7384 if (mb->partial == 0) in pcre2_match()
7499 mb->start_used_ptr = start_match; in pcre2_match()
7500 mb->last_used_ptr = start_match; in pcre2_match()
7502 mb->moptions = options | fragment_options; in pcre2_match()
7504 mb->moptions = options; in pcre2_match()
7506 mb->match_call_count = 0; in pcre2_match()
7507 mb->end_offset_top = 0; in pcre2_match()
7508 mb->skip_arg_count = 0; in pcre2_match()
7514 rc = match(start_match, mb->start_code, re->top_bracket, frame_size, in pcre2_match()
7515 match_data, mb); in pcre2_match()
7521 if (mb->hitend && start_partial == NULL) in pcre2_match()
7523 start_partial = mb->start_used_ptr; in pcre2_match()
7538 mb->ignore_skip_arg = mb->skip_arg_count; in pcre2_match()
7545 if (mb->verb_skip_ptr > start_match) in pcre2_match()
7547 new_start_match = mb->verb_skip_ptr; in pcre2_match()
7558 mb->ignore_skip_arg = 0; in pcre2_match()
7611 (mb->nltype == NLTYPE_ANY || in pcre2_match()
7612 mb->nltype == NLTYPE_ANYCRLF || in pcre2_match()
7613 mb->nllen == 2)) in pcre2_match()
7616 mb->mark = NULL; /* Reset for start of next match attempt */ in pcre2_match()
7674 mb->check_subject = start_match; in pcre2_match()
7682 mb->end_subject = end_subject = true_end_subject; in pcre2_match()
7692 mb->end_subject = end_subject = start_match + match_data->startchar; in pcre2_match()
7706 match_data->mark = mb->mark; in pcre2_match()
7716 match_data->rc = ((int)mb->end_offset_top >= 2 * match_data->oveccount)? in pcre2_match()
7717 0 : (int)mb->end_offset_top/2 + 1; in pcre2_match()
7720 match_data->leftchar = mb->start_used_ptr - subject; in pcre2_match()
7721 match_data->rightchar = ((mb->last_used_ptr > mb->end_match_ptr)? in pcre2_match()
7722 mb->last_used_ptr : mb->end_match_ptr) - subject; in pcre2_match()
7741 match_data->mark = mb->nomatch_mark; in pcre2_match()