Lines Matching refs:pptr
922 uint32_t *pptr = cb->parsed_pattern; in show_parsed() local
930 uint32_t meta_arg = META_DATA(*pptr); in show_parsed()
932 fprintf(stderr, "+++ %02d %.8x ", (int)(pptr - cb->parsed_pattern), *pptr); in show_parsed()
934 if (*pptr < META_END) in show_parsed()
936 if (*pptr > 32 && *pptr < 128) fprintf(stderr, "%c", *pptr); in show_parsed()
937 pptr++; in show_parsed()
940 else switch (META_CODE(*pptr++)) in show_parsed()
955 GETOFFSET(offset, pptr); in show_parsed()
963 GETOFFSET(offset, pptr); in show_parsed()
970 uint32_t ptype = *pptr >> 16; in show_parsed()
971 uint32_t pvalue = *pptr++ & 0xffff; in show_parsed()
991 min = *pptr++; in show_parsed()
992 max = *pptr++; in show_parsed()
1000 min = *pptr++; in show_parsed()
1001 max = *pptr++; in show_parsed()
1009 min = *pptr++; in show_parsed()
1010 max = *pptr++; in show_parsed()
1017 case META_BIGVALUE: fprintf(stderr, "META_BIGVALUE %.8x", *pptr++); break; in show_parsed()
1050 case META_POSIX: fprintf(stderr, "META_POSIX %d", *pptr++); break; in show_parsed()
1051 case META_POSIX_NEG: fprintf(stderr, "META_POSIX_NEG %d", *pptr++); break; in show_parsed()
1060 case META_OPTIONS: fprintf(stderr, "META_OPTIONS 0x%02x", *pptr++); break; in show_parsed()
1064 GETOFFSET(offset, pptr); in show_parsed()
1070 GETOFFSET(offset, pptr); in show_parsed()
1076 GETOFFSET(offset, pptr); in show_parsed()
1081 fprintf(stderr, "META (?C%d) next=%d/%d", pptr[2], pptr[0], in show_parsed()
1082 pptr[1]); in show_parsed()
1083 pptr += 3; in show_parsed()
1088 uint32_t patoffset = *pptr++; /* Offset of next pattern item */ in show_parsed()
1089 uint32_t patlength = *pptr++; /* Length of next pattern item */ in show_parsed()
1090 fprintf(stderr, "META (?Cstring) length=%d offset=", *pptr++); in show_parsed()
1091 GETOFFSET(offset, pptr); in show_parsed()
1097 fprintf(stderr, "META (?(&name) length=%d offset=", *pptr++); in show_parsed()
1098 GETOFFSET(offset, pptr); in show_parsed()
1103 fprintf(stderr, "META_BACKREF_BYNAME length=%d offset=", *pptr++); in show_parsed()
1104 GETOFFSET(offset, pptr); in show_parsed()
1109 fprintf(stderr, "META_COND_NUMBER %d offset=", pptr[SIZEOFFSET]); in show_parsed()
1110 GETOFFSET(offset, pptr); in show_parsed()
1112 pptr++; in show_parsed()
1117 GETOFFSET(offset, pptr); in show_parsed()
1122 fprintf(stderr, "META (?(VERSION%s", (*pptr++ == 0)? "=" : ">="); in show_parsed()
1123 fprintf(stderr, "%d.", *pptr++); in show_parsed()
1124 fprintf(stderr, "%d)", *pptr++); in show_parsed()
1128 fprintf(stderr, "META (?(<name>) length=%d offset=", *pptr++); in show_parsed()
1129 GETOFFSET(offset, pptr); in show_parsed()
1134 fprintf(stderr, "META (?(R&name) length=%d offset=", *pptr++); in show_parsed()
1135 GETOFFSET(offset, pptr); in show_parsed()
1142 fprintf(stderr, "META (?(Rnumber) length=%d offset=", *pptr++); in show_parsed()
1143 GETOFFSET(offset, pptr); in show_parsed()
1166 length = *pptr++; in show_parsed()
1169 uint32_t cc = *pptr++; in show_parsed()
5317 uint32_t *pptr = *pptrptr; in compile_branch() local
5387 for (;; pptr++) in compile_branch()
5410 meta = META_CODE(*pptr); in compile_branch()
5411 meta_arg = META_DATA(*pptr); in compile_branch()
5489 *pptrptr = pptr; in compile_branch()
5568 if (pptr[1] < META_END && pptr[2] == META_CLASS_END) in compile_branch()
5573 uint32_t c = pptr[1]; in compile_branch()
5575 pptr += 2; /* Move on to class end */ in compile_branch()
5616 if (meta == META_CLASS && pptr[1] < META_END && pptr[2] < META_END && in compile_branch()
5617 pptr[3] == META_CLASS_END) in compile_branch()
5619 uint32_t c = pptr[1]; in compile_branch()
5637 if (c != d && pptr[2] == d) in compile_branch()
5639 pptr += 3; /* Move on to class end */ in compile_branch()
5688 while ((meta = *(++pptr)) != META_CLASS_END) in compile_branch()
5695 int posix_class = *(++pptr); in compile_branch()
5804 meta = *(++pptr); in compile_branch()
5896 uint32_t ptype = *(++pptr) >> 16; in compile_branch()
5897 uint32_t pdata = *pptr & 0xffff; in compile_branch()
5929 if (pptr[1] == META_RANGE_LITERAL || pptr[1] == META_RANGE_ESCAPED) in compile_branch()
5932 BOOL range_is_literal = (pptr[1] == META_RANGE_LITERAL); in compile_branch()
5934 pptr += 2; in compile_branch()
5935 d = *pptr; in compile_branch()
5936 if (d == META_BIGVALUE) d = *(++pptr); in compile_branch()
6198 verbarglen = *(++pptr); in compile_branch()
6203 meta = *(++pptr); in compile_branch()
6230 *optionsptr = options = *(++pptr); in compile_branch()
6252 uint32_t length = *(++pptr); in compile_branch()
6254 GETPLUSOFFSET(offset, pptr); in compile_branch()
6348 GETPLUSOFFSET(offset, pptr); in compile_branch()
6357 GETPLUSOFFSET(offset, pptr); in compile_branch()
6358 groupnumber = *(++pptr); in compile_branch()
6376 if (pptr[1] > 0) in compile_branch()
6377 code[1+LINK_SIZE] = ((PCRE2_MAJOR > pptr[2]) || in compile_branch()
6378 (PCRE2_MAJOR == pptr[2] && PCRE2_MINOR >= pptr[3]))? in compile_branch()
6381 code[1+LINK_SIZE] = (PCRE2_MAJOR == pptr[2] && PCRE2_MINOR == pptr[3])? in compile_branch()
6384 pptr += 3; in compile_branch()
6415 if (pptr[1] == META_KET && in compile_branch()
6416 (pptr[2] < META_ASTERISK || pptr[2] > META_MINMAX_QUERY)) in compile_branch()
6419 pptr++; in compile_branch()
6468 pptr++; in compile_branch()
6477 &pptr, /* Input pointer (updated) */ in compile_branch()
6672 uint32_t length = *(++pptr); in compile_branch()
6674 GETPLUSOFFSET(offset, pptr); in compile_branch()
6750 PUT(code, 1, pptr[1]); /* Offset to next pattern item */ in compile_branch()
6751 PUT(code, 1 + LINK_SIZE, pptr[2]); /* Length of next pattern item */ in compile_branch()
6752 code[1 + 2*LINK_SIZE] = pptr[3]; in compile_branch()
6753 pptr += 3; in compile_branch()
6768 *lengthptr += pptr[3] + (1 + 4*LINK_SIZE); in compile_branch()
6769 pptr += 3; in compile_branch()
6770 SKIPOFFSET(pptr); in compile_branch()
6781 uint32_t length = pptr[3]; in compile_branch()
6785 PUT(code, 1, pptr[1]); /* Offset to next pattern item */ in compile_branch()
6786 PUT(code, 1 + LINK_SIZE, pptr[2]); /* Length of next pattern item */ in compile_branch()
6788 pptr += 3; in compile_branch()
6789 GETPLUSOFFSET(offset, pptr); /* Offset to string in pattern */ in compile_branch()
6829 repeat_min = *(++pptr); in compile_branch()
6830 repeat_max = *(++pptr); in compile_branch()
7664 pptr++; in compile_branch()
7677 else GETPLUSOFFSET(offset, pptr); in compile_branch()
7717 GETPLUSOFFSET(offset, pptr); in compile_branch()
7785 uint32_t ptype = *(++pptr) >> 16; in compile_branch()
7786 uint32_t pdata = *pptr & 0xffff; in compile_branch()
7845 fprintf(stderr, "** Unrecognized parsed pattern item 0x%.8x\n", *pptr); in compile_branch()
7855 meta = *pptr; /* Get the full 32 bits */ in compile_branch()
8014 uint32_t *pptr = *pptrptr; in compile_regex() local
8058 lookbehindlength = META_DATA(pptr[-1]); in compile_regex()
8059 pptr += SIZEOFFSET; in compile_regex()
8101 compile_branch(&options, &code, &pptr, errorcodeptr, &branchfirstcu, in compile_regex()
8180 if (META_CODE(*pptr) != META_ALT) in compile_regex()
8208 *pptrptr = pptr; in compile_regex()
8250 lookbehindlength = META_DATA(*pptr); in compile_regex()
8251 pptr++; in compile_regex()
8859 parsed_skip(uint32_t *pptr, uint32_t skiptype) in parsed_skip() argument
8863 for (;; pptr++) in parsed_skip()
8865 uint32_t meta = META_CODE(*pptr); in parsed_skip()
8881 if (META_DATA(*pptr) >= 10) pptr += SIZEOFFSET; in parsed_skip()
8885 switch (META_DATA(*pptr)) in parsed_skip()
8889 pptr += 1; in parsed_skip()
8894 pptr += 1 + SIZEOFFSET; in parsed_skip()
8904 pptr += pptr[1]; in parsed_skip()
8910 if (skiptype == PSKIP_CLASS) return pptr; in parsed_skip()
8934 if (nestlevel == 0 && skiptype == PSKIP_ALT) return pptr; in parsed_skip()
8938 if (nestlevel == 0) return pptr; in parsed_skip()
8947 pptr += meta_extra_lengths[meta]; in parsed_skip()
8950 return pptr; in parsed_skip()
9048 uint32_t *pptr = *pptrptr; in get_branchlength() local
9064 for (;; pptr++) in get_branchlength()
9072 if (*pptr < META_END) in get_branchlength()
9077 else switch (META_CODE(*pptr)) in get_branchlength()
9088 pptr = parsed_skip(pptr, PSKIP_ALT); in get_branchlength()
9089 if (pptr == NULL) goto PARSED_SKIP_FAILED; in get_branchlength()
9097 pptr += pptr[1] + 1; in get_branchlength()
9109 pptr += 1; in get_branchlength()
9114 pptr += 1; in get_branchlength()
9120 pptr = parsed_skip(pptr, PSKIP_CLASS); in get_branchlength()
9121 if (pptr == NULL) goto PARSED_SKIP_FAILED; in get_branchlength()
9130 pptr += 3; in get_branchlength()
9134 pptr += 3 + SIZEOFFSET; in get_branchlength()
9142 escape = META_DATA(*pptr); in get_branchlength()
9154 if (escape == ESC_p || escape == ESC_P) pptr++; /* Skip prop data */ in get_branchlength()
9164 *errcodeptr = check_lookbehinds(pptr + 1, &pptr, recurses, cb, lcptr); in get_branchlength()
9169 switch (pptr[1]) in get_branchlength()
9180 pptr++; in get_branchlength()
9186 pptr += 3; in get_branchlength()
9200 if (!set_lookbehind_lengths(&pptr, errcodeptr, lcptr, recurses, cb)) in get_branchlength()
9221 uint32_t meta_code = META_CODE(*pptr); in get_branchlength()
9222 uint32_t length = *(++pptr); in get_branchlength()
9224 GETPLUSOFFSET(offset, pptr); in get_branchlength()
9261 group = META_DATA(*pptr); in get_branchlength()
9275 group = META_DATA(*pptr); in get_branchlength()
9276 GETPLUSOFFSET(offset, pptr); in get_branchlength()
9297 if (pptr > gptr && pptr < gptrend) goto ISNOTFIXED; /* Local recursion */ in get_branchlength()
9324 pptr = parsed_skip(pptr + 1, PSKIP_KET); in get_branchlength()
9334 pptr += 2 + SIZEOFFSET; in get_branchlength()
9338 pptr += 1; in get_branchlength()
9342 pptr += 4; in get_branchlength()
9346 group = META_DATA(*pptr); in get_branchlength()
9352 pptr++; in get_branchlength()
9354 grouplength = get_grouplength(&pptr, TRUE, errcodeptr, lcptr, group, in get_branchlength()
9366 if (pptr[1] == pptr[2]) in get_branchlength()
9368 switch(pptr[1]) in get_branchlength()
9380 INT_MAX/lastitemlength < pptr[1] - 1) in get_branchlength()
9385 itemlength = (pptr[1] - 1) * lastitemlength; in get_branchlength()
9388 pptr += 2; in get_branchlength()
9417 *pptrptr = pptr; in get_branchlength()
9510 check_lookbehinds(uint32_t *pptr, uint32_t **retptr, in check_lookbehinds() argument
9518 for (; *pptr != META_END; pptr++) in check_lookbehinds()
9520 if (*pptr < META_END) continue; /* Literal */ in check_lookbehinds()
9522 switch (META_CODE(*pptr)) in check_lookbehinds()
9528 if (*pptr - META_ESCAPE == ESC_P || *pptr - META_ESCAPE == ESC_p) in check_lookbehinds()
9529 pptr += 1; in check_lookbehinds()
9535 if (retptr != NULL) *retptr = pptr; in check_lookbehinds()
9581 pptr += SIZEOFFSET; in check_lookbehinds()
9586 pptr += 1 + SIZEOFFSET; in check_lookbehinds()
9590 pptr += SIZEOFFSET; in check_lookbehinds()
9598 pptr += 1 + SIZEOFFSET; in check_lookbehinds()
9603 pptr += 3; in check_lookbehinds()
9608 pptr += 3 + SIZEOFFSET; in check_lookbehinds()
9615 pptr += 1; in check_lookbehinds()
9621 pptr += 2; in check_lookbehinds()
9625 pptr += 3; in check_lookbehinds()
9633 pptr += 1 + pptr[1]; in check_lookbehinds()
9639 if (!set_lookbehind_lengths(&pptr, &errorcode, lcptr, recurses, cb)) in check_lookbehinds()
9684 uint32_t *pptr; /* Current pointer in parsed pattern */ in pcre2_compile() local
10132 pptr = cb.parsed_pattern; in pcre2_compile()
10136 (void)compile_regex(cb.external_options, &code, &pptr, &errorcode, 0, &firstcu, in pcre2_compile()
10231 pptr = cb.parsed_pattern; in pcre2_compile()
10234 regexrc = compile_regex(re->overall_options, &code, &pptr, &errorcode, 0, in pcre2_compile()