Lines Matching refs:mb
59 #define NLBLOCK mb /* Block containing newline information */
206 mb points to the match block
215 match_block *mb, pcre2_match_data *match_data, const char *s, ...)
235 i, Q->group_frame_type, Q->eptr - mb->start_subject, *(Q->ecode),
260 mb points to the match block
268 do_callout(heapframe *F, match_block *mb, PCRE2_SIZE *lengthptr)
278 if (mb->callout == NULL) return 0; /* No callout function provided */
296 cb = mb->cb;
300 cb->mark = mb->nomatch_mark;
301 cb->current_position = (PCRE2_SIZE)(Feptr - mb->start_subject);
324 rc = mb->callout(cb, mb->callout_data);
347 mb points to match block
356 match_ref(PCRE2_SIZE offset, BOOL caseless, heapframe *F, match_block *mb,
369 if ((mb->poptions & PCRE2_MATCH_UNSET_BACKREF) != 0)
380 p = mb->start_subject + Fovector[offset];
386 BOOL utf = (mb->poptions & PCRE2_UTF) != 0;
388 if (utf || (mb->poptions & PCRE2_UCP) != 0)
405 if (eptr >= mb->end_subject) return 1; /* Partial match */
438 if (eptr >= mb->end_subject) return 1; /* Partial match */
441 if (TABLE_GET(cp, mb->lcc, cp) != TABLE_GET(cc, mb->lcc, cc))
455 if (mb->partial != 0)
459 if (eptr >= mb->end_subject) return 1; /* Partial match */
468 if ((PCRE2_SIZE)(mb->end_subject - eptr) < length) return 1; /* Partial */
527 if (Feptr >= mb->end_subject) \
533 if (mb->partial != 0 && \
534 (Feptr > mb->start_used_ptr || mb->allowemptypartial)) \
536 mb->hitend = TRUE; \
537 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; \
569 mb structure (e.g. end_subject) into individual variables to improve
579 mb pointer to "static" variables block
590 PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)
627 BOOL utf = (mb->poptions & PCRE2_UTF) != 0;
628 BOOL ucp = (mb->poptions & PCRE2_UCP) != 0;
670 if (newsize > mb->heap_limit)
672 PCRE2_SIZE maxsize = (mb->heap_limit/frame_size) * frame_size;
760 if (mb->match_call_count++ >= mb->match_limit) return PCRE2_ERROR_MATCHLIMIT;
761 if (Frdepth >= mb->match_limit_depth) return PCRE2_ERROR_DEPTHLIMIT;
796 Fovector[offset] = P->eptr - mb->start_subject;
797 Fovector[offset+1] = Feptr - mb->start_subject;
810 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr;
852 ((mb->moptions & PCRE2_NOTEMPTY) != 0 ||
853 ((mb->moptions & PCRE2_NOTEMPTY_ATSTART) != 0 &&
854 Fstart_match == mb->start_subject + mb->start_offset)))
861 if (Feptr < mb->end_subject &&
862 ((mb->moptions | mb->poptions) & PCRE2_ENDANCHORED) != 0)
875 mb->end_match_ptr = Feptr; /* Record where we ended */
876 mb->end_offset_top = Foffset_top; /* and how many extracts were taken */
877 mb->mark = Fmark; /* and the last success mark */
878 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr;
880 match_data->ovector[0] = Fstart_match - mb->start_subject;
881 match_data->ovector[1] = Feptr - mb->start_subject;
898 if (mb->partial != 0 &&
899 Feptr == mb->end_subject - 1 &&
904 mb->hitend = TRUE;
905 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
912 if (Feptr >= mb->end_subject) /* DO NOT merge the Feptr++ here; it must */
919 if (utf) ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
931 if (Feptr >= mb->end_subject) /* DO NOT merge the Feptr++ here; it must */
951 if (Flength > (PCRE2_SIZE)(mb->end_subject - Feptr))
966 if (mb->end_subject - Feptr < 1)
984 if (Feptr >= mb->end_subject)
1005 if (mb->lcc[fc] != TABLE_GET(cc, mb->lcc, cc)) RRETURN(MATCH_NOMATCH);
1033 if (mb->lcc[fc] != TABLE_GET(cc, mb->lcc, cc)) RRETURN(MATCH_NOMATCH);
1048 if (TABLE_GET(Fecode[1], mb->lcc, Fecode[1])
1049 != TABLE_GET(*Feptr, mb->lcc, *Feptr)) RRETURN(MATCH_NOMATCH);
1061 if (Feptr >= mb->end_subject)
1083 ch = (mb->fcc)[ch];
1106 ch = (mb->fcc)[ch];
1119 if (ch == fc || (Fop == OP_NOTI && TABLE_GET(ch, mb->fcc, ch) == fc))
1247 if (Feptr <= mb->end_subject - Flength &&
1250 Feptr <= mb->end_subject - Loclength &&
1269 if (Feptr <= mb->end_subject - Flength &&
1272 Feptr <= mb->end_subject - Loclength &&
1289 if (Feptr <= mb->end_subject - Flength &&
1293 Feptr <= mb->end_subject - Loclength &&
1342 Loc = mb->fcc[Lc];
1348 Loc = TABLE_GET(Lc, mb->fcc, Lc);
1354 if (Feptr >= mb->end_subject)
1373 if (Feptr >= mb->end_subject)
1391 if (Feptr >= mb->end_subject)
1416 if (Feptr >= mb->end_subject)
1433 if (Feptr >= mb->end_subject)
1447 if (Feptr >= mb->end_subject)
1583 Loc = TABLE_GET(Lc, mb->fcc, Lc); /* Other case from table */
1591 if (Feptr >= mb->end_subject)
1607 if (Feptr >= mb->end_subject)
1630 if (Feptr >= mb->end_subject)
1649 if (Feptr >= mb->end_subject)
1674 if (Feptr >= mb->end_subject)
1704 if (Feptr >= mb->end_subject)
1733 if (Feptr >= mb->end_subject)
1748 if (Feptr >= mb->end_subject)
1770 if (Feptr >= mb->end_subject)
1788 if (Feptr >= mb->end_subject)
1812 if (Feptr >= mb->end_subject)
1841 if (Feptr >= mb->end_subject)
1930 if (Feptr >= mb->end_subject)
1950 if (Feptr >= mb->end_subject)
1984 if (Feptr >= mb->end_subject)
2007 if (Feptr >= mb->end_subject)
2038 if (Feptr >= mb->end_subject)
2073 if (Feptr >= mb->end_subject)
2165 if (Feptr >= mb->end_subject)
2188 if (Feptr >= mb->end_subject)
2207 if (Feptr >= mb->end_subject)
2255 if (Feptr >= mb->end_subject)
2261 if (CHMAX_255(fc) && (mb->ctypes[fc] & ctype_digit) != 0)
2267 if (Feptr >= mb->end_subject)
2273 if (!CHMAX_255(fc) || (mb->ctypes[fc] & ctype_digit) == 0)
2279 if (Feptr >= mb->end_subject)
2285 if (CHMAX_255(fc) && (mb->ctypes[fc] & ctype_space) != 0)
2291 if (Feptr >= mb->end_subject)
2297 if (!CHMAX_255(fc) || (mb->ctypes[fc] & ctype_space) == 0)
2303 if (Feptr >= mb->end_subject)
2309 if (CHMAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0)
2315 if (Feptr >= mb->end_subject)
2321 if (!CHMAX_255(fc) || (mb->ctypes[fc] & ctype_word) == 0)
2327 if (Feptr >= mb->end_subject)
2338 if (Feptr >= mb->end_subject)
2355 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH);
2362 if (Feptr >= mb->end_subject)
2377 if (Feptr >= mb->end_subject)
2392 if (Feptr >= mb->end_subject)
2407 if (Feptr >= mb->end_subject)
2430 if (Feptr >= mb->end_subject)
2559 if (Feptr >= mb->end_subject)
2567 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, mb->end_subject, utf,
2672 if (Feptr >= mb->end_subject)
2685 if (Feptr >= mb->end_subject)
2702 if (Feptr >= mb->end_subject)
2716 if (Feptr >= mb->end_subject)
2730 if (Feptr >= mb->end_subject)
2746 if (Feptr >= mb->end_subject)
2764 if (Feptr >= mb->end_subject)
2784 if (Feptr >= mb->end_subject)
2809 if (Feptr >= mb->end_subject)
2826 if (Feptr >= mb->end_subject)
2852 if (Feptr >= mb->end_subject)
2868 if (Feptr >= mb->end_subject)
2884 if (Feptr >= mb->end_subject)
2912 if (Feptr >= mb->end_subject)
2920 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject,
2921 mb->end_subject, utf, NULL);
2937 if (Feptr >= mb->end_subject)
2943 if (mb->partial != 0 &&
2944 Feptr + 1 >= mb->end_subject &&
2949 mb->hitend = TRUE;
2950 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
2953 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
2960 if (Feptr >= mb->end_subject)
2966 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
2971 if (Feptr > mb->end_subject - Lmin) RRETURN(MATCH_NOMATCH);
2978 if (Feptr >= mb->end_subject)
2989 if (Feptr < mb->end_subject && UCHAR21(Feptr) == CHAR_LF) Feptr++;
3002 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH);
3011 if (Feptr >= mb->end_subject)
3028 if (Feptr >= mb->end_subject)
3045 if (Feptr >= mb->end_subject)
3062 if (Feptr >= mb->end_subject)
3079 if (Feptr >= mb->end_subject)
3085 if (fc < 128 && (mb->ctypes[fc] & ctype_digit) != 0)
3094 if (Feptr >= mb->end_subject)
3100 if (cc >= 128 || (mb->ctypes[cc] & ctype_digit) == 0)
3111 if (Feptr >= mb->end_subject)
3117 if (cc < 128 && (mb->ctypes[cc] & ctype_space) != 0)
3120 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
3128 if (Feptr >= mb->end_subject)
3134 if (cc >= 128 || (mb->ctypes[cc] & ctype_space) == 0)
3145 if (Feptr >= mb->end_subject)
3151 if (cc < 128 && (mb->ctypes[cc] & ctype_word) != 0)
3154 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
3162 if (Feptr >= mb->end_subject)
3168 if (cc >= 128 || (mb->ctypes[cc] & ctype_word) == 0)
3190 if (Feptr >= mb->end_subject)
3196 if (mb->partial != 0 &&
3197 Feptr + 1 >= mb->end_subject &&
3202 mb->hitend = TRUE;
3203 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
3210 if (Feptr > mb->end_subject - Lmin)
3223 * if (Feptr > mb->end_subject - Lmin)
3234 if (Feptr >= mb->end_subject)
3244 if (Feptr < mb->end_subject && *Feptr == CHAR_LF) Feptr++;
3257 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH);
3266 if (Feptr >= mb->end_subject)
3286 if (Feptr >= mb->end_subject)
3306 if (Feptr >= mb->end_subject)
3326 if (Feptr >= mb->end_subject)
3346 if (Feptr >= mb->end_subject)
3351 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_digit) != 0)
3360 if (Feptr >= mb->end_subject)
3365 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_digit) == 0)
3374 if (Feptr >= mb->end_subject)
3379 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_space) != 0)
3388 if (Feptr >= mb->end_subject)
3393 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_space) == 0)
3402 if (Feptr >= mb->end_subject)
3407 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_word) != 0)
3416 if (Feptr >= mb->end_subject)
3421 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_word) == 0)
3454 if (Feptr >= mb->end_subject)
3471 if (Feptr >= mb->end_subject)
3491 if (Feptr >= mb->end_subject)
3508 if (Feptr >= mb->end_subject)
3525 if (Feptr >= mb->end_subject)
3544 if (Feptr >= mb->end_subject)
3565 if (Feptr >= mb->end_subject)
3588 if (Feptr >= mb->end_subject)
3616 if (Feptr >= mb->end_subject)
3637 if (Feptr >= mb->end_subject)
3666 if (Feptr >= mb->end_subject)
3685 if (Feptr >= mb->end_subject)
3704 if (Feptr >= mb->end_subject)
3734 if (Feptr >= mb->end_subject)
3742 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, mb->end_subject,
3761 if (Feptr >= mb->end_subject)
3771 if (mb->partial != 0 && /* Take care with CRLF partial */
3772 Feptr >= mb->end_subject &&
3777 mb->hitend = TRUE;
3778 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
3792 if (Feptr < mb->end_subject && UCHAR21(Feptr) == CHAR_LF) Feptr++;
3805 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF)
3844 if (fc < 256 && (mb->ctypes[fc] & ctype_digit) != 0)
3849 if (fc >= 256 || (mb->ctypes[fc] & ctype_digit) == 0)
3854 if (fc < 256 && (mb->ctypes[fc] & ctype_space) != 0)
3859 if (fc >= 256 || (mb->ctypes[fc] & ctype_space) == 0)
3864 if (fc < 256 && (mb->ctypes[fc] & ctype_word) != 0)
3869 if (fc >= 256 || (mb->ctypes[fc] & ctype_word) == 0)
3888 if (Feptr >= mb->end_subject)
3899 if (mb->partial != 0 && /* Take care with CRLF partial */
3900 Feptr >= mb->end_subject &&
3905 mb->hitend = TRUE;
3906 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
3920 if (Feptr < mb->end_subject && *Feptr == CHAR_LF) Feptr++;
3933 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF)
3988 if (MAX_255(fc) && (mb->ctypes[fc] & ctype_digit) != 0)
3993 if (!MAX_255(fc) || (mb->ctypes[fc] & ctype_digit) == 0)
3998 if (MAX_255(fc) && (mb->ctypes[fc] & ctype_space) != 0)
4003 if (!MAX_255(fc) || (mb->ctypes[fc] & ctype_space) == 0)
4008 if (MAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0)
4013 if (!MAX_255(fc) || (mb->ctypes[fc] & ctype_word) == 0)
4044 if (Feptr >= mb->end_subject)
4060 if (Feptr >= mb->end_subject)
4079 if (Feptr >= mb->end_subject)
4094 if (Feptr >= mb->end_subject)
4109 if (Feptr >= mb->end_subject)
4126 if (Feptr >= mb->end_subject)
4145 if (Feptr >= mb->end_subject)
4167 if (Feptr >= mb->end_subject)
4195 if (Feptr >= mb->end_subject)
4214 if (Feptr >= mb->end_subject)
4237 if (Feptr >= mb->end_subject)
4255 if (Feptr >= mb->end_subject)
4272 if (Feptr >= mb->end_subject)
4315 if (Feptr >= mb->end_subject)
4323 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, mb->end_subject,
4387 if (Feptr >= mb->end_subject)
4393 if (mb->partial != 0 && /* Take care with CRLF partial */
4394 Feptr + 1 >= mb->end_subject &&
4399 mb->hitend = TRUE;
4400 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
4403 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
4412 if (Feptr >= mb->end_subject)
4418 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
4423 Feptr = mb->end_subject; /* Unlimited UTF-8 repeat */
4432 if (fc > (uint32_t)(mb->end_subject - Feptr))
4434 Feptr = mb->end_subject;
4444 if (Feptr >= mb->end_subject)
4452 if (++Feptr >= mb->end_subject) break;
4458 (mb->bsr_convention == PCRE2_BSR_ANYCRLF ||
4476 if (Feptr >= mb->end_subject)
4498 if (Feptr >= mb->end_subject)
4518 if (Feptr >= mb->end_subject)
4524 if (fc < 256 && (mb->ctypes[fc] & ctype_digit) != 0) break;
4533 if (Feptr >= mb->end_subject)
4539 if (fc >= 256 ||(mb->ctypes[fc] & ctype_digit) == 0) break;
4548 if (Feptr >= mb->end_subject)
4554 if (fc < 256 && (mb->ctypes[fc] & ctype_space) != 0) break;
4563 if (Feptr >= mb->end_subject)
4569 if (fc >= 256 ||(mb->ctypes[fc] & ctype_space) == 0) break;
4578 if (Feptr >= mb->end_subject)
4584 if (fc < 256 && (mb->ctypes[fc] & ctype_word) != 0) break;
4593 if (Feptr >= mb->end_subject)
4599 if (fc >= 256 || (mb->ctypes[fc] & ctype_word) == 0) break;
4636 if (Feptr >= mb->end_subject)
4642 if (mb->partial != 0 && /* Take care with CRLF partial */
4643 Feptr + 1 >= mb->end_subject &&
4648 mb->hitend = TRUE;
4649 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
4658 if (fc > (uint32_t)(mb->end_subject - Feptr))
4660 Feptr = mb->end_subject;
4669 if (Feptr >= mb->end_subject)
4677 if (++Feptr >= mb->end_subject) break;
4682 if (fc != CHAR_LF && (mb->bsr_convention == PCRE2_BSR_ANYCRLF ||
4696 if (Feptr >= mb->end_subject)
4717 if (Feptr >= mb->end_subject)
4738 if (Feptr >= mb->end_subject)
4759 if (Feptr >= mb->end_subject)
4780 if (Feptr >= mb->end_subject)
4785 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_digit) != 0)
4794 if (Feptr >= mb->end_subject)
4799 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_digit) == 0)
4808 if (Feptr >= mb->end_subject)
4813 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_space) != 0)
4822 if (Feptr >= mb->end_subject)
4827 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_space) == 0)
4836 if (Feptr >= mb->end_subject)
4841 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_word) != 0)
4850 if (Feptr >= mb->end_subject)
4855 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_word) == 0)
4906 PCRE2_SPTR slot = mb->name_table + GET2(Fecode, 1) * mb->name_entry_size;
4913 slot += mb->name_entry_size;
4954 rrc = match_ref(Loffset, Lcaseless, F, mb, &length);
4957 if (rrc > 0) Feptr = mb->end_subject; /* Partial match */
4979 if (Lmin == 0 || (mb->poptions & PCRE2_MATCH_UNSET_BACKREF) != 0)
4988 rrc = match_ref(Loffset, Lcaseless, F, mb, &slength);
4991 if (rrc > 0) Feptr = mb->end_subject; /* Partial match */
5012 rrc = match_ref(Loffset, Lcaseless, F, mb, &slength);
5015 if (rrc > 0) Feptr = mb->end_subject; /* Partial match */
5036 rrc = match_ref(Loffset, Lcaseless, F, mb, &slength);
5042 if (rrc > 0 && mb->partial != 0 &&
5043 mb->end_subject > mb->start_used_ptr)
5045 mb->hitend = TRUE;
5046 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
5087 (void)match_ref(Loffset, Lcaseless, F, mb, &slength);
5217 if (mb->verb_ecode_ptr < next_ecode &&
5257 if (mb->hasthen || Frdepth == 0)
5311 if (mb->verb_ecode_ptr < next_ecode &&
5333 bracode = mb->start_code + GET(Fecode, 1);
5334 number = (bracode == mb->start_code)? 0 : GET2(bracode, 1 + LINK_SIZE);
5380 mb->verb_current_recurse == (Lframe_type ^ GF_RECURSE))
5382 if (rrc == MATCH_THEN && mb->verb_ecode_ptr < next_ecode &&
5494 rrc = do_callout(F, mb, &length);
5527 rrc = do_callout(F, mb, &length);
5555 PCRE2_SPTR slot = mb->name_table + GET2(Fecode, 1) * mb->name_entry_size;
5561 slot += mb->name_entry_size;
5574 PCRE2_SPTR slot = mb->name_table + GET2(Fecode, 1) * mb->name_entry_size;
5580 slot += mb->name_entry_size;
5698 if (Feptr <= mb->check_subject) RRETURN(MATCH_NOMATCH);
5709 if ((ptrdiff_t)number > Feptr - mb->start_subject) RRETURN(MATCH_NOMATCH);
5715 if (Feptr < mb->start_used_ptr) mb->start_used_ptr = Feptr;
5753 (char *)P->eptr - (char *)mb->start_subject);
5789 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr;
5799 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr;
5862 Fovector[offset] = P->eptr - mb->start_subject;
5863 Fovector[offset+1] = Feptr - mb->start_subject;
5915 if (Feptr != mb->start_subject || (mb->moptions & PCRE2_NOTBOL) != 0)
5921 if (Feptr != mb->start_subject) RRETURN(MATCH_NOMATCH);
5929 if ((mb->moptions & PCRE2_NOTEOL) != 0) RRETURN(MATCH_NOMATCH);
5930 if ((mb->poptions & PCRE2_DOLLAR_ENDONLY) == 0) goto ASSERT_NL_OR_EOS;
5936 if (Feptr < mb->end_subject) RRETURN(MATCH_NOMATCH);
5937 if (mb->partial != 0)
5939 mb->hitend = TRUE;
5940 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
5949 if (Feptr < mb->end_subject &&
5950 (!IS_NEWLINE(Feptr) || Feptr != mb->end_subject - mb->nllen))
5952 if (mb->partial != 0 &&
5953 Feptr + 1 >= mb->end_subject &&
5958 mb->hitend = TRUE;
5959 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
5966 if (mb->partial != 0)
5968 mb->hitend = TRUE;
5969 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
5982 if ((mb->moptions & PCRE2_NOTBOL) != 0 && Feptr == mb->start_subject)
5984 if (Feptr != mb->start_subject &&
5985 ((Feptr == mb->end_subject &&
5986 (mb->poptions & PCRE2_ALT_CIRCUMFLEX) == 0) ||
5996 if (Feptr < mb->end_subject)
6000 if (mb->partial != 0 &&
6001 Feptr + 1 >= mb->end_subject &&
6006 mb->hitend = TRUE;
6007 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
6014 if ((mb->moptions & PCRE2_NOTEOL) != 0) RRETURN(MATCH_NOMATCH);
6025 if (Feptr != mb->start_subject + mb->start_offset) RRETURN(MATCH_NOMATCH);
6048 if (Feptr == mb->check_subject) prev_is_word = FALSE; else
6060 if (lastptr < mb->start_used_ptr) mb->start_used_ptr = lastptr;
6062 if ((mb->poptions & PCRE2_UCP) != 0)
6072 prev_is_word = CHMAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0;
6077 if (Feptr >= mb->end_subject)
6088 FORWARDCHARTEST(nextptr, mb->end_subject);
6094 if (nextptr > mb->last_used_ptr) mb->last_used_ptr = nextptr;
6096 if ((mb->poptions & PCRE2_UCP) != 0)
6106 cur_is_word = CHMAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0;
6122 Fmark = mb->nomatch_mark = Fecode + 2;
6127 argument. It is passed back in mb->verb_skip_ptr. If it does match, we
6128 return MATCH_SKIP with mb->verb_skip_ptr now pointing to the subject
6133 PRIV(strcmp)(Fecode + 2, mb->verb_skip_ptr) == 0)
6135 mb->verb_skip_ptr = Feptr; /* Pass back current position */
6143 /* Record the current recursing group number in mb->verb_current_recurse
6150 mb->verb_current_recurse = Fcurrent_recurse;
6154 Fmark = mb->nomatch_mark = Fecode + 2;
6157 mb->verb_current_recurse = Fcurrent_recurse;
6163 mb->verb_current_recurse = Fcurrent_recurse;
6167 Fmark = mb->nomatch_mark = Fecode + 2;
6170 mb->verb_current_recurse = Fcurrent_recurse;
6176 mb->verb_skip_ptr = Feptr; /* Pass back current position */
6177 mb->verb_current_recurse = Fcurrent_recurse;
6185 SKIP_ARG gets to top level, the match is re-run with mb->ignore_skip_arg
6189 mb->skip_arg_count++;
6190 if (mb->skip_arg_count <= mb->ignore_skip_arg)
6200 top, where it causes a rematch with mb->ignore_skip_arg set to the value of
6201 mb->skip_arg_count. */
6203 mb->verb_skip_ptr = Fecode + 2;
6204 mb->verb_current_recurse = Fcurrent_recurse;
6213 mb->verb_ecode_ptr = Fecode;
6214 mb->verb_current_recurse = Fcurrent_recurse;
6218 Fmark = mb->nomatch_mark = Fecode + 2;
6221 mb->verb_ecode_ptr = Fecode;
6222 mb->verb_current_recurse = Fcurrent_recurse;
6251 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr;
6254 mb->cb->callout_flags |= PCRE2_CALLOUT_BACKTRACK; /* Note for callouts */
6365 /* We need to have mb as a pointer to a match block, because the IS_NEWLINE
6370 match_block *mb = &actual_match_block;
6439 mb->partial = ((options & PCRE2_PARTIAL_HARD) != 0)? 2 :
6445 if (mb->partial != 0 &&
6575 mb->check_subject = subject;
6628 /* The mb->check_subject field points to the start of UTF checking;
6631 mb->check_subject = start_match;
6641 for (i = re->max_lookbehind; i > 0 && mb->check_subject > subject; i--)
6643 mb->check_subject--;
6644 while (mb->check_subject > subject &&
6646 (*mb->check_subject & 0xc0) == 0x80)
6648 (*mb->check_subject & 0xfc00) == 0xdc00)
6650 mb->check_subject--;
6660 mb->check_subject -= re->max_lookbehind;
6662 mb->check_subject = subject;
6671 match_data->rc = PRIV(valid_utf)(mb->check_subject,
6672 length - (mb->check_subject - subject), &(match_data->startchar));
6681 match_data->startchar += mb->check_subject - subject;
6692 mb->check_subject = end_subject + 1;
6694 while (mb->check_subject < start_match && NOT_FIRSTCU(*mb->check_subject))
6695 mb->check_subject++;
6717 mb->memctl = re->memctl;
6719 else mb->memctl = mcontext->memctl;
6730 mb->cb = &cb;
6739 mb->callout = mcontext->callout;
6740 mb->callout_data = mcontext->callout_data;
6742 mb->start_subject = subject;
6743 mb->start_offset = start_offset;
6744 mb->end_subject = end_subject;
6745 mb->hasthen = (re->flags & PCRE2_HASTHEN) != 0;
6746 mb->allowemptypartial = (re->max_lookbehind > 0) ||
6748 mb->poptions = re->overall_options; /* Pattern options */
6749 mb->ignore_skip_arg = 0;
6750 mb->mark = mb->nomatch_mark = NULL; /* In case never set */
6755 mb->name_table = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code));
6756 mb->name_count = re->name_count;
6757 mb->name_entry_size = re->name_entry_size;
6758 mb->start_code = mb->name_table + re->name_count * re->name_entry_size;
6762 mb->bsr_convention = re->bsr_convention;
6763 mb->nltype = NLTYPE_FIXED;
6767 mb->nllen = 1;
6768 mb->nl[0] = CHAR_CR;
6772 mb->nllen = 1;
6773 mb->nl[0] = CHAR_NL;
6777 mb->nllen = 1;
6778 mb->nl[0] = CHAR_NUL;
6782 mb->nllen = 2;
6783 mb->nl[0] = CHAR_CR;
6784 mb->nl[1] = CHAR_NL;
6788 mb->nltype = NLTYPE_ANY;
6792 mb->nltype = NLTYPE_ANYCRLF;
6818 mb->heap_limit = ((mcontext->heap_limit < re->limit_heap)?
6821 mb->match_limit = (mcontext->match_limit < re->limit_match)?
6824 mb->match_limit_depth = (mcontext->depth_limit < re->limit_depth)?
6835 if (heapframes_size > mb->heap_limit)
6837 if (frame_size > mb->heap_limit ) return PCRE2_ERROR_HEAPLIMIT;
6838 heapframes_size = mb->heap_limit;
6866 mb->lcc = re->tables + lcc_offset;
6867 mb->fcc = re->tables + fcc_offset;
6868 mb->ctypes = re->tables + ctypes_offset;
6879 first_cu2 = TABLE_GET(first_cu, mb->fcc, first_cu);
6901 req_cu2 = TABLE_GET(req_cu, mb->fcc, req_cu);
6923 mb->hitend = FALSE;
7090 if (mb->partial == 0 && start_match >= mb->end_subject)
7102 if (start_match > mb->start_subject + start_offset)
7123 (mb->nltype == NLTYPE_ANY || mb->nltype == NLTYPE_ANYCRLF) &&
7149 if (mb->partial == 0 && start_match >= mb->end_subject)
7159 end_subject = mb->end_subject;
7163 if (mb->partial == 0)
7278 mb->start_used_ptr = start_match;
7279 mb->last_used_ptr = start_match;
7281 mb->moptions = options | fragment_options;
7283 mb->moptions = options;
7285 mb->match_call_count = 0;
7286 mb->end_offset_top = 0;
7287 mb->skip_arg_count = 0;
7289 rc = match(start_match, mb->start_code, re->top_bracket, frame_size,
7290 match_data, mb);
7292 if (mb->hitend && start_partial == NULL)
7294 start_partial = mb->start_used_ptr;
7309 mb->ignore_skip_arg = mb->skip_arg_count;
7316 if (mb->verb_skip_ptr > start_match)
7318 new_start_match = mb->verb_skip_ptr;
7329 mb->ignore_skip_arg = 0;
7382 (mb->nltype == NLTYPE_ANY ||
7383 mb->nltype == NLTYPE_ANYCRLF ||
7384 mb->nllen == 2))
7387 mb->mark = NULL; /* Reset for start of next match attempt */
7444 mb->check_subject = start_match;
7452 mb->end_subject = end_subject = true_end_subject;
7462 mb->end_subject = end_subject = start_match + match_data->startchar;
7476 match_data->mark = mb->mark;
7486 match_data->rc = ((int)mb->end_offset_top >= 2 * match_data->oveccount)?
7487 0 : (int)mb->end_offset_top/2 + 1;
7489 match_data->leftchar = mb->start_used_ptr - subject;
7490 match_data->rightchar = ((mb->last_used_ptr > mb->end_match_ptr)?
7491 mb->last_used_ptr : mb->end_match_ptr) - subject;
7509 match_data->mark = mb->nomatch_mark;