80#define PSSTART start_subject
81#define PSEND end_subject
85#define PUBLIC_DFA_MATCH_OPTIONS \
86 (PCRE2_ANCHORED|PCRE2_ENDANCHORED|PCRE2_NOTBOL|PCRE2_NOTEOL|PCRE2_NOTEMPTY| \
87 PCRE2_NOTEMPTY_ATSTART|PCRE2_NO_UTF_CHECK|PCRE2_PARTIAL_HARD| \
88 PCRE2_PARTIAL_SOFT|PCRE2_DFA_SHORTEST|PCRE2_DFA_RESTART| \
89 PCRE2_COPY_MATCHED_SUBJECT)
101#define OP_PROP_EXTRA 300
102#define OP_EXTUNI_EXTRA 320
103#define OP_ANYNL_EXTRA 340
104#define OP_HSPACE_EXTRA 360
105#define OP_VSPACE_EXTRA 380
116static const uint8_t coptable[] = {
199static const uint8_t poptable[] = {
275static const uint8_t toptable1[] = {
283static const uint8_t toptable2[] = {
303#define INTS_PER_STATEBLOCK (int)(sizeof(stateblock)/sizeof(int))
317#define OVEC_UNIT (sizeof(PCRE2_SIZE)/sizeof(int))
319#define RWS_BASE_SIZE (DFA_START_RWS_SIZE/sizeof(int))
320#define RWS_RSIZE 1000
321#define RWS_OVEC_RSIZE (1000*OVEC_UNIT)
322#define RWS_OVEC_OSIZE (2*OVEC_UNIT)
332#define RWS_ANCHOR_SIZE (sizeof(RWS_anchor)/sizeof(int))
370cb->offset_vector = offsets;
373cb->pattern_position =
GET(code, 1 + extracode);
378 cb->callout_number = code[1 + 2*
LINK_SIZE + extracode];
379 cb->callout_string_offset = 0;
380 cb->callout_string =
NULL;
381 cb->callout_string_length = 0;
385 cb->callout_number = 0;
386 cb->callout_string_offset =
GET(code, 1 + 3*
LINK_SIZE + extracode);
387 cb->callout_string = code + (1 + 4*
LINK_SIZE + extracode) + 1;
388 cb->callout_string_length = *lengthptr - (1 + 4*
LINK_SIZE) - 2;
432 uint32_t newsizeK = newsize/(1024/
sizeof(int));
436 newsize = newsizeK*(1024/
sizeof(int));
483#define ADD_ACTIVE(x,y) \
484 if (active_count++ < wscount) \
486 next_active_state->offset = (x); \
487 next_active_state->count = (y); \
488 next_active_state++; \
490 else return PCRE2_ERROR_DFA_WSSIZE
492#define ADD_ACTIVE_DATA(x,y,z) \
493 if (active_count++ < wscount) \
495 next_active_state->offset = (x); \
496 next_active_state->count = (y); \
497 next_active_state->data = (z); \
498 next_active_state++; \
500 else return PCRE2_ERROR_DFA_WSSIZE
502#define ADD_NEW(x,y) \
503 if (new_count++ < wscount) \
505 next_new_state->offset = (x); \
506 next_new_state->count = (y); \
509 else return PCRE2_ERROR_DFA_WSSIZE
511#define ADD_NEW_DATA(x,y,z) \
512 if (new_count++ < wscount) \
514 next_new_state->offset = (x); \
515 next_new_state->count = (y); \
516 next_new_state->data = (z); \
519 else return PCRE2_ERROR_DFA_WSSIZE
530 uint32_t offsetcount,
536stateblock *active_states, *new_states, *temp_states;
537stateblock *next_active_state, *next_new_state;
538const uint8_t *ctypes, *lcc, *fcc;
542int active_count, new_count, match_count;
551#ifdef SUPPORT_UNICODE
562offsetcount &= (uint32_t)(-2);
575next_new_state = new_states = active_states + wscount;
591 end_code = this_start_code;
595 if (back > max_back) max_back = back;
596 end_code +=
GET(end_code, 1);
598 while (*end_code ==
OP_ALT);
603#ifdef SUPPORT_UNICODE
608 for (gone_back = 0; gone_back < max_back; gone_back++)
610 if (current_subject <= start_subject)
break;
612 ACROSSCHAR(current_subject > start_subject, current_subject,
622 size_t current_offset = (size_t)(current_subject - start_subject);
623 gone_back = (current_offset < max_back)? current_offset : max_back;
624 current_subject -= gone_back;
629 if (current_subject < mb->start_used_ptr)
635 end_code = this_start_code;
639 size_t back = (revlen == 0)? 0 : (size_t)
GET2(end_code, 2+
LINK_SIZE);
640 if (back <= gone_back)
642 int bstate = (int)(end_code - start_code + 1 +
LINK_SIZE + revlen);
645 end_code +=
GET(end_code, 1);
647 while (*end_code ==
OP_ALT);
658 end_code = this_start_code;
664 do { end_code +=
GET(end_code, 1); }
while (*end_code ==
OP_ALT);
665 new_count = workspace[1];
680 ADD_NEW((
int)(end_code - start_code + length), 0);
681 end_code +=
GET(end_code, 1);
684 while (*end_code ==
OP_ALT);
692ptr = current_subject;
700 BOOL could_continue = reset_could_continue;
701 reset_could_continue =
FALSE;
708 temp_states = active_states;
709 active_states = new_states;
710 new_states = temp_states;
711 active_count = new_count;
715 workspace[1] = active_count;
719 next_active_state = active_states + active_count;
720 next_new_state = new_states;
726 if (
ptr < end_subject)
729#ifdef SUPPORT_UNICODE
730 GETCHARLENTEST(c,
ptr, clen);
746 for (i = 0; i < active_count; i++)
748 stateblock *current_state = active_states + i;
752 int state_offset = current_state->
offset;
761 if (state_offset < 0)
763 if (current_state->
data > 0)
766 current_state->
data - 1);
767 if (could_continue) reset_could_continue =
TRUE;
772 current_state->
offset = state_offset = -state_offset;
780 for (
j = 0;
j < i;
j++)
782 if (active_states[
j].
offset == state_offset &&
784 goto NEXT_ACTIVE_STATE;
789 code = start_code + state_offset;
795 if (clen == 0 && poptable[codevalue] != 0)
796 could_continue =
TRUE;
809 if (coptable[codevalue] > 0)
812#ifdef SUPPORT_UNICODE
813 if (utf) {
GETCHARLEN(d, (code + coptable[codevalue]), dlen); }
else
815 d = code[coptable[codevalue]];
873 if (code != end_code)
883 if (
ptr > current_subject ||
888 if (match_count < 0) match_count = (offsetcount >= 2)? 1 : 0;
889 else if (match_count > 0 && ++match_count * 2 > (
int)offsetcount)
891 count = ((match_count == 0)? (int)offsetcount : match_count * 2) - 2;
894 if (offsetcount >= 2)
896 offsets[0] = (
PCRE2_SIZE)(current_subject - start_subject);
910 do { code +=
GET(code, 1); }
while (*code ==
OP_ALT);
920 code +=
GET(code, 1);
929 code +=
GET(code, 1);
933 code +=
GET(code, 1);
941 code += 1 +
GET(code, 2);
942 while (*code ==
OP_ALT) code +=
GET(code, 1);
948 code += 1 +
GET(code, 2);
949 while (*code ==
OP_ALT) code +=
GET(code, 1);
969 if (
ptr >= end_subject)
979 if (
ptr == start_subject) {
ADD_ACTIVE(state_offset + 1, 0); }
984 if (
ptr == start_subject + start_offset) {
ADD_ACTIVE(state_offset + 1, 0); }
1004 could_continue = partial_newline =
TRUE;
1016 {
ADD_NEW(state_offset + 1, 0); }
1034 could_continue =
TRUE;
1035 else if (clen == 0 ||
1048 reset_could_continue =
TRUE;
1051 else could_continue = partial_newline =
TRUE;
1061 could_continue =
TRUE;
1062 else if (clen == 0 ||
1073 reset_could_continue =
TRUE;
1076 else could_continue = partial_newline =
TRUE;
1088 if (clen > 0 && c < 256 &&
1089 ((ctypes[c] & toptable1[codevalue]) ^ toptable2[codevalue]) != 0)
1090 {
ADD_NEW(state_offset + 1, 0); }
1097 if (clen > 0 && (c >= 256 ||
1098 ((ctypes[c] & toptable1[codevalue]) ^ toptable2[codevalue]) != 0))
1099 {
ADD_NEW(state_offset + 1, 0); }
1108 int left_word, right_word;
1110 if (
ptr > start_subject)
1114#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
1115 if (utf) { BACKCHAR(temp); }
1118#ifdef SUPPORT_UNICODE
1123 int category =
PRIV(ucp_gentype)[chartype];
1124 left_word = (category ==
ucp_L || category ==
ucp_N ||
1129 left_word = d < 256 && (ctypes[d] &
ctype_word) != 0;
1131 else left_word =
FALSE;
1138#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
1139 if (utf) { FORWARDCHARTEST(temp, mb->
end_subject); }
1143#ifdef SUPPORT_UNICODE
1148 int category =
PRIV(ucp_gentype)[chartype];
1149 right_word = (category ==
ucp_L || category ==
ucp_N ||
1154 right_word = c < 256 && (ctypes[c] &
ctype_word) != 0;
1156 else right_word =
FALSE;
1158 if ((left_word == right_word) ==
1171#ifdef SUPPORT_UNICODE
1244#if PCRE2_CODE_UNIT_WIDTH == 32
1251 cp =
PRIV(ucd_caseless_sets) + code[2];
1255 if (c == *
cp++) {
OK =
TRUE;
break; }
1307 could_continue = partial_newline =
TRUE;
1312 ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
1317 next_active_state--;
1338 could_continue = partial_newline =
TRUE;
1343 ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
1348 next_active_state--;
1368 could_continue = partial_newline =
TRUE;
1373 ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
1378 next_active_state--;
1396 could_continue = partial_newline =
TRUE;
1401 ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
1425 could_continue = partial_newline =
TRUE;
1430 ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
1435 next_active_state--;
1451#ifdef SUPPORT_UNICODE
1526#if PCRE2_CODE_UNIT_WIDTH == 32
1533 cp =
PRIV(ucd_caseless_sets) + code[3];
1537 if (c == *
cp++) {
OK =
TRUE;
break; }
1568 next_active_state--;
1588 next_active_state--;
1628 next_active_state--;
1665 next_active_state--;
1698 next_active_state--;
1707#ifdef SUPPORT_UNICODE
1791#if PCRE2_CODE_UNIT_WIDTH == 32
1798 cp =
PRIV(ucd_caseless_sets) + code[3];
1802 if (c == *
cp++) {
OK =
TRUE;
break; }
1834 next_active_state--;
1863 next_active_state--;
1911 next_active_state--;
1955 next_active_state--;
1996 next_active_state--;
2004#ifdef SUPPORT_UNICODE
2082#if PCRE2_CODE_UNIT_WIDTH == 32
2093 if (c == *
cp++) {
OK =
TRUE;
break; }
2124 next_active_state--;
2149 next_active_state--;
2154 reset_could_continue =
TRUE;
2195 next_active_state--;
2235 next_active_state--;
2272 next_active_state--;
2290 if (clen > 0 && c == d) {
ADD_NEW(state_offset + dlen + 1, 0); }
2295 if (clen == 0)
break;
2297#ifdef SUPPORT_UNICODE
2300 if (c == d) {
ADD_NEW(state_offset + dlen + 1, 0); }
else
2302 unsigned int othercase;
2307 if (d == othercase) {
ADD_NEW(state_offset + dlen + 1, 0); }
2315 {
ADD_NEW(state_offset + 2, 0); }
2320#ifdef SUPPORT_UNICODE
2331 end_subject, utf, &ncount);
2333 reset_could_continue =
TRUE;
2345 if (clen > 0)
switch(c)
2362 if (
ptr + 1 >= end_subject)
2366 reset_could_continue =
TRUE;
2382 if (clen > 0)
switch(c)
2395 if (clen > 0)
switch(c)
2408 if (clen > 0)
switch(c)
2421 if (clen > 0)
switch(c)
2436 if (clen > 0 && c != d) {
ADD_NEW(state_offset + dlen + 1, 0); }
2446#ifdef SUPPORT_UNICODE
2447 if (utf_or_ucp && d >= 128)
2452 if (c != d && c != otherd)
2453 {
ADD_NEW(state_offset + dlen + 1, 0); }
2481#ifdef SUPPORT_UNICODE
2482 if (utf_or_ucp && d >= 128)
2488 if ((c == d || c == otherd) == (codevalue <
OP_NOTSTAR))
2494 next_active_state--;
2524#ifdef SUPPORT_UNICODE
2525 if (utf_or_ucp && d >= 128)
2531 if ((c == d || c == otherd) == (codevalue <
OP_NOTSTAR))
2536 next_active_state--;
2538 ADD_NEW(state_offset + dlen + 1, 0);
2565#ifdef SUPPORT_UNICODE
2566 if (utf_or_ucp && d >= 128)
2572 if ((c == d || c == otherd) == (codevalue <
OP_NOTSTAR))
2577 next_active_state--;
2598#ifdef SUPPORT_UNICODE
2599 if (utf_or_ucp && d >= 128)
2605 if ((c == d || c == otherd) == (codevalue <
OP_NOTSTAR))
2638#ifdef SUPPORT_UNICODE
2639 if (utf_or_ucp && d >= 128)
2645 if ((c == d || c == otherd) == (codevalue <
OP_NOTSTAR))
2650 next_active_state--;
2669 int next_state_offset;
2680 isinclass = (c > 255)? (codevalue ==
OP_NCLASS) :
2681 ((((uint8_t *)(code + 1))[c/8] & (1u << (c&7))) != 0);
2691 ecode = code +
GET(code, 1);
2699 next_state_offset = (int)(ecode - start_code);
2712 next_active_state--;
2728 next_active_state--;
2744 next_active_state--;
2746 ADD_NEW(next_state_offset + 1, 0);
2763 next_active_state--;
2774 if (isinclass) {
ADD_NEW(next_state_offset, 0); }
2796 int *local_workspace;
2804 if (rc != 0)
return rc;
2812 while (*endasscode ==
OP_ALT) endasscode +=
GET(endasscode, 1);
2814 rc = internal_dfa_match(
2838 int codelink = (int)
GET(code, 1);
2849 rrc = do_callout_dfa(code, offsets, current_subject,
ptr, mb,
2851 if (rrc < 0)
return rrc;
2853 code += callout_length;
2894 int *local_workspace;
2903 if (rc != 0)
return rc;
2911 while (*endasscode ==
OP_ALT) endasscode +=
GET(endasscode, 1);
2913 rc = internal_dfa_match(
2941 int *local_workspace;
2945 uint32_t recno = (callpat == mb->
start_code)? 0 :
2951 if (rc != 0)
return rc;
2967 if (recno == ri->group_num &&
ptr == ri->subject_position &&
2981 rc = internal_dfa_match(
3006 for (rc = rc*2 - 2; rc >= 0; rc -= 2)
3008 PCRE2_SIZE charcount = local_offsets[rc+1] - local_offsets[rc];
3009#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
3013 PCRE2_SPTR pp = start_subject + local_offsets[rc+1];
3014 while (
p < pp)
if (NOT_FIRSTCU(*
p++)) charcount--;
3020 (
int)(charcount - 1));
3040 int *local_workspace;
3050 if (rc != 0)
return rc;
3061 codevalue = *(++code);
3063 else allow_zero =
FALSE;
3068 for (matched_count = 0;; matched_count++)
3070 rc = internal_dfa_match(
3092 charcount = local_offsets[1] - local_offsets[0];
3093 if (charcount == 0)
break;
3094 local_ptr += charcount;
3103 if (matched_count > 0 || allow_zero)
3106 int next_state_offset;
3108 do { end_subpattern +=
GET(end_subpattern, 1); }
3109 while (*end_subpattern ==
OP_ALT);
3111 (int)(end_subpattern - start_code +
LINK_SIZE + 1);
3118 if (i + 1 >= active_count && new_count == 0)
3122 ADD_NEW(next_state_offset, 0);
3129#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
3130 if (utf)
while (
p < pp)
if (NOT_FIRSTCU(*
p++)) charcount--;
3132 ADD_NEW_DATA(-next_state_offset, 0, (
int)(charcount - 1));
3142 int *local_workspace;
3149 if (rc != 0)
return rc;
3157 rc = internal_dfa_match(
3174 PCRE2_SIZE charcount = local_offsets[1] - local_offsets[0];
3175 int next_state_offset, repeat_state_offset;
3177 do { end_subpattern +=
GET(end_subpattern, 1); }
3178 while (*end_subpattern ==
OP_ALT);
3180 (int)(end_subpattern - start_code +
LINK_SIZE + 1);
3186 repeat_state_offset = (*end_subpattern ==
OP_KETRMAX ||
3188 (
int)(end_subpattern - start_code -
GET(end_subpattern, 1)) : -1;
3205 else if (i + 1 >= active_count && new_count == 0)
3209 ADD_NEW(next_state_offset, 0);
3216 if (repeat_state_offset >= 0)
3218 next_active_state = active_states;
3226#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
3230 PCRE2_SPTR pp = start_subject + local_offsets[1];
3231 while (
p < pp)
if (NOT_FIRSTCU(*
p++)) charcount--;
3234 ADD_NEW_DATA(-next_state_offset, 0, (
int)(charcount - 1));
3235 if (repeat_state_offset >= 0)
3236 {
ADD_NEW_DATA(-repeat_state_offset, 0, (
int)(charcount - 1)); }
3251 rrc = do_callout_dfa(code, offsets, current_subject,
ptr, mb, 0,
3253 if (rrc < 0)
return rrc;
3255 {
ADD_ACTIVE(state_offset + (
int)callout_length, 0); }
3265 NEXT_ACTIVE_STATE:
continue;
3284 if (could_continue &&
3285 forced_fail != workspace[1] &&
3295 ptr >= end_subject &&
3314if (match_count >= 0 &&
3354int was_zero_terminated = 0;
3363BOOL utf, anchored, startline, firstline;
3367#if PCRE2_CODE_UNIT_WIDTH == 8
3377const uint8_t *start_bits =
NULL;
3404if (re ==
NULL || subject ==
NULL || workspace ==
NULL || match_data ==
NULL)
3410 was_zero_terminated = 1;
3450#define FF (PCRE2_NOTEMPTY_SET|PCRE2_NE_ATST_SET)
3451#define OO (PCRE2_NOTEMPTY|PCRE2_NOTEMPTY_ATSTART)
3461 if ((workspace[0] & (-2)) != 0 || workspace[1] < 1 ||
3469start_match = subject + start_offset;
3470end_subject = subject + length;
3471req_cu_ptr = start_match - 1;
3480bumpalong_limit = end_subject;
3487cb.subject = subject;
3488cb.subject_length = (
PCRE2_SIZE)(end_subject - subject);
3489cb.callout_flags = 0;
3498if (mcontext ==
NULL)
3512 bumpalong_limit = subject + mcontext->offset_limit;
3514 mb->
callout = mcontext->callout;
3516 mb->
memctl = mcontext->memctl;
3590#ifdef SUPPORT_UNICODE
3595 if (start_offset > 0)
3597#if PCRE2_CODE_UNIT_WIDTH != 32
3599 if (start_match < end_subject && NOT_FIRSTCU(*start_match))
3601 for (i = re->
max_lookbehind; i > 0 && check_subject > subject; i--)
3604 while (check_subject > subject &&
3605#
if PCRE2_CODE_UNIT_WIDTH == 8
3606 (*check_subject & 0xc0) == 0x80)
3608 (*check_subject & 0xfc00) == 0xdc00)
3614 if (check_subject < subject) check_subject = subject;
3622 length - (
PCRE2_SIZE)(check_subject - subject), &(match_data->startchar));
3623 if (match_data->rc != 0)
3625 match_data->startchar += (
PCRE2_SIZE)(check_subject - subject);
3626 return match_data->rc;
3636 has_first_cu =
TRUE;
3641#ifdef SUPPORT_UNICODE
3642#if PCRE2_CODE_UNIT_WIDTH == 8
3665#ifdef SUPPORT_UNICODE
3666#if PCRE2_CODE_UNIT_WIDTH == 8
3682 match_data->memctl.free((
void *)match_data->subject,
3683 match_data->memctl.memory_data);
3689match_data->code = re;
3690match_data->subject =
NULL;
3691match_data->mark =
NULL;
3722#ifdef SUPPORT_UNICODE
3728 ACROSSCHAR(t < end_subject, t, t++);
3733 while (t < end_subject && !
IS_NEWLINE(t)) t++;
3743 if (has_first_cu || start_bits !=
NULL)
3745 BOOL ok = start_match < end_subject;
3749 ok = has_first_cu && (c == first_cu || c == first_cu2);
3750 if (!ok && start_bits !=
NULL)
3752#if PCRE2_CODE_UNIT_WIDTH != 8
3753 if (c > 255) c = 255;
3755 ok = (start_bits[c/8] & (1u << (c&7))) != 0;
3768 if (first_cu != first_cu2)
3773#if PCRE2_CODE_UNIT_WIDTH != 8
3775 while (start_match < end_subject &&
3789 PCRE2_SIZE searchlength = end_subject - start_match;
3795 if (memchr_found_first_cu ==
NULL ||
3796 start_match > memchr_found_first_cu)
3798 pp1 = memchr(start_match, first_cu, searchlength);
3799 memchr_found_first_cu = (pp1 ==
NULL)? end_subject : pp1;
3805 else pp1 = (memchr_found_first_cu == end_subject)?
NULL :
3806 memchr_found_first_cu;
3810 if (memchr_found_first_cu2 ==
NULL ||
3811 start_match > memchr_found_first_cu2)
3813 pp2 = memchr(start_match, first_cu2, searchlength);
3814 memchr_found_first_cu2 = (pp2 ==
NULL)? end_subject : pp2;
3817 else pp2 = (memchr_found_first_cu2 == end_subject)?
NULL :
3818 memchr_found_first_cu2;
3824 start_match = (pp2 ==
NULL)? end_subject : pp2;
3826 start_match = (pp2 ==
NULL || pp1 < pp2)? pp1 : pp2;
3835#if PCRE2_CODE_UNIT_WIDTH != 8
3836 while (start_match < end_subject &&
UCHAR21TEST(start_match) !=
3840 start_match = memchr(start_match, first_cu, end_subject - start_match);
3841 if (start_match ==
NULL) start_match = end_subject;
3867#ifdef SUPPORT_UNICODE
3870 while (start_match < end_subject && !
WAS_NEWLINE(start_match))
3873 ACROSSCHAR(start_match < end_subject, start_match, start_match++);
3878 while (start_match < end_subject && !
WAS_NEWLINE(start_match))
3885 if (start_match[-1] ==
CHAR_CR &&
3887 start_match < end_subject &&
3898 else if (start_bits !=
NULL)
3900 while (start_match < end_subject)
3903#if PCRE2_CODE_UNIT_WIDTH != 8
3904 if (c > 255) c = 255;
3906 if ((start_bits[c/8] & (1u << (c&7))) != 0)
break;
3933 if (end_subject - start_match < re->minlength)
goto NOMATCH_EXIT;
3957 p = start_match + (has_first_cu? 1:0);
3958 if (has_req_cu &&
p > req_cu_ptr)
3960 PCRE2_SIZE check_length = end_subject - start_match;
3963 (!anchored && check_length <
REQ_CU_MAX * 1000))
3965 if (req_cu != req_cu2)
3967#if PCRE2_CODE_UNIT_WIDTH != 8
3968 while (
p < end_subject)
3971 if (pp == req_cu || pp == req_cu2) {
p--;
break; }
3975 p = memchr(pp, req_cu, end_subject - pp);
3978 p = memchr(pp, req_cu2, end_subject - pp);
3979 if (
p ==
NULL)
p = end_subject;
3988#if PCRE2_CODE_UNIT_WIDTH != 8
3989 while (
p < end_subject)
3995 p = memchr(
p, req_cu, end_subject -
p);
3996 if (
p ==
NULL)
p = end_subject;
4003 if (
p >= end_subject)
break;
4019 if (start_match > bumpalong_limit)
break;
4027 rc = internal_dfa_match(
4032 match_data->ovector,
4033 (uint32_t)match_data->oveccount * 2,
4037 base_recursion_workspace);
4046 match_data->ovector[0] = (
PCRE2_SIZE)(start_match - subject);
4047 match_data->ovector[1] = (
PCRE2_SIZE)(end_subject - subject);
4049 match_data->subject_length = length;
4052 match_data->startchar = (
PCRE2_SIZE)(start_match - subject);
4053 match_data->rc = rc;
4057 length =
CU2BYTES(length + was_zero_terminated);
4058 match_data->subject = match_data->memctl.malloc(length,
4059 match_data->memctl.memory_data);
4061 memcpy((
void *)match_data->subject, subject, length);
4074 if (firstline &&
IS_NEWLINE(start_match))
break;
4076#ifdef SUPPORT_UNICODE
4079 ACROSSCHAR(start_match < end_subject, start_match, start_match++);
4082 if (start_match > end_subject)
break;
4089 start_match < end_subject &&
count(Countable|array $value, int $mode=COUNT_NORMAL)
#define PCRE2_DOLLAR_ENDONLY
#define PCRE2_ZERO_TERMINATED
#define PCRE2_NOTEMPTY_ATSTART
#define PCRE2_ENDANCHORED
#define PCRE2_ERROR_BADMODE
#define PCRE2_ERROR_DFA_UINVALID_UTF
#define PCRE2_ERROR_DFA_UCOND
#define PCRE2_BSR_ANYCRLF
#define PCRE2_ERROR_HEAPLIMIT
#define PCRE2_ERROR_BADOPTION
#define PCRE2_ERROR_NOMATCH
#define PCRE2_ERROR_INTERNAL
#define PCRE2_ERROR_DFA_UITEM
#define PCRE2_MATCH_INVALID_UTF
#define PCRE2_NEWLINE_ANYCRLF
#define PCRE2_COPY_MATCHED_SUBJECT
#define PCRE2_ERROR_BADMAGIC
#define PCRE2_ERROR_BADOFFSET
#define PCRE2_ERROR_RECURSELOOP
#define PCRE2_ERROR_BADOFFSETLIMIT
#define PCRE2_PARTIAL_SOFT
#define PCRE2_ERROR_DFA_BADRESTART
#define PCRE2_PARTIAL_HARD
#define pcre2_match_context
#define PCRE2_ERROR_DEPTHLIMIT
#define PCRE2_DFA_RESTART
#define PCRE2_USE_OFFSET_LIMIT
#define PCRE2_ERROR_MATCHLIMIT
#define PCRE2_ERROR_DFA_RECURSE
#define PCRE2_ERROR_DFA_WSSIZE
#define PCRE2_CALL_CONVENTION
#define PCRE2_ALT_CIRCUMFLEX
#define PCRE2_NEWLINE_CRLF
#define PCRE2_NEWLINE_NUL
#define PCRE2_NO_UTF_CHECK
#define PCRE2_NO_START_OPTIMIZE
#define pcre2_callout_block
#define PCRE2_ERROR_PARTIAL
#define PCRE2_DFA_SHORTEST
#define PCRE2_NEWLINE_ANY
#define PCRE2_ERROR_BADUTFOFFSET
#define PCRE2_ERROR_NOMEMORY
#define INTS_PER_STATEBLOCK
#define PUBLIC_DFA_MATCH_OPTIONS
#define ADD_NEW_DATA(x, y, z)
PCRE2_SPTR PRIV extuni(uint32_t c, PCRE2_SPTR eptr, PCRE2_SPTR start_subject, PCRE2_SPTR end_subject, BOOL utf, int *xcount)
@ OP_NOT_UCP_WORD_BOUNDARY
#define PCRE2_FIRSTMAPSET
#define PCRE2_FIRSTCASELESS
#define CHAR_GRAVE_ACCENT
#define PCRE2_LASTCASELESS
#define MAX_UTF_CODE_POINT
#define CHAR_COMMERCIAL_AT
#define PCRE2_MD_COPIED_SUBJECT
@ PCRE2_MATCHEDBY_DFA_INTERPRETER
#define UCD_BIDICLASS(ch)
#define UCD_OTHERCASE(ch)
#define PCRE2_MATCH_EMPTY
#define UCD_SCRIPTX_PROP(prop)
#define UCD_BPROPS_PROP(prop)
#define UCHAR21TEST(eptr)
#define TABLE_GET(c, table, default)
#define UCHAR21INCTEST(eptr)
#define GETCHARLEN(c, eptr, len)
#define GETCHARTEST(c, eptr)
int PRIV valid_utf(PCRE2_SPTR string, PCRE2_SIZE length, PCRE2_SIZE *erroroffset)
BOOL PRIV xclass(uint32_t c, PCRE2_SPTR data, BOOL utf)
PHP_JSON_API size_t int options
int(* callout)(pcre2_callout_block *, void *)
dfa_recursion_info * recursive
PCRE2_SPTR start_used_ptr
uint32_t match_call_count
uint32_t match_limit_depth
PCRE2_SPTR subject_position
struct dfa_recursion_info * prevrec
void *(* malloc)(size_t, void *)
void(* free)(void *, void *)
uint16_t newline_convention
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)