| 663 |
{ MUA | PCRE_PARTIAL_SOFT, 0, "a\\B", "a" }, |
{ MUA | PCRE_PARTIAL_SOFT, 0, "a\\B", "a" }, |
| 664 |
{ MUA | PCRE_PARTIAL_HARD, 0, "a\\b", "a" }, |
{ MUA | PCRE_PARTIAL_HARD, 0, "a\\b", "a" }, |
| 665 |
|
|
| 666 |
|
/* (*MARK) verb. */ |
| 667 |
|
{ MUA, 0, "a(*MARK:aa)a", "ababaa" }, |
| 668 |
|
{ MUA, 0 | F_NOMATCH, "a(*:aa)a", "abab" }, |
| 669 |
|
{ MUA, 0, "a(*:aa)(b(*:bb)b|bc)", "abc" }, |
| 670 |
|
{ MUA, 0 | F_NOMATCH, "a(*:1)x|b(*:2)y", "abc" }, |
| 671 |
|
{ MUA, 0, "(?>a(*:aa))b|ac", "ac" }, |
| 672 |
|
{ MUA, 0, "(?(DEFINE)(a(*:aa)))(?1)", "a" }, |
| 673 |
|
{ MUA, 0 | F_NOMATCH, "(?(DEFINE)((a)(*:aa)))(?1)b", "aa" }, |
| 674 |
|
{ MUA, 0, "(?(DEFINE)(a(*:aa)))a(?1)b|aac", "aac" }, |
| 675 |
|
{ MUA, 0, "(a(*:aa)){0}(?:b(?1)b|c)+c", "babbab cc" }, |
| 676 |
|
{ MUA, 0, "(a(*:aa)){0}(?:b(?1)b)+", "babba" }, |
| 677 |
|
{ MUA, 0 | F_NOMATCH, "(a(*:aa)){0}(?:b(?1)b)+", "ba" }, |
| 678 |
|
{ MUA, 0, "(a\\K(*:aa)){0}(?:b(?1)b|c)+c", "babbab cc" }, |
| 679 |
|
{ MUA, 0, "(a\\K(*:aa)){0}(?:b(?1)b)+", "babba" }, |
| 680 |
|
{ MUA, 0 | F_NOMATCH, "(a\\K(*:aa)){0}(?:b(?1)b)+", "ba" }, |
| 681 |
|
|
| 682 |
/* Deep recursion. */ |
/* Deep recursion. */ |
| 683 |
{ MUA, 0, "((((?:(?:(?:\\w)+)?)*|(?>\\w)+?)+|(?>\\w)?\?)*)?\\s", "aaaaa+ " }, |
{ MUA, 0, "((((?:(?:(?:\\w)+)?)*|(?>\\w)+?)+|(?>\\w)?\?)*)?\\s", "aaaaa+ " }, |
| 684 |
{ MUA, 0, "(?:((?:(?:(?:\\w*?)+)??|(?>\\w)?|\\w*+)*)+)+?\\s", "aa+ " }, |
{ MUA, 0, "(?:((?:(?:(?:\\w*?)+)??|(?>\\w)?|\\w*+)*)+)+?\\s", "aa+ " }, |
| 892 |
int is_successful, is_ascii_pattern, is_ascii_input; |
int is_successful, is_ascii_pattern, is_ascii_input; |
| 893 |
int total = 0; |
int total = 0; |
| 894 |
int successful = 0; |
int successful = 0; |
| 895 |
|
int successful_row = 0; |
| 896 |
int counter = 0; |
int counter = 0; |
| 897 |
int study_mode; |
int study_mode; |
| 898 |
#ifdef SUPPORT_PCRE8 |
#ifdef SUPPORT_PCRE8 |
| 899 |
pcre *re8; |
pcre *re8; |
| 900 |
pcre_extra *extra8; |
pcre_extra *extra8; |
| 901 |
|
pcre_extra dummy_extra8; |
| 902 |
int ovector8_1[32]; |
int ovector8_1[32]; |
| 903 |
int ovector8_2[32]; |
int ovector8_2[32]; |
| 904 |
int return_value8_1, return_value8_2; |
int return_value8_1, return_value8_2; |
| 905 |
|
unsigned char *mark8_1, *mark8_2; |
| 906 |
int utf8 = 0, ucp8 = 0; |
int utf8 = 0, ucp8 = 0; |
| 907 |
int disabled_flags8 = 0; |
int disabled_flags8 = 0; |
| 908 |
#endif |
#endif |
| 909 |
#ifdef SUPPORT_PCRE16 |
#ifdef SUPPORT_PCRE16 |
| 910 |
pcre16 *re16; |
pcre16 *re16; |
| 911 |
pcre16_extra *extra16; |
pcre16_extra *extra16; |
| 912 |
|
pcre16_extra dummy_extra16; |
| 913 |
int ovector16_1[32]; |
int ovector16_1[32]; |
| 914 |
int ovector16_2[32]; |
int ovector16_2[32]; |
| 915 |
int return_value16_1, return_value16_2; |
int return_value16_1, return_value16_2; |
| 916 |
|
PCRE_UCHAR16 *mark16_1, *mark16_2; |
| 917 |
int utf16 = 0, ucp16 = 0; |
int utf16 = 0, ucp16 = 0; |
| 918 |
int disabled_flags16 = 0; |
int disabled_flags16 = 0; |
| 919 |
int length16; |
int length16; |
| 991 |
pcre_free(re8); |
pcre_free(re8); |
| 992 |
re8 = NULL; |
re8 = NULL; |
| 993 |
} |
} |
| 994 |
|
extra8->flags |= PCRE_EXTRA_MARK; |
| 995 |
} else if (((utf8 && ucp8) || is_ascii_pattern) && !(current->start_offset & F_NO8)) |
} else if (((utf8 && ucp8) || is_ascii_pattern) && !(current->start_offset & F_NO8)) |
| 996 |
printf("\n8 bit: Cannot compile pattern: %s\n", current->pattern); |
printf("\n8 bit: Cannot compile pattern: %s\n", current->pattern); |
| 997 |
#endif |
#endif |
| 1022 |
pcre16_free(re16); |
pcre16_free(re16); |
| 1023 |
re16 = NULL; |
re16 = NULL; |
| 1024 |
} |
} |
| 1025 |
|
extra16->flags |= PCRE_EXTRA_MARK; |
| 1026 |
} else if (((utf16 && ucp16) || is_ascii_pattern) && !(current->start_offset & F_NO16)) |
} else if (((utf16 && ucp16) || is_ascii_pattern) && !(current->start_offset & F_NO16)) |
| 1027 |
printf("\n16 bit: Cannot compile pattern: %s\n", current->pattern); |
printf("\n16 bit: Cannot compile pattern: %s\n", current->pattern); |
| 1028 |
#endif |
#endif |
| 1045 |
for (i = 0; i < 32; ++i) |
for (i = 0; i < 32; ++i) |
| 1046 |
ovector8_2[i] = -2; |
ovector8_2[i] = -2; |
| 1047 |
if (re8) { |
if (re8) { |
| 1048 |
|
mark8_1 = NULL; |
| 1049 |
|
mark8_2 = NULL; |
| 1050 |
setstack8(extra8); |
setstack8(extra8); |
| 1051 |
|
extra8->mark = &mark8_1; |
| 1052 |
return_value8_1 = pcre_exec(re8, extra8, current->input, strlen(current->input), current->start_offset & OFFSET_MASK, |
return_value8_1 = pcre_exec(re8, extra8, current->input, strlen(current->input), current->start_offset & OFFSET_MASK, |
| 1053 |
current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector8_1, 32); |
current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector8_1, 32); |
| 1054 |
return_value8_2 = pcre_exec(re8, NULL, current->input, strlen(current->input), current->start_offset & OFFSET_MASK, |
memset(&dummy_extra8, 0, sizeof(pcre_extra)); |
| 1055 |
|
dummy_extra8.flags = PCRE_EXTRA_MARK; |
| 1056 |
|
dummy_extra8.mark = &mark8_2; |
| 1057 |
|
return_value8_2 = pcre_exec(re8, &dummy_extra8, current->input, strlen(current->input), current->start_offset & OFFSET_MASK, |
| 1058 |
current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector8_2, 32); |
current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector8_2, 32); |
| 1059 |
} |
} |
| 1060 |
#endif |
#endif |
| 1067 |
for (i = 0; i < 32; ++i) |
for (i = 0; i < 32; ++i) |
| 1068 |
ovector16_2[i] = -2; |
ovector16_2[i] = -2; |
| 1069 |
if (re16) { |
if (re16) { |
| 1070 |
|
mark16_1 = NULL; |
| 1071 |
|
mark16_2 = NULL; |
| 1072 |
setstack16(extra16); |
setstack16(extra16); |
| 1073 |
if ((current->flags & PCRE_UTF8) || (current->start_offset & F_FORCECONV)) |
if ((current->flags & PCRE_UTF8) || (current->start_offset & F_FORCECONV)) |
| 1074 |
length16 = convert_utf8_to_utf16(current->input, regtest_buf, regtest_offsetmap, REGTEST_MAX_LENGTH); |
length16 = convert_utf8_to_utf16(current->input, regtest_buf, regtest_offsetmap, REGTEST_MAX_LENGTH); |
| 1075 |
else |
else |
| 1076 |
length16 = copy_char8_to_char16(current->input, regtest_buf, REGTEST_MAX_LENGTH); |
length16 = copy_char8_to_char16(current->input, regtest_buf, REGTEST_MAX_LENGTH); |
| 1077 |
|
extra16->mark = &mark16_1; |
| 1078 |
return_value16_1 = pcre16_exec(re16, extra16, regtest_buf, length16, current->start_offset & OFFSET_MASK, |
return_value16_1 = pcre16_exec(re16, extra16, regtest_buf, length16, current->start_offset & OFFSET_MASK, |
| 1079 |
current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector16_1, 32); |
current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector16_1, 32); |
| 1080 |
return_value16_2 = pcre16_exec(re16, NULL, regtest_buf, length16, current->start_offset & OFFSET_MASK, |
memset(&dummy_extra16, 0, sizeof(pcre16_extra)); |
| 1081 |
|
dummy_extra16.flags = PCRE_EXTRA_MARK; |
| 1082 |
|
dummy_extra16.mark = &mark16_2; |
| 1083 |
|
return_value16_2 = pcre16_exec(re16, &dummy_extra16, regtest_buf, length16, current->start_offset & OFFSET_MASK, |
| 1084 |
current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector16_2, 32); |
current->flags & (PCRE_NOTBOL | PCRE_NOTEOL | PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART | PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD), ovector16_2, 32); |
| 1085 |
} |
} |
| 1086 |
#endif |
#endif |
| 1208 |
#endif |
#endif |
| 1209 |
} |
} |
| 1210 |
|
|
| 1211 |
if (is_successful) |
if (is_successful) { |
| 1212 |
successful++; |
#ifdef SUPPORT_PCRE8 |
| 1213 |
|
if (mark8_1 != mark8_2) { |
| 1214 |
|
printf("8 bit: Mark value mismatch: [%d] '%s' @ '%s'\n", |
| 1215 |
|
total, current->pattern, current->input); |
| 1216 |
|
is_successful = 0; |
| 1217 |
|
} |
| 1218 |
|
#endif |
| 1219 |
|
#ifdef SUPPORT_PCRE16 |
| 1220 |
|
if (mark16_1 != mark16_2) { |
| 1221 |
|
printf("16 bit: Mark value mismatch: [%d] '%s' @ '%s'\n", |
| 1222 |
|
total, current->pattern, current->input); |
| 1223 |
|
is_successful = 0; |
| 1224 |
|
} |
| 1225 |
|
#endif |
| 1226 |
|
} |
| 1227 |
|
|
| 1228 |
#ifdef SUPPORT_PCRE8 |
#ifdef SUPPORT_PCRE8 |
| 1229 |
if (re8) { |
if (re8) { |
| 1238 |
} |
} |
| 1239 |
#endif |
#endif |
| 1240 |
|
|
| 1241 |
printf("."); |
if (is_successful) { |
| 1242 |
|
successful++; |
| 1243 |
|
successful_row++; |
| 1244 |
|
printf("."); |
| 1245 |
|
if (successful_row >= 60) { |
| 1246 |
|
successful_row = 0; |
| 1247 |
|
printf("\n"); |
| 1248 |
|
} |
| 1249 |
|
} else |
| 1250 |
|
successful_row = 0; |
| 1251 |
|
|
| 1252 |
fflush(stdout); |
fflush(stdout); |
| 1253 |
current++; |
current++; |
| 1254 |
} |
} |