• Home
  • Raw
  • Download

Lines Matching full:mb

59 #define NLBLOCK mb              /* Block containing newline information */
205 mb points to the match block
213 match_block *mb, const char *s, ...) in display_frames() argument
225 ((char *)P - (char *)(mb->match_frames))/frame_size); in display_frames()
228 for (i = 0, Q = mb->match_frames; in display_frames()
233 i, Q->group_frame_type, Q->eptr - mb->start_subject, *(Q->ecode), in display_frames()
258 mb points to the match block
266 do_callout(heapframe *F, match_block *mb, PCRE2_SIZE *lengthptr) in do_callout() argument
276 if (mb->callout == NULL) return 0; /* No callout function provided */ in do_callout()
294 cb = mb->cb; in do_callout()
298 cb->mark = mb->nomatch_mark; in do_callout()
299 cb->current_position = (PCRE2_SIZE)(Feptr - mb->start_subject); in do_callout()
322 rc = mb->callout(cb, mb->callout_data); in do_callout()
345 mb points to match block
354 match_ref(PCRE2_SIZE offset, BOOL caseless, heapframe *F, match_block *mb, in match_ref() argument
367 if ((mb->poptions & PCRE2_MATCH_UNSET_BACKREF) != 0) in match_ref()
378 p = mb->start_subject + Fovector[offset]; in match_ref()
384 BOOL utf = (mb->poptions & PCRE2_UTF) != 0; in match_ref()
386 if (utf || (mb->poptions & PCRE2_UCP) != 0) in match_ref()
403 if (eptr >= mb->end_subject) return 1; /* Partial match */ in match_ref()
436 if (eptr >= mb->end_subject) return 1; /* Partial match */ in match_ref()
439 if (TABLE_GET(cp, mb->lcc, cp) != TABLE_GET(cc, mb->lcc, cc)) in match_ref()
453 if (mb->partial != 0) in match_ref()
457 if (eptr >= mb->end_subject) return 1; /* Partial match */ in match_ref()
466 if ((PCRE2_SIZE)(mb->end_subject - eptr) < length) return 1; /* Partial */ in match_ref()
519 if (Feptr >= mb->end_subject) \
525 if (mb->partial != 0 && \
526 (Feptr > mb->start_used_ptr || mb->allowemptypartial)) \
528 mb->hitend = TRUE; \
529 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; \
561 mb structure (e.g. end_subject) into individual variables to improve
572 mb pointer to "static" variables block
584 match_block *mb) in match() argument
618 BOOL utf = (mb->poptions & PCRE2_UTF) != 0; in match()
619 BOOL ucp = (mb->poptions & PCRE2_UCP) != 0; in match()
632 F = mb->match_frames; in match()
652 if (N >= mb->match_frames_top) in match()
654 PCRE2_SIZE newsize = mb->frame_vector_size * 2; in match()
657 if ((newsize / 1024) > mb->heap_limit) in match()
659 PCRE2_SIZE maxsize = ((mb->heap_limit * 1024)/frame_size) * frame_size; in match()
660 if (mb->frame_vector_size >= maxsize) return PCRE2_ERROR_HEAPLIMIT; in match()
664 new = mb->memctl.malloc(newsize, mb->memctl.memory_data); in match()
666 memcpy(new, mb->match_frames, mb->frame_vector_size); in match()
668 F = (heapframe *)((char *)new + ((char *)F - (char *)mb->match_frames)); in match()
671 if (mb->match_frames != mb->stack_frames) in match()
672 mb->memctl.free(mb->match_frames, mb->memctl.memory_data); in match()
673 mb->match_frames = new; in match()
674 mb->match_frames_top = (heapframe *)((char *)mb->match_frames + newsize); in match()
675 mb->frame_vector_size = newsize; in match()
733 Flast_group_offset = (char *)F - (char *)mb->match_frames; in match()
746 if (mb->match_call_count++ >= mb->match_limit) return PCRE2_ERROR_MATCHLIMIT; in match()
747 if (Frdepth >= mb->match_limit_depth) return PCRE2_ERROR_DEPTHLIMIT; in match()
775 N = (heapframe *)((char *)mb->match_frames + offset); in match()
782 Fovector[offset] = P->eptr - mb->start_subject; in match()
783 Fovector[offset+1] = Feptr - mb->start_subject; in match()
796 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; in match()
813 N = (heapframe *)((char *)mb->match_frames + offset); in match()
836 ((mb->moptions & PCRE2_NOTEMPTY) != 0 || in match()
837 ((mb->moptions & PCRE2_NOTEMPTY_ATSTART) != 0 && in match()
838 Fstart_match == mb->start_subject + mb->start_offset))) in match()
845 if (Feptr < mb->end_subject && in match()
846 ((mb->moptions | mb->poptions) & PCRE2_ENDANCHORED) != 0) in match()
859 mb->end_match_ptr = Feptr; /* Record where we ended */ in match()
860 mb->end_offset_top = Foffset_top; /* and how many extracts were taken */ in match()
861 mb->mark = Fmark; /* and the last success mark */ in match()
862 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; in match()
864 ovector[0] = Fstart_match - mb->start_subject; in match()
865 ovector[1] = Feptr - mb->start_subject; in match()
881 if (mb->partial != 0 && in match()
882 Feptr == mb->end_subject - 1 && in match()
887 mb->hitend = TRUE; in match()
888 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
895 if (Feptr >= mb->end_subject) /* DO NOT merge the Feptr++ here; it must */ in match()
902 if (utf) ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
914 if (Feptr >= mb->end_subject) /* DO NOT merge the Feptr++ here; it must */ in match()
934 if (Flength > (PCRE2_SIZE)(mb->end_subject - Feptr)) in match()
949 if (mb->end_subject - Feptr < 1) in match()
967 if (Feptr >= mb->end_subject) in match()
988 if (mb->lcc[fc] != TABLE_GET(cc, mb->lcc, cc)) RRETURN(MATCH_NOMATCH); in match()
1016 if (mb->lcc[fc] != TABLE_GET(cc, mb->lcc, cc)) RRETURN(MATCH_NOMATCH); in match()
1031 if (TABLE_GET(Fecode[1], mb->lcc, Fecode[1]) in match()
1032 != TABLE_GET(*Feptr, mb->lcc, *Feptr)) RRETURN(MATCH_NOMATCH); in match()
1044 if (Feptr >= mb->end_subject) in match()
1066 ch = (mb->fcc)[ch]; in match()
1089 ch = (mb->fcc)[ch]; in match()
1102 if (ch == fc || (Fop == OP_NOTI && TABLE_GET(ch, mb->fcc, ch) == fc)) in match()
1230 if (Feptr <= mb->end_subject - Flength && in match()
1233 Feptr <= mb->end_subject - Loclength && in match()
1252 if (Feptr <= mb->end_subject - Flength && in match()
1255 Feptr <= mb->end_subject - Loclength && in match()
1272 if (Feptr <= mb->end_subject - Flength && in match()
1276 Feptr <= mb->end_subject - Loclength && in match()
1325 Loc = mb->fcc[Lc]; in match()
1331 Loc = TABLE_GET(Lc, mb->fcc, Lc); in match()
1337 if (Feptr >= mb->end_subject) in match()
1356 if (Feptr >= mb->end_subject) in match()
1374 if (Feptr >= mb->end_subject) in match()
1399 if (Feptr >= mb->end_subject) in match()
1416 if (Feptr >= mb->end_subject) in match()
1430 if (Feptr >= mb->end_subject) in match()
1566 Loc = TABLE_GET(Lc, mb->fcc, Lc); /* Other case from table */ in match()
1574 if (Feptr >= mb->end_subject) in match()
1590 if (Feptr >= mb->end_subject) in match()
1613 if (Feptr >= mb->end_subject) in match()
1632 if (Feptr >= mb->end_subject) in match()
1657 if (Feptr >= mb->end_subject) in match()
1687 if (Feptr >= mb->end_subject) in match()
1716 if (Feptr >= mb->end_subject) in match()
1731 if (Feptr >= mb->end_subject) in match()
1753 if (Feptr >= mb->end_subject) in match()
1771 if (Feptr >= mb->end_subject) in match()
1795 if (Feptr >= mb->end_subject) in match()
1824 if (Feptr >= mb->end_subject) in match()
1913 if (Feptr >= mb->end_subject) in match()
1933 if (Feptr >= mb->end_subject) in match()
1967 if (Feptr >= mb->end_subject) in match()
1990 if (Feptr >= mb->end_subject) in match()
2021 if (Feptr >= mb->end_subject) in match()
2056 if (Feptr >= mb->end_subject) in match()
2148 if (Feptr >= mb->end_subject) in match()
2171 if (Feptr >= mb->end_subject) in match()
2190 if (Feptr >= mb->end_subject) in match()
2238 if (Feptr >= mb->end_subject) in match()
2244 if (CHMAX_255(fc) && (mb->ctypes[fc] & ctype_digit) != 0) in match()
2250 if (Feptr >= mb->end_subject) in match()
2256 if (!CHMAX_255(fc) || (mb->ctypes[fc] & ctype_digit) == 0) in match()
2262 if (Feptr >= mb->end_subject) in match()
2268 if (CHMAX_255(fc) && (mb->ctypes[fc] & ctype_space) != 0) in match()
2274 if (Feptr >= mb->end_subject) in match()
2280 if (!CHMAX_255(fc) || (mb->ctypes[fc] & ctype_space) == 0) in match()
2286 if (Feptr >= mb->end_subject) in match()
2292 if (CHMAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0) in match()
2298 if (Feptr >= mb->end_subject) in match()
2304 if (!CHMAX_255(fc) || (mb->ctypes[fc] & ctype_word) == 0) in match()
2310 if (Feptr >= mb->end_subject) in match()
2321 if (Feptr >= mb->end_subject) in match()
2338 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH); in match()
2345 if (Feptr >= mb->end_subject) in match()
2360 if (Feptr >= mb->end_subject) in match()
2375 if (Feptr >= mb->end_subject) in match()
2390 if (Feptr >= mb->end_subject) in match()
2413 if (Feptr >= mb->end_subject) in match()
2520 if (Feptr >= mb->end_subject) in match()
2528 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, mb->end_subject, utf, in match()
2631 if (Feptr >= mb->end_subject) in match()
2644 if (Feptr >= mb->end_subject) in match()
2661 if (Feptr >= mb->end_subject) in match()
2675 if (Feptr >= mb->end_subject) in match()
2689 if (Feptr >= mb->end_subject) in match()
2704 if (Feptr >= mb->end_subject) in match()
2724 if (Feptr >= mb->end_subject) in match()
2749 if (Feptr >= mb->end_subject) in match()
2766 if (Feptr >= mb->end_subject) in match()
2792 if (Feptr >= mb->end_subject) in match()
2819 if (Feptr >= mb->end_subject) in match()
2827 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, in match()
2828 mb->end_subject, utf, NULL); in match()
2844 if (Feptr >= mb->end_subject) in match()
2850 if (mb->partial != 0 && in match()
2851 Feptr + 1 >= mb->end_subject && in match()
2856 mb->hitend = TRUE; in match()
2857 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
2860 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
2867 if (Feptr >= mb->end_subject) in match()
2873 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
2878 if (Feptr > mb->end_subject - Lmin) RRETURN(MATCH_NOMATCH); in match()
2885 if (Feptr >= mb->end_subject) in match()
2896 if (Feptr < mb->end_subject && UCHAR21(Feptr) == CHAR_LF) Feptr++; in match()
2909 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH); in match()
2918 if (Feptr >= mb->end_subject) in match()
2935 if (Feptr >= mb->end_subject) in match()
2952 if (Feptr >= mb->end_subject) in match()
2969 if (Feptr >= mb->end_subject) in match()
2986 if (Feptr >= mb->end_subject) in match()
2992 if (fc < 128 && (mb->ctypes[fc] & ctype_digit) != 0) in match()
3001 if (Feptr >= mb->end_subject) in match()
3007 if (cc >= 128 || (mb->ctypes[cc] & ctype_digit) == 0) in match()
3018 if (Feptr >= mb->end_subject) in match()
3024 if (cc < 128 && (mb->ctypes[cc] & ctype_space) != 0) in match()
3027 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
3035 if (Feptr >= mb->end_subject) in match()
3041 if (cc >= 128 || (mb->ctypes[cc] & ctype_space) == 0) in match()
3052 if (Feptr >= mb->end_subject) in match()
3058 if (cc < 128 && (mb->ctypes[cc] & ctype_word) != 0) in match()
3061 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
3069 if (Feptr >= mb->end_subject) in match()
3075 if (cc >= 128 || (mb->ctypes[cc] & ctype_word) == 0) in match()
3097 if (Feptr >= mb->end_subject) in match()
3103 if (mb->partial != 0 && in match()
3104 Feptr + 1 >= mb->end_subject && in match()
3109 mb->hitend = TRUE; in match()
3110 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
3117 if (Feptr > mb->end_subject - Lmin) in match()
3130 * if (Feptr > mb->end_subject - Lmin) in match()
3141 if (Feptr >= mb->end_subject) in match()
3151 if (Feptr < mb->end_subject && *Feptr == CHAR_LF) Feptr++; in match()
3164 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH); in match()
3173 if (Feptr >= mb->end_subject) in match()
3193 if (Feptr >= mb->end_subject) in match()
3213 if (Feptr >= mb->end_subject) in match()
3233 if (Feptr >= mb->end_subject) in match()
3253 if (Feptr >= mb->end_subject) in match()
3258 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_digit) != 0) in match()
3267 if (Feptr >= mb->end_subject) in match()
3272 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_digit) == 0) in match()
3281 if (Feptr >= mb->end_subject) in match()
3286 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_space) != 0) in match()
3295 if (Feptr >= mb->end_subject) in match()
3300 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_space) == 0) in match()
3309 if (Feptr >= mb->end_subject) in match()
3314 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_word) != 0) in match()
3323 if (Feptr >= mb->end_subject) in match()
3328 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_word) == 0) in match()
3359 if (Feptr >= mb->end_subject) in match()
3376 if (Feptr >= mb->end_subject) in match()
3396 if (Feptr >= mb->end_subject) in match()
3413 if (Feptr >= mb->end_subject) in match()
3430 if (Feptr >= mb->end_subject) in match()
3448 if (Feptr >= mb->end_subject) in match()
3472 if (Feptr >= mb->end_subject) in match()
3500 if (Feptr >= mb->end_subject) in match()
3521 if (Feptr >= mb->end_subject) in match()
3550 if (Feptr >= mb->end_subject) in match()
3579 if (Feptr >= mb->end_subject) in match()
3587 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, mb->end_subject, in match()
3606 if (Feptr >= mb->end_subject) in match()
3616 if (mb->partial != 0 && /* Take care with CRLF partial */ in match()
3617 Feptr >= mb->end_subject && in match()
3622 mb->hitend = TRUE; in match()
3623 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
3637 if (Feptr < mb->end_subject && UCHAR21(Feptr) == CHAR_LF) Feptr++; in match()
3650 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) in match()
3689 if (fc < 256 && (mb->ctypes[fc] & ctype_digit) != 0) in match()
3694 if (fc >= 256 || (mb->ctypes[fc] & ctype_digit) == 0) in match()
3699 if (fc < 256 && (mb->ctypes[fc] & ctype_space) != 0) in match()
3704 if (fc >= 256 || (mb->ctypes[fc] & ctype_space) == 0) in match()
3709 if (fc < 256 && (mb->ctypes[fc] & ctype_word) != 0) in match()
3714 if (fc >= 256 || (mb->ctypes[fc] & ctype_word) == 0) in match()
3733 if (Feptr >= mb->end_subject) in match()
3744 if (mb->partial != 0 && /* Take care with CRLF partial */ in match()
3745 Feptr >= mb->end_subject && in match()
3750 mb->hitend = TRUE; in match()
3751 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
3765 if (Feptr < mb->end_subject && *Feptr == CHAR_LF) Feptr++; in match()
3778 if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) in match()
3833 if (MAX_255(fc) && (mb->ctypes[fc] & ctype_digit) != 0) in match()
3838 if (!MAX_255(fc) || (mb->ctypes[fc] & ctype_digit) == 0) in match()
3843 if (MAX_255(fc) && (mb->ctypes[fc] & ctype_space) != 0) in match()
3848 if (!MAX_255(fc) || (mb->ctypes[fc] & ctype_space) == 0) in match()
3853 if (MAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0) in match()
3858 if (!MAX_255(fc) || (mb->ctypes[fc] & ctype_word) == 0) in match()
3886 if (Feptr >= mb->end_subject) in match()
3902 if (Feptr >= mb->end_subject) in match()
3921 if (Feptr >= mb->end_subject) in match()
3937 if (Feptr >= mb->end_subject) in match()
3953 if (Feptr >= mb->end_subject) in match()
3970 if (Feptr >= mb->end_subject) in match()
3993 if (Feptr >= mb->end_subject) in match()
4021 if (Feptr >= mb->end_subject) in match()
4040 if (Feptr >= mb->end_subject) in match()
4063 if (Feptr >= mb->end_subject) in match()
4106 if (Feptr >= mb->end_subject) in match()
4114 Feptr = PRIV(extuni)(fc, Feptr, mb->start_subject, mb->end_subject, in match()
4178 if (Feptr >= mb->end_subject) in match()
4184 if (mb->partial != 0 && /* Take care with CRLF partial */ in match()
4185 Feptr + 1 >= mb->end_subject && in match()
4190 mb->hitend = TRUE; in match()
4191 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
4194 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
4203 if (Feptr >= mb->end_subject) in match()
4209 ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++); in match()
4214 Feptr = mb->end_subject; /* Unlimited UTF-8 repeat */ in match()
4223 if (fc > (uint32_t)(mb->end_subject - Feptr)) in match()
4225 Feptr = mb->end_subject; in match()
4235 if (Feptr >= mb->end_subject) in match()
4243 if (++Feptr >= mb->end_subject) break; in match()
4249 (mb->bsr_convention == PCRE2_BSR_ANYCRLF || in match()
4267 if (Feptr >= mb->end_subject) in match()
4289 if (Feptr >= mb->end_subject) in match()
4309 if (Feptr >= mb->end_subject) in match()
4315 if (fc < 256 && (mb->ctypes[fc] & ctype_digit) != 0) break; in match()
4324 if (Feptr >= mb->end_subject) in match()
4330 if (fc >= 256 ||(mb->ctypes[fc] & ctype_digit) == 0) break; in match()
4339 if (Feptr >= mb->end_subject) in match()
4345 if (fc < 256 && (mb->ctypes[fc] & ctype_space) != 0) break; in match()
4354 if (Feptr >= mb->end_subject) in match()
4360 if (fc >= 256 ||(mb->ctypes[fc] & ctype_space) == 0) break; in match()
4369 if (Feptr >= mb->end_subject) in match()
4375 if (fc < 256 && (mb->ctypes[fc] & ctype_word) != 0) break; in match()
4384 if (Feptr >= mb->end_subject) in match()
4390 if (fc >= 256 || (mb->ctypes[fc] & ctype_word) == 0) break; in match()
4427 if (Feptr >= mb->end_subject) in match()
4433 if (mb->partial != 0 && /* Take care with CRLF partial */ in match()
4434 Feptr + 1 >= mb->end_subject && in match()
4439 mb->hitend = TRUE; in match()
4440 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
4449 if (fc > (uint32_t)(mb->end_subject - Feptr)) in match()
4451 Feptr = mb->end_subject; in match()
4460 if (Feptr >= mb->end_subject) in match()
4468 if (++Feptr >= mb->end_subject) break; in match()
4473 if (fc != CHAR_LF && (mb->bsr_convention == PCRE2_BSR_ANYCRLF || in match()
4487 if (Feptr >= mb->end_subject) in match()
4508 if (Feptr >= mb->end_subject) in match()
4529 if (Feptr >= mb->end_subject) in match()
4550 if (Feptr >= mb->end_subject) in match()
4571 if (Feptr >= mb->end_subject) in match()
4576 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_digit) != 0) in match()
4585 if (Feptr >= mb->end_subject) in match()
4590 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_digit) == 0) in match()
4599 if (Feptr >= mb->end_subject) in match()
4604 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_space) != 0) in match()
4613 if (Feptr >= mb->end_subject) in match()
4618 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_space) == 0) in match()
4627 if (Feptr >= mb->end_subject) in match()
4632 if (MAX_255(*Feptr) && (mb->ctypes[*Feptr] & ctype_word) != 0) in match()
4641 if (Feptr >= mb->end_subject) in match()
4646 if (!MAX_255(*Feptr) || (mb->ctypes[*Feptr] & ctype_word) == 0) in match()
4697 PCRE2_SPTR slot = mb->name_table + GET2(Fecode, 1) * mb->name_entry_size; in match()
4704 slot += mb->name_entry_size; in match()
4745 rrc = match_ref(Loffset, Lcaseless, F, mb, &length); in match()
4748 if (rrc > 0) Feptr = mb->end_subject; /* Partial match */ in match()
4770 if (Lmin == 0 || (mb->poptions & PCRE2_MATCH_UNSET_BACKREF) != 0) in match()
4779 rrc = match_ref(Loffset, Lcaseless, F, mb, &slength); in match()
4782 if (rrc > 0) Feptr = mb->end_subject; /* Partial match */ in match()
4803 rrc = match_ref(Loffset, Lcaseless, F, mb, &slength); in match()
4806 if (rrc > 0) Feptr = mb->end_subject; /* Partial match */ in match()
4827 rrc = match_ref(Loffset, Lcaseless, F, mb, &slength); in match()
4833 if (rrc > 0 && mb->partial != 0 && in match()
4834 mb->end_subject > mb->start_used_ptr) in match()
4836 mb->hitend = TRUE; in match()
4837 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
4878 (void)match_ref(Loffset, Lcaseless, F, mb, &slength); in match()
5008 if (mb->verb_ecode_ptr < next_ecode && in match()
5048 if (mb->hasthen || Frdepth == 0) in match()
5102 if (mb->verb_ecode_ptr < next_ecode && in match()
5124 bracode = mb->start_code + GET(Fecode, 1); in match()
5125 number = (bracode == mb->start_code)? 0 : GET2(bracode, 1 + LINK_SIZE); in match()
5136 N = (heapframe *)((char *)mb->match_frames + offset); in match()
5171 mb->verb_current_recurse == (Lframe_type ^ GF_RECURSE)) in match()
5173 if (rrc == MATCH_THEN && mb->verb_ecode_ptr < next_ecode && in match()
5285 rrc = do_callout(F, mb, &length); in match()
5318 rrc = do_callout(F, mb, &length); in match()
5346 PCRE2_SPTR slot = mb->name_table + GET2(Fecode, 1) * mb->name_entry_size; in match()
5352 slot += mb->name_entry_size; in match()
5365 PCRE2_SPTR slot = mb->name_table + GET2(Fecode, 1) * mb->name_entry_size; in match()
5371 slot += mb->name_entry_size; in match()
5489 if (Feptr <= mb->check_subject) RRETURN(MATCH_NOMATCH); in match()
5500 if ((ptrdiff_t)number > Feptr - mb->start_subject) RRETURN(MATCH_NOMATCH); in match()
5506 if (Feptr < mb->start_used_ptr) mb->start_used_ptr = Feptr; in match()
5537 N = (heapframe *)((char *)mb->match_frames + Flast_group_offset); in match()
5544 (char *)P->eptr - (char *)mb->start_subject); in match()
5580 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; in match()
5590 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; in match()
5653 Fovector[offset] = P->eptr - mb->start_subject; in match()
5654 Fovector[offset+1] = Feptr - mb->start_subject; in match()
5706 if (Feptr != mb->start_subject || (mb->moptions & PCRE2_NOTBOL) != 0) in match()
5712 if (Feptr != mb->start_subject) RRETURN(MATCH_NOMATCH); in match()
5720 if ((mb->moptions & PCRE2_NOTEOL) != 0) RRETURN(MATCH_NOMATCH); in match()
5721 if ((mb->poptions & PCRE2_DOLLAR_ENDONLY) == 0) goto ASSERT_NL_OR_EOS; in match()
5727 if (Feptr < mb->end_subject) RRETURN(MATCH_NOMATCH); in match()
5728 if (mb->partial != 0) in match()
5730 mb->hitend = TRUE; in match()
5731 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
5740 if (Feptr < mb->end_subject && in match()
5741 (!IS_NEWLINE(Feptr) || Feptr != mb->end_subject - mb->nllen)) in match()
5743 if (mb->partial != 0 && in match()
5744 Feptr + 1 >= mb->end_subject && in match()
5749 mb->hitend = TRUE; in match()
5750 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
5757 if (mb->partial != 0) in match()
5759 mb->hitend = TRUE; in match()
5760 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
5773 if ((mb->moptions & PCRE2_NOTBOL) != 0 && Feptr == mb->start_subject) in match()
5775 if (Feptr != mb->start_subject && in match()
5776 ((Feptr == mb->end_subject && in match()
5777 (mb->poptions & PCRE2_ALT_CIRCUMFLEX) == 0) || in match()
5787 if (Feptr < mb->end_subject) in match()
5791 if (mb->partial != 0 && in match()
5792 Feptr + 1 >= mb->end_subject && in match()
5797 mb->hitend = TRUE; in match()
5798 if (mb->partial > 1) return PCRE2_ERROR_PARTIAL; in match()
5805 if ((mb->moptions & PCRE2_NOTEOL) != 0) RRETURN(MATCH_NOMATCH); in match()
5816 if (Feptr != mb->start_subject + mb->start_offset) RRETURN(MATCH_NOMATCH); in match()
5839 if (Feptr == mb->check_subject) prev_is_word = FALSE; else in match()
5851 if (lastptr < mb->start_used_ptr) mb->start_used_ptr = lastptr; in match()
5853 if ((mb->poptions & PCRE2_UCP) != 0) in match()
5863 prev_is_word = CHMAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0; in match()
5868 if (Feptr >= mb->end_subject) in match()
5879 FORWARDCHARTEST(nextptr, mb->end_subject); in match()
5885 if (nextptr > mb->last_used_ptr) mb->last_used_ptr = nextptr; in match()
5887 if ((mb->poptions & PCRE2_UCP) != 0) in match()
5897 cur_is_word = CHMAX_255(fc) && (mb->ctypes[fc] & ctype_word) != 0; in match()
5913 Fmark = mb->nomatch_mark = Fecode + 2; in match()
5918 argument. It is passed back in mb->verb_skip_ptr. If it does match, we in match()
5919 return MATCH_SKIP with mb->verb_skip_ptr now pointing to the subject in match()
5924 PRIV(strcmp)(Fecode + 2, mb->verb_skip_ptr) == 0) in match()
5926 mb->verb_skip_ptr = Feptr; /* Pass back current position */ in match()
5934 /* Record the current recursing group number in mb->verb_current_recurse in match()
5941 mb->verb_current_recurse = Fcurrent_recurse; in match()
5945 Fmark = mb->nomatch_mark = Fecode + 2; in match()
5948 mb->verb_current_recurse = Fcurrent_recurse; in match()
5954 mb->verb_current_recurse = Fcurrent_recurse; in match()
5958 Fmark = mb->nomatch_mark = Fecode + 2; in match()
5961 mb->verb_current_recurse = Fcurrent_recurse; in match()
5967 mb->verb_skip_ptr = Feptr; /* Pass back current position */ in match()
5968 mb->verb_current_recurse = Fcurrent_recurse; in match()
5976 SKIP_ARG gets to top level, the match is re-run with mb->ignore_skip_arg in match()
5980 mb->skip_arg_count++; in match()
5981 if (mb->skip_arg_count <= mb->ignore_skip_arg) in match()
5991 top, where it causes a rematch with mb->ignore_skip_arg set to the value of in match()
5992 mb->skip_arg_count. */ in match()
5994 mb->verb_skip_ptr = Fecode + 2; in match()
5995 mb->verb_current_recurse = Fcurrent_recurse; in match()
6004 mb->verb_ecode_ptr = Fecode; in match()
6005 mb->verb_current_recurse = Fcurrent_recurse; in match()
6009 Fmark = mb->nomatch_mark = Fecode + 2; in match()
6012 mb->verb_ecode_ptr = Fecode; in match()
6013 mb->verb_current_recurse = Fcurrent_recurse; in match()
6042 if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr; in match()
6045 mb->cb->callout_flags |= PCRE2_CALLOUT_BACKTRACK; /* Note for callouts */ in match()
6155 /* We need to have mb as a pointer to a match block, because the IS_NEWLINE in pcre2_match()
6160 match_block *mb = &actual_match_block; in pcre2_match() local
6169 mb->stack_frames = (heapframe *)stack_frames_vector; in pcre2_match()
6234 mb->partial = ((options & PCRE2_PARTIAL_HARD) != 0)? 2 : in pcre2_match()
6240 if (mb->partial != 0 && in pcre2_match()
6370 mb->check_subject = subject; in pcre2_match()
6423 /* The mb->check_subject field points to the start of UTF checking; in pcre2_match()
6426 mb->check_subject = start_match; in pcre2_match()
6436 for (i = re->max_lookbehind; i > 0 && mb->check_subject > subject; i--) in pcre2_match()
6438 mb->check_subject--; in pcre2_match()
6439 while (mb->check_subject > subject && in pcre2_match()
6441 (*mb->check_subject & 0xc0) == 0x80) in pcre2_match()
6443 (*mb->check_subject & 0xfc00) == 0xdc00) in pcre2_match()
6445 mb->check_subject--; in pcre2_match()
6455 mb->check_subject -= re->max_lookbehind; in pcre2_match()
6457 mb->check_subject = subject; in pcre2_match()
6466 match_data->rc = PRIV(valid_utf)(mb->check_subject, in pcre2_match()
6467 length - (mb->check_subject - subject), &(match_data->startchar)); in pcre2_match()
6476 match_data->startchar += mb->check_subject - subject; in pcre2_match()
6487 mb->check_subject = end_subject + 1; in pcre2_match()
6489 while (mb->check_subject < start_match && NOT_FIRSTCU(*mb->check_subject)) in pcre2_match()
6490 mb->check_subject++; in pcre2_match()
6511 mb->memctl = re->memctl; in pcre2_match()
6513 else mb->memctl = mcontext->memctl; in pcre2_match()
6524 mb->cb = &cb; in pcre2_match()
6533 mb->callout = mcontext->callout; in pcre2_match()
6534 mb->callout_data = mcontext->callout_data; in pcre2_match()
6536 mb->start_subject = subject; in pcre2_match()
6537 mb->start_offset = start_offset; in pcre2_match()
6538 mb->end_subject = end_subject; in pcre2_match()
6539 mb->hasthen = (re->flags & PCRE2_HASTHEN) != 0; in pcre2_match()
6540 mb->allowemptypartial = (re->max_lookbehind > 0) || in pcre2_match()
6542 mb->poptions = re->overall_options; /* Pattern options */ in pcre2_match()
6543 mb->ignore_skip_arg = 0; in pcre2_match()
6544 mb->mark = mb->nomatch_mark = NULL; /* In case never set */ in pcre2_match()
6549 mb->name_table = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)); in pcre2_match()
6550 mb->name_count = re->name_count; in pcre2_match()
6551 mb->name_entry_size = re->name_entry_size; in pcre2_match()
6552 mb->start_code = mb->name_table + re->name_count * re->name_entry_size; in pcre2_match()
6556 mb->bsr_convention = re->bsr_convention; in pcre2_match()
6557 mb->nltype = NLTYPE_FIXED; in pcre2_match()
6561 mb->nllen = 1; in pcre2_match()
6562 mb->nl[0] = CHAR_CR; in pcre2_match()
6566 mb->nllen = 1; in pcre2_match()
6567 mb->nl[0] = CHAR_NL; in pcre2_match()
6571 mb->nllen = 1; in pcre2_match()
6572 mb->nl[0] = CHAR_NUL; in pcre2_match()
6576 mb->nllen = 2; in pcre2_match()
6577 mb->nl[0] = CHAR_CR; in pcre2_match()
6578 mb->nl[1] = CHAR_NL; in pcre2_match()
6582 mb->nltype = NLTYPE_ANY; in pcre2_match()
6586 mb->nltype = NLTYPE_ANYCRLF; in pcre2_match()
6597 mb->frame_vector_size is the total usable size of the vector (rounded down in pcre2_match()
6610 mb->heap_limit = (mcontext->heap_limit < re->limit_heap)? in pcre2_match()
6613 mb->match_limit = (mcontext->match_limit < re->limit_match)? in pcre2_match()
6616 mb->match_limit_depth = (mcontext->depth_limit < re->limit_depth)? in pcre2_match()
6626 mb->match_frames = mb->stack_frames; /* Initial frame vector on the stack */ in pcre2_match()
6627 mb->frame_vector_size = ((START_FRAMES_SIZE/frame_size) * frame_size); in pcre2_match()
6631 mb->frame_vector_size = frame_size * 10; in pcre2_match()
6632 if ((mb->frame_vector_size / 1024) > mb->heap_limit) in pcre2_match()
6634 if (frame_size > mb->heap_limit * 1024) return PCRE2_ERROR_HEAPLIMIT; in pcre2_match()
6635 mb->frame_vector_size = ((mb->heap_limit * 1024)/frame_size) * frame_size; in pcre2_match()
6637 mb->match_frames = mb->memctl.malloc(mb->frame_vector_size, in pcre2_match()
6638 mb->memctl.memory_data); in pcre2_match()
6639 if (mb->match_frames == NULL) return PCRE2_ERROR_NOMEMORY; in pcre2_match()
6642 mb->match_frames_top = in pcre2_match()
6643 (heapframe *)((char *)mb->match_frames + mb->frame_vector_size); in pcre2_match()
6648 memset((char *)(mb->match_frames) + offsetof(heapframe, ovector), 0xff, in pcre2_match()
6653 mb->lcc = re->tables + lcc_offset; in pcre2_match()
6654 mb->fcc = re->tables + fcc_offset; in pcre2_match()
6655 mb->ctypes = re->tables + ctypes_offset; in pcre2_match()
6666 first_cu2 = TABLE_GET(first_cu, mb->fcc, first_cu); in pcre2_match()
6688 req_cu2 = TABLE_GET(req_cu, mb->fcc, req_cu); in pcre2_match()
6710 mb->hitend = FALSE; in pcre2_match()
6858 if (mb->partial == 0 && start_match >= mb->end_subject) in pcre2_match()
6870 if (start_match > mb->start_subject + start_offset) in pcre2_match()
6891 (mb->nltype == NLTYPE_ANY || mb->nltype == NLTYPE_ANYCRLF) && in pcre2_match()
6917 if (mb->partial == 0 && start_match >= mb->end_subject) in pcre2_match()
6927 end_subject = mb->end_subject; in pcre2_match()
6931 if (mb->partial == 0) in pcre2_match()
7046 mb->start_used_ptr = start_match; in pcre2_match()
7047 mb->last_used_ptr = start_match; in pcre2_match()
7049 mb->moptions = options | fragment_options; in pcre2_match()
7051 mb->moptions = options; in pcre2_match()
7053 mb->match_call_count = 0; in pcre2_match()
7054 mb->end_offset_top = 0; in pcre2_match()
7055 mb->skip_arg_count = 0; in pcre2_match()
7057 rc = match(start_match, mb->start_code, match_data->ovector, in pcre2_match()
7058 match_data->oveccount, re->top_bracket, frame_size, mb); in pcre2_match()
7060 if (mb->hitend && start_partial == NULL) in pcre2_match()
7062 start_partial = mb->start_used_ptr; in pcre2_match()
7077 mb->ignore_skip_arg = mb->skip_arg_count; in pcre2_match()
7084 if (mb->verb_skip_ptr > start_match) in pcre2_match()
7086 new_start_match = mb->verb_skip_ptr; in pcre2_match()
7097 mb->ignore_skip_arg = 0; in pcre2_match()
7150 (mb->nltype == NLTYPE_ANY || in pcre2_match()
7151 mb->nltype == NLTYPE_ANYCRLF || in pcre2_match()
7152 mb->nllen == 2)) in pcre2_match()
7155 mb->mark = NULL; /* Reset for start of next match attempt */ in pcre2_match()
7212 mb->check_subject = start_match; in pcre2_match()
7220 mb->end_subject = end_subject = true_end_subject; in pcre2_match()
7230 mb->end_subject = end_subject = start_match + match_data->startchar; in pcre2_match()
7243 if (mb->match_frames != mb->stack_frames) in pcre2_match()
7244 mb->memctl.free(mb->match_frames, mb->memctl.memory_data); in pcre2_match()
7249 match_data->mark = mb->mark; in pcre2_match()
7259 match_data->rc = ((int)mb->end_offset_top >= 2 * match_data->oveccount)? in pcre2_match()
7260 0 : (int)mb->end_offset_top/2 + 1; in pcre2_match()
7262 match_data->leftchar = mb->start_used_ptr - subject; in pcre2_match()
7263 match_data->rightchar = ((mb->last_used_ptr > mb->end_match_ptr)? in pcre2_match()
7264 mb->last_used_ptr : mb->end_match_ptr) - subject; in pcre2_match()
7282 match_data->mark = mb->nomatch_mark; in pcre2_match()