80 #define PSSTART start_subject
81 #define PSEND end_subject
100 #define OP_PROP_EXTRA 300
101 #define OP_EXTUNI_EXTRA 320
102 #define OP_ANYNL_EXTRA 340
103 #define OP_HSPACE_EXTRA 360
104 #define OP_VSPACE_EXTRA 380
290 #define INTS_PER_STATEBLOCK (int)(sizeof(stateblock)/sizeof(int))
317 fprintf(
f,
"\\x{%02x}", c);
352 #define ADD_ACTIVE(x,y) \
353 if (active_count++ < wscount) \
355 next_active_state->offset = (x); \
356 next_active_state->count = (y); \
357 next_active_state++; \
358 DPRINTF(("%.*sADD_ACTIVE(%d,%d)\n", rlevel*2-2, SP, (x), (y))); \
360 else return PCRE_ERROR_DFA_WSSIZE
362 #define ADD_ACTIVE_DATA(x,y,z) \
363 if (active_count++ < wscount) \
365 next_active_state->offset = (x); \
366 next_active_state->count = (y); \
367 next_active_state->data = (z); \
368 next_active_state++; \
369 DPRINTF(("%.*sADD_ACTIVE_DATA(%d,%d,%d)\n", rlevel*2-2, SP, (x), (y), (z))); \
371 else return PCRE_ERROR_DFA_WSSIZE
373 #define ADD_NEW(x,y) \
374 if (new_count++ < wscount) \
376 next_new_state->offset = (x); \
377 next_new_state->count = (y); \
379 DPRINTF(("%.*sADD_NEW(%d,%d)\n", rlevel*2-2, SP, (x), (y))); \
381 else return PCRE_ERROR_DFA_WSSIZE
383 #define ADD_NEW_DATA(x,y,z) \
384 if (new_count++ < wscount) \
386 next_new_state->offset = (x); \
387 next_new_state->count = (y); \
388 next_new_state->data = (z); \
390 DPRINTF(("%.*sADD_NEW_DATA(%d,%d,%d) line %d\n", rlevel*2-2, SP, \
391 (x), (y), (z), __LINE__)); \
393 else return PCRE_ERROR_DFA_WSSIZE
409 stateblock *active_states, *new_states, *temp_states;
410 stateblock *next_active_state, *next_new_state;
418 int active_count, new_count, match_count;
442 DPRINTF((
"\n%.*s---------------------\n"
443 "%.*sCall to internal_dfa_exec f=%d\n",
444 rlevel*2-2,
SP, rlevel*2-2,
SP, rlevel));
452 active_states = (
stateblock *)(workspace + 2);
453 next_new_state = new_states = active_states + wscount;
456 first_op = this_start_code + 1 +
LINK_SIZE +
475 end_code = this_start_code;
479 if (back > max_back) max_back = back;
480 end_code += GET(end_code, 1);
482 while (*end_code ==
OP_ALT);
492 for (gone_back = 0; gone_back < max_back; gone_back++)
494 if (current_subject <= start_subject)
break;
496 ACROSSCHAR(current_subject > start_subject, *current_subject, current_subject--);
505 gone_back = (current_subject - max_back < start_subject)?
506 (
int)(current_subject - start_subject) : max_back;
507 current_subject -= gone_back;
512 if (current_subject < md->start_used_ptr)
513 md->start_used_ptr = current_subject;
517 end_code = this_start_code;
521 if (back <= gone_back)
523 int bstate = (
int)(end_code - start_code + 2 + 2*
LINK_SIZE);
526 end_code += GET(end_code, 1);
528 while (*end_code ==
OP_ALT);
539 end_code = this_start_code;
545 do { end_code += GET(end_code, 1); }
while (*end_code ==
OP_ALT);
546 new_count = workspace[1];
548 memcpy(new_states, active_states, new_count *
sizeof(
stateblock));
561 ADD_NEW((
int)(end_code - start_code + length), 0);
562 end_code += GET(end_code, 1);
565 while (*end_code ==
OP_ALT);
571 DPRINTF((
"%.*sEnd state = %d\n", rlevel*2-2,
SP, (
int)(end_code - start_code)));
575 ptr = current_subject;
583 BOOL could_continue = reset_could_continue;
584 reset_could_continue =
FALSE;
589 temp_states = active_states;
590 active_states = new_states;
591 new_states = temp_states;
592 active_count = new_count;
596 workspace[1] = active_count;
599 printf(
"%.*sNext character: rest of subject = \"", rlevel*2-2,
SP);
603 printf(
"%.*sActive states: ", rlevel*2-2,
SP);
604 for (
i = 0;
i < active_count;
i++)
605 printf(
"%d/%d ", active_states[
i].
offset, active_states[
i].count);
611 next_active_state = active_states + active_count;
612 next_new_state = new_states;
618 if (ptr < end_subject)
622 GETCHARLENTEST(c, ptr, clen);
638 for (
i = 0;
i < active_count;
i++)
643 int state_offset = current_state->
offset;
648 printf (
"%.*sProcessing state %d c=", rlevel*2-2,
SP, state_offset);
649 if (clen == 0) printf(
"EOL\n");
650 else if (c > 32 && c < 127) printf(
"'%c'\n", c);
651 else printf(
"0x%02x\n", c);
659 if (state_offset < 0)
661 if (current_state->
data > 0)
663 DPRINTF((
"%.*sSkipping this character\n", rlevel*2-2,
SP));
665 current_state->
data - 1);
666 if (could_continue) reset_could_continue =
TRUE;
671 current_state->
offset = state_offset = -state_offset;
679 for (j = 0; j <
i; j++)
681 if (active_states[j].
offset == state_offset &&
682 active_states[j].count == current_state->
count)
684 DPRINTF((
"%.*sDuplicate state: skipped\n", rlevel*2-2,
SP));
685 goto NEXT_ACTIVE_STATE;
691 code = start_code + state_offset;
697 if (clen == 0 &&
poptable[codevalue] != 0)
698 could_continue =
TRUE;
775 if (
code != end_code)
785 if (ptr > current_subject ||
788 current_subject > start_subject +
md->start_offset)))
790 if (match_count < 0) match_count = (offsetcount >= 2)? 1 : 0;
791 else if (match_count > 0 && ++match_count * 2 > offsetcount)
793 count = ((match_count == 0)? offsetcount : match_count * 2) - 2;
794 if (count > 0)
memmove(offsets + 2, offsets, count *
sizeof(
int));
795 if (offsetcount >= 2)
797 offsets[0] = (
int)(current_subject - start_subject);
798 offsets[1] = (
int)(ptr - start_subject);
799 DPRINTF((
"%.*sSet matched string = \"%.*s\"\n", rlevel*2-2,
SP,
800 offsets[1] - offsets[0], (
char *)current_subject));
804 DPRINTF((
"%.*sEnd of internal_dfa_exec %d: returning %d\n"
805 "%.*s---------------------\n\n", rlevel*2-2,
SP, rlevel,
806 match_count, rlevel*2-2,
SP));
864 if (ptr == start_subject && (
md->moptions &
PCRE_NOTBOL) == 0)
870 if ((ptr == start_subject && (
md->moptions &
PCRE_NOTBOL) == 0) ||
877 if (ptr >= end_subject)
880 could_continue =
TRUE;
887 if (ptr == start_subject) {
ADD_ACTIVE(state_offset + 1, 0); }
892 if (ptr == start_subject + start_offset) {
ADD_ACTIVE(state_offset + 1, 0); }
906 if (ptr + 1 >=
md->end_subject &&
912 could_continue = partial_newline =
TRUE;
924 {
ADD_NEW(state_offset + 1, 0); }
930 could_continue =
TRUE;
931 else if (clen == 0 || (
IS_NEWLINE(ptr) && ptr == end_subject -
md->nllen))
940 could_continue =
TRUE;
941 else if (clen == 0 ||
943 (ptr == end_subject -
md->nllen)
946 else if (ptr + 1 >=
md->end_subject &&
954 reset_could_continue =
TRUE;
957 else could_continue = partial_newline =
TRUE;
967 could_continue =
TRUE;
968 else if (clen == 0 ||
971 else if (ptr + 1 >=
md->end_subject &&
979 reset_could_continue =
TRUE;
982 else could_continue = partial_newline =
TRUE;
994 if (clen > 0 && c < 256 &&
996 {
ADD_NEW(state_offset + 1, 0); }
1003 if (clen > 0 && (c >= 256 ||
1005 {
ADD_NEW(state_offset + 1, 0); }
1012 int left_word, right_word;
1014 if (ptr > start_subject)
1017 if (temp < md->start_used_ptr)
md->start_used_ptr = temp;
1018 #if defined SUPPORT_UTF && !defined COMPILE_PCRE32
1019 if (utf) { BACKCHAR(temp); }
1025 if (d ==
'_') left_word =
TRUE;
else
1027 int cat = UCD_CATEGORY(d);
1033 left_word = d < 256 && (ctypes[d] &
ctype_word) != 0;
1035 else left_word =
FALSE;
1042 if (c ==
'_') right_word =
TRUE;
else
1044 int cat = UCD_CATEGORY(c);
1050 right_word = c < 256 && (ctypes[c] &
ctype_word) != 0;
1052 else right_word =
FALSE;
1071 const pcre_uint32 *cp;
1129 cp =
PRIV(ucd_caseless_sets) +
code[2];
1132 if (c < *cp) { OK =
FALSE;
break; }
1133 if (c == *cp++) { OK =
TRUE;
break; }
1150 if (OK == (codevalue ==
OP_PROP)) {
ADD_NEW(state_offset + 3, 0); }
1166 count = current_state->
count;
1167 if (count > 0) {
ADD_ACTIVE(state_offset + 2, 0); }
1170 if (d ==
OP_ANY && ptr + 1 >=
md->end_subject &&
1176 could_continue = partial_newline =
TRUE;
1186 next_active_state--;
1201 if (d ==
OP_ANY && ptr + 1 >=
md->end_subject &&
1207 could_continue = partial_newline =
TRUE;
1217 next_active_state--;
1231 if (d ==
OP_ANY && ptr + 1 >=
md->end_subject &&
1237 could_continue = partial_newline =
TRUE;
1247 next_active_state--;
1256 count = current_state->
count;
1259 if (d ==
OP_ANY && ptr + 1 >=
md->end_subject &&
1265 could_continue = partial_newline =
TRUE;
1275 {
ADD_NEW(state_offset, count); }
1285 count = current_state->
count;
1288 if (d ==
OP_ANY && ptr + 1 >=
md->end_subject &&
1294 could_continue = partial_newline =
TRUE;
1304 next_active_state--;
1309 {
ADD_NEW(state_offset, count); }
1324 count = current_state->
count;
1325 if (count > 0) {
ADD_ACTIVE(state_offset + 4, 0); }
1329 const pcre_uint32 *cp;
1387 cp =
PRIV(ucd_caseless_sets) +
code[3];
1390 if (c < *cp) { OK =
FALSE;
break; }
1391 if (c == *cp++) { OK =
TRUE;
break; }
1413 next_active_state--;
1425 count = current_state->
count;
1426 if (count > 0) {
ADD_ACTIVE(state_offset + 2, 0); }
1435 next_active_state--;
1437 lgb = UCD_GRAPHBREAK(c);
1438 while (nptr < end_subject)
1441 if (!utf) d = *nptr;
else {
GETCHARLEN(d, nptr, dlen); }
1442 rgb = UCD_GRAPHBREAK(d);
1443 if ((
PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0)
break;
1458 count = current_state->
count;
1459 if (count > 0) {
ADD_ACTIVE(state_offset + 2, 0); }
1484 next_active_state--;
1500 count = current_state->
count;
1501 if (count > 0) {
ADD_ACTIVE(state_offset + 2, 0); }
1521 next_active_state--;
1533 count = current_state->
count;
1534 if (count > 0) {
ADD_ACTIVE(state_offset + 2, 0); }
1554 next_active_state--;
1581 const pcre_uint32 *cp;
1639 cp =
PRIV(ucd_caseless_sets) +
code[3];
1642 if (c < *cp) { OK =
FALSE;
break; }
1643 if (c == *cp++) { OK =
TRUE;
break; }
1666 next_active_state--;
1668 ADD_NEW(state_offset + count, 0);
1697 next_active_state--;
1699 lgb = UCD_GRAPHBREAK(c);
1700 while (nptr < end_subject)
1703 if (!utf) d = *nptr;
else {
GETCHARLEN(d, nptr, dlen); }
1704 rgb = UCD_GRAPHBREAK(d);
1705 if ((
PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0)
break;
1754 next_active_state--;
1798 next_active_state--;
1839 next_active_state--;
1854 count = current_state->
count;
1858 const pcre_uint32 *cp;
1919 if (c < *cp) { OK =
FALSE;
break; }
1920 if (c == *cp++) { OK =
TRUE;
break; }
1942 next_active_state--;
1947 {
ADD_NEW(state_offset, count); }
1959 count = current_state->
count;
1968 next_active_state--;
1970 lgb = UCD_GRAPHBREAK(c);
1971 while (nptr < end_subject)
1974 if (!utf) d = *nptr;
else {
GETCHARLEN(d, nptr, dlen); }
1975 rgb = UCD_GRAPHBREAK(d);
1976 if ((
PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0)
break;
1982 reset_could_continue =
TRUE;
1998 count = current_state->
count;
2023 next_active_state--;
2044 count = current_state->
count;
2063 next_active_state--;
2080 count = current_state->
count;
2100 next_active_state--;
2118 if (clen > 0 && c == d) {
ADD_NEW(state_offset + dlen + 1, 0); }
2123 if (clen == 0)
break;
2128 if (c == d) {
ADD_NEW(state_offset + dlen + 1, 0); }
else
2130 unsigned int othercase;
2137 othercase = UCD_OTHERCASE(c);
2142 if (d == othercase) {
ADD_NEW(state_offset + dlen + 1, 0); }
2150 {
ADD_NEW(state_offset + 2, 0); }
2167 lgb = UCD_GRAPHBREAK(c);
2168 while (nptr < end_subject)
2171 if (!utf) d = *nptr;
else {
GETCHARLEN(d, nptr, dlen); }
2172 rgb = UCD_GRAPHBREAK(d);
2173 if ((
PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0)
break;
2179 reset_could_continue =
TRUE;
2191 if (clen > 0)
switch(c)
2207 if (ptr + 1 >= end_subject)
2211 reset_could_continue =
TRUE;
2227 if (clen > 0)
switch(c)
2240 if (clen > 0)
switch(c)
2253 if (clen > 0)
switch(c)
2266 if (clen > 0)
switch(c)
2281 if (clen > 0 && c != d) {
ADD_NEW(state_offset + dlen + 1, 0); }
2292 if (utf && d >= 128)
2295 otherd = UCD_OTHERCASE(d);
2303 if (c != d && c != otherd)
2304 {
ADD_NEW(state_offset + dlen + 1, 0); }
2325 count = current_state->
count;
2326 if (count > 0) {
ADD_ACTIVE(state_offset + dlen + 1, 0); }
2333 if (utf && d >= 128)
2336 otherd = UCD_OTHERCASE(d);
2343 if ((c == d || c == otherd) == (codevalue <
OP_NOTSTAR))
2349 next_active_state--;
2380 if (utf && d >= 128)
2383 otherd = UCD_OTHERCASE(d);
2390 if ((c == d || c == otherd) == (codevalue <
OP_NOTSTAR))
2395 next_active_state--;
2397 ADD_NEW(state_offset + dlen + 1, 0);
2425 if (utf && d >= 128)
2428 otherd = UCD_OTHERCASE(d);
2435 if ((c == d || c == otherd) == (codevalue <
OP_NOTSTAR))
2440 next_active_state--;
2455 count = current_state->
count;
2462 if (utf && d >= 128)
2465 otherd = UCD_OTHERCASE(d);
2472 if ((c == d || c == otherd) == (codevalue <
OP_NOTSTAR))
2477 {
ADD_NEW(state_offset, count); }
2499 count = current_state->
count;
2506 if (utf && d >= 128)
2509 otherd = UCD_OTHERCASE(d);
2516 if ((c == d || c == otherd) == (codevalue <
OP_NOTSTAR))
2521 next_active_state--;
2526 {
ADD_NEW(state_offset, count); }
2540 int next_state_offset;
2551 isinclass = (c > 255)? (codevalue ==
OP_NCLASS) :
2570 next_state_offset = (
int)(ecode - start_code);
2583 next_active_state--;
2592 count = current_state->
count;
2593 if (count > 0) {
ADD_ACTIVE(next_state_offset + 1, 0); }
2599 next_active_state--;
2615 next_active_state--;
2617 ADD_NEW(next_state_offset + 1, 0);
2624 count = current_state->
count;
2625 if (count >= (
int)
GET2(ecode, 1))
2633 next_active_state--;
2635 if (++count >=
max &&
max != 0)
2638 {
ADD_NEW(state_offset, count); }
2643 if (isinclass) {
ADD_NEW(next_state_offset, 0); }
2665 int local_offsets[2];
2666 int local_workspace[1000];
2669 while (*endasscode ==
OP_ALT) endasscode += GET(endasscode, 1);
2675 (
int)(ptr - start_subject),
2677 sizeof(local_offsets)/
sizeof(
int),
2679 sizeof(local_workspace)/
sizeof(
int),
2692 int local_offsets[1000];
2693 int local_workspace[1000];
2694 int codelink = GET(
code, 1);
2706 PUBL(callout_block) cb;
2709 cb.offset_vector = offsets;
2710 #if defined COMPILE_PCRE8
2712 #elif defined COMPILE_PCRE16
2714 #elif defined COMPILE_PCRE32
2717 cb.subject_length = (
int)(end_subject - start_subject);
2718 cb.start_match = (
int)(current_subject - start_subject);
2719 cb.current_position = (
int)(ptr - start_subject);
2723 cb.capture_last = -1;
2724 cb.callout_data =
md->callout_data;
2726 if ((rrc = (*
PUBL(
callout))(&cb)) < 0)
return rrc;
2755 if (
md->recursive !=
NULL)
2766 const pcre_uchar *endasscode = asscode + GET(asscode, 1);
2768 while (*endasscode ==
OP_ALT) endasscode += GET(endasscode, 1);
2774 (
int)(ptr - start_subject),
2776 sizeof(local_offsets)/
sizeof(
int),
2778 sizeof(local_workspace)/
sizeof(
int),
2795 int local_offsets[1000];
2796 int local_workspace[1000];
2798 int recno = (callpat ==
md->start_code)? 0 :
2802 DPRINTF((
"%.*sStarting regex recursion\n", rlevel*2-2,
SP));
2818 md->recursive = &new_recursive;
2824 (
int)(ptr - start_subject),
2826 sizeof(local_offsets)/
sizeof(
int),
2828 sizeof(local_workspace)/
sizeof(
int),
2833 DPRINTF((
"%.*sReturn from regex recursion: rc=%d\n", rlevel*2-2,
SP,
2846 for (rc = rc*2 - 2; rc >= 0; rc -= 2)
2848 int charcount = local_offsets[rc+1] - local_offsets[rc];
2849 #if defined SUPPORT_UTF && !defined COMPILE_PCRE32
2852 const pcre_uchar *p = start_subject + local_offsets[rc];
2853 const pcre_uchar *pp = start_subject + local_offsets[rc+1];
2854 while (p < pp)
if (NOT_FIRSTCHAR(*p++)) charcount--;
2878 int charcount, matched_count;
2885 codevalue = *(++
code);
2892 for (matched_count = 0;; matched_count++)
2894 int local_offsets[2];
2895 int local_workspace[1000];
2901 (
int)(ptr - start_subject),
2903 sizeof(local_offsets)/
sizeof(
int),
2905 sizeof(local_workspace)/
sizeof(
int),
2918 charcount = local_offsets[1] - local_offsets[0];
2919 if (charcount == 0)
break;
2920 local_ptr += charcount;
2930 int next_state_offset;
2932 do { end_subpattern += GET(end_subpattern, 1); }
2933 while (*end_subpattern ==
OP_ALT);
2942 if (
i + 1 >= active_count && new_count == 0)
2946 ADD_NEW(next_state_offset, 0);
2952 charcount = (
int)(pp - p);
2953 #if defined SUPPORT_UTF && !defined COMPILE_PCRE32
2954 if (utf)
while (p < pp)
if (NOT_FIRSTCHAR(*p++)) charcount--;
2966 int local_offsets[2];
2967 int local_workspace[1000];
2973 (
int)(ptr - start_subject),
2975 sizeof(local_offsets)/
sizeof(
int),
2977 sizeof(local_workspace)/
sizeof(
int),
2983 int charcount = local_offsets[1] - local_offsets[0];
2984 int next_state_offset, repeat_state_offset;
2986 do { end_subpattern += GET(end_subpattern, 1); }
2987 while (*end_subpattern ==
OP_ALT);
2995 repeat_state_offset = (*end_subpattern ==
OP_KETRMAX ||
2997 (
int)(end_subpattern - start_code - GET(end_subpattern, 1)) : -1;
3014 else if (
i + 1 >= active_count && new_count == 0)
3018 ADD_NEW(next_state_offset, 0);
3025 if (repeat_state_offset >= 0)
3027 next_active_state = active_states;
3035 #if defined SUPPORT_UTF && !defined COMPILE_PCRE32
3038 const pcre_uchar *p = start_subject + local_offsets[0];
3039 const pcre_uchar *pp = start_subject + local_offsets[1];
3040 while (p < pp)
if (NOT_FIRSTCHAR(*p++)) charcount--;
3044 if (repeat_state_offset >= 0)
3045 {
ADD_NEW_DATA(-repeat_state_offset, 0, (charcount - 1)); }
3060 PUBL(callout_block) cb;
3062 cb.callout_number =
code[1];
3063 cb.offset_vector = offsets;
3064 #if defined COMPILE_PCRE8
3066 #elif defined COMPILE_PCRE16
3068 #elif defined COMPILE_PCRE32
3071 cb.subject_length = (
int)(end_subject - start_subject);
3072 cb.start_match = (
int)(current_subject - start_subject);
3073 cb.current_position = (
int)(ptr - start_subject);
3074 cb.pattern_position = GET(
code, 2);
3077 cb.capture_last = -1;
3078 cb.callout_data =
md->callout_data;
3080 if ((rrc = (*
PUBL(
callout))(&cb)) < 0)
return rrc;
3092 NEXT_ACTIVE_STATE:
continue;
3113 forced_fail != workspace[1] &&
3123 ptr >= end_subject &&
3124 ptr >
md->start_used_ptr)
3128 DPRINTF((
"%.*sEnd of internal_dfa_exec %d: returning %d\n"
3129 "%.*s---------------------\n\n", rlevel*2-2,
SP, rlevel, match_count,
3177 #if defined COMPILE_PCRE8
3180 const char *
subject,
int length,
int start_offset,
int options,
int *offsets,
3181 int offsetcount,
int *workspace,
int wscount)
3182 #elif defined COMPILE_PCRE16
3186 int offsetcount,
int *workspace,
int wscount)
3187 #elif defined COMPILE_PCRE32
3191 int offsetcount,
int *workspace,
int wscount)
3197 BOOL utf, anchored, startline, firstline;
3198 const pcre_uchar *current_subject, *end_subject;
3236 if ((workspace[0] & (-2)) != 0 || workspace[1] < 1 ||
3243 md->tables = re->tables;
3246 if (extra_data !=
NULL)
3264 req_char_ptr = current_subject - 1;
3281 md->end_subject = end_subject;
3282 md->start_offset = start_offset;
3283 md->moptions = options;
3284 md->poptions = re->options;
3301 switch ((((options &
PCRE_NEWLINE_BITS) == 0)? re->options : (pcre_uint32)options) &
3348 if (offsetcount >= 2)
3350 offsets[0] = erroroffset;
3351 offsets[1] = errorcode;
3353 #if defined COMPILE_PCRE8
3356 #elif defined COMPILE_PCRE16
3359 #elif defined COMPILE_PCRE32
3363 #if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
3364 if (start_offset > 0 && start_offset < length &&
3375 if (
md->tables ==
NULL)
md->tables =
PRIV(default_tables);
3393 has_first_char =
TRUE;
3394 first_char = first_char2 = (
pcre_uchar)(re->first_char);
3398 #if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
3399 if (utf && first_char > 127)
3400 first_char2 = UCD_OTHERCASE(first_char);
3406 if (!startline && study !=
NULL &&
3417 has_req_char =
TRUE;
3418 req_char = req_char2 = (
pcre_uchar)(re->req_char);
3422 #if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
3423 if (utf && req_char > 127)
3424 req_char2 = UCD_OTHERCASE(req_char);
3439 const pcre_uchar *save_end_subject = end_subject;
3455 ACROSSCHAR(
t < end_subject, *
t,
t++);
3476 if (first_char != first_char2)
3479 while (current_subject < end_subject &&
3480 (csc =
UCHAR21TEST(current_subject)) != first_char && csc != first_char2)
3484 while (current_subject < end_subject &&
3493 if (current_subject >
md->start_subject + start_offset)
3498 while (current_subject < end_subject &&
3502 ACROSSCHAR(current_subject < end_subject, *current_subject,
3508 while (current_subject < end_subject && !
WAS_NEWLINE(current_subject))
3517 current_subject < end_subject &&
3525 else if (start_bits !=
NULL)
3527 while (current_subject < end_subject)
3529 register pcre_uint32 c =
UCHAR21TEST(current_subject);
3530 #ifndef COMPILE_PCRE8
3531 if (c > 255) c = 255;
3533 if ((start_bits[c/8] & (1 << (c&7))) != 0)
break;
3541 end_subject = save_end_subject;
3557 (pcre_uint32)(end_subject - current_subject) < study->
minlength)
3573 if (has_req_char && end_subject - current_subject <
REQ_BYTE_MAX)
3575 register PCRE_PUCHAR p = current_subject + (has_first_char? 1:0);
3580 if (p > req_char_ptr)
3582 if (req_char != req_char2)
3584 while (p < end_subject)
3587 if (pp == req_char || pp == req_char2) { p--;
break; }
3592 while (p < end_subject)
3601 if (p >= end_subject)
break;
3615 md->start_used_ptr = current_subject;
3638 if (offsetcount > 2)
3647 if (firstline &&
IS_NEWLINE(current_subject))
break;
3652 ACROSSCHAR(current_subject < end_subject, *current_subject,
3656 if (current_subject > end_subject)
break;
3663 current_subject < end_subject &&
unsigned int
A callback function used to compare two keys in a database.
if(yy_accept[yy_current_state])
double f(double x_, const double &y_)
#define PCRE_ERROR_BADUTF8_OFFSET
#define PCRE_NO_UTF8_CHECK
#define PCRE_ERROR_PARTIAL
#define PCRE_EXTRA_CALLOUT_DATA
#define PCRE_ERROR_DFA_UMLIMIT
#define PCRE_ERROR_BADMODE
#define PCRE_ERROR_BADNEWLINE
#define PCRE_ERROR_DFA_BADRESTART
#define PCRE_EXTRA_STUDY_DATA
#define PCRE_ERROR_BADOPTION
#define PCRE_ERROR_SHORTUTF8
#define PCRE_EXTRA_MATCH_LIMIT
#define PCRE_EXTRA_TABLES
#define PCRE_DFA_SHORTEST
#define PCRE_ERROR_BADMAGIC
#define PCRE_ERROR_BADENDIANNESS
#define PCRE_ERROR_DFA_WSSIZE
#define PCRE_ERROR_DFA_UITEM
#define PCRE_PARTIAL_SOFT
#define PCRE_ERROR_BADCOUNT
#define PCRE_ERROR_BADUTF32
#define PCRE_NO_START_OPTIMIZE
#define PCRE_ERROR_BADUTF16
#define PCRE_ERROR_RECURSELOOP
#define PCRE_ERROR_DFA_UCOND
int pcre32_dfa_exec(const pcre32 *, const pcre32_extra *, const unsigned int *, int, int, int, int *, int, int *, int)
#define PCRE_ERROR_BADLENGTH
#define PCRE_ERROR_DFA_RECURSE
#define PCRE_ERROR_BADOFFSET
#define PCRE_EXTRA_MATCH_LIMIT_RECURSION
#define PCRE_ERROR_NOMATCH
#define PCRE_DOLLAR_ENDONLY
#define PCRE_PARTIAL_HARD
#define PCRE_NEWLINE_ANYCRLF
#define PCRE_ERROR_BADUTF8
#define PCRE_ERROR_SHORTUTF16
#define PCRE_NOTEMPTY_ATSTART
int pcre16_dfa_exec(const pcre16 *, const pcre16_extra *, const unsigned short *, int, int, int, int *, int, int *, int)
static const pcre_uint8 coptable[]
int pcre_dfa_exec(const pcre *argument_re, const pcre_extra *extra_data, const char *subject, int length, int start_offset, int options, int *offsets, int offsetcount, int *workspace, int wscount)
static int internal_dfa_exec(dfa_match_data *md, const pcre_uchar *this_start_code, const pcre_uchar *current_subject, int start_offset, int *offsets, int offsetcount, int *workspace, int wscount, int rlevel)
struct stateblock stateblock
#define INTS_PER_STATEBLOCK
static const pcre_uint8 toptable1[]
static const pcre_uint8 toptable2[]
static const pcre_uint8 poptable[]
#define ADD_NEW_DATA(x, y, z)
#define PCRE_NEWLINE_BITS
#define CHAR_GRAVE_ACCENT
#define PCRE_STUDY_MAPPED
#define REVERSED_MAGIC_NUMBER
#define CHAR_COMMERCIAL_AT
#define UCHAR21TEST(eptr)
#define PCRE_CALL_CONVENTION
#define PCRE_FCH_CASELESS
#define PCRE_STUDY_MINLEN
#define TABLE_GET(c, table, default)
#define PCRE_RCH_CASELESS
#define UCHAR21INCTEST(eptr)
#define GETCHARLEN(c, eptr, len)
#define PUBLIC_DFA_EXEC_OPTIONS
#define GETCHARTEST(c, eptr)
static int callout(pcre_callout_block *cb)
const pcre_uchar * subject_position
struct dfa_recursion_info * prevrec
pcre_uint8 start_bits[32]
pcre_uint16 name_table_offset