Lines Matching refs:pptr
924 uint32_t *pptr = cb->parsed_pattern; in show_parsed() local
932 uint32_t meta_arg = META_DATA(*pptr); in show_parsed()
934 fprintf(stderr, "+++ %02d %.8x ", (int)(pptr - cb->parsed_pattern), *pptr); in show_parsed()
936 if (*pptr < META_END) in show_parsed()
938 if (*pptr > 32 && *pptr < 128) fprintf(stderr, "%c", *pptr); in show_parsed()
939 pptr++; in show_parsed()
942 else switch (META_CODE(*pptr++)) in show_parsed()
957 GETOFFSET(offset, pptr); in show_parsed()
965 GETOFFSET(offset, pptr); in show_parsed()
972 uint32_t ptype = *pptr >> 16; in show_parsed()
973 uint32_t pvalue = *pptr++ & 0xffff; in show_parsed()
993 min = *pptr++; in show_parsed()
994 max = *pptr++; in show_parsed()
1002 min = *pptr++; in show_parsed()
1003 max = *pptr++; in show_parsed()
1011 min = *pptr++; in show_parsed()
1012 max = *pptr++; in show_parsed()
1019 case META_BIGVALUE: fprintf(stderr, "META_BIGVALUE %.8x", *pptr++); break; in show_parsed()
1052 case META_POSIX: fprintf(stderr, "META_POSIX %d", *pptr++); break; in show_parsed()
1053 case META_POSIX_NEG: fprintf(stderr, "META_POSIX_NEG %d", *pptr++); break; in show_parsed()
1062 case META_OPTIONS: fprintf(stderr, "META_OPTIONS 0x%02x", *pptr++); break; in show_parsed()
1066 GETOFFSET(offset, pptr); in show_parsed()
1072 GETOFFSET(offset, pptr); in show_parsed()
1078 GETOFFSET(offset, pptr); in show_parsed()
1083 fprintf(stderr, "META (?C%d) next=%d/%d", pptr[2], pptr[0], in show_parsed()
1084 pptr[1]); in show_parsed()
1085 pptr += 3; in show_parsed()
1090 uint32_t patoffset = *pptr++; /* Offset of next pattern item */ in show_parsed()
1091 uint32_t patlength = *pptr++; /* Length of next pattern item */ in show_parsed()
1092 fprintf(stderr, "META (?Cstring) length=%d offset=", *pptr++); in show_parsed()
1093 GETOFFSET(offset, pptr); in show_parsed()
1099 fprintf(stderr, "META (?(&name) length=%d offset=", *pptr++); in show_parsed()
1100 GETOFFSET(offset, pptr); in show_parsed()
1105 fprintf(stderr, "META_BACKREF_BYNAME length=%d offset=", *pptr++); in show_parsed()
1106 GETOFFSET(offset, pptr); in show_parsed()
1111 fprintf(stderr, "META_COND_NUMBER %d offset=", pptr[SIZEOFFSET]); in show_parsed()
1112 GETOFFSET(offset, pptr); in show_parsed()
1114 pptr++; in show_parsed()
1119 GETOFFSET(offset, pptr); in show_parsed()
1124 fprintf(stderr, "META (?(VERSION%s", (*pptr++ == 0)? "=" : ">="); in show_parsed()
1125 fprintf(stderr, "%d.", *pptr++); in show_parsed()
1126 fprintf(stderr, "%d)", *pptr++); in show_parsed()
1130 fprintf(stderr, "META (?(<name>) length=%d offset=", *pptr++); in show_parsed()
1131 GETOFFSET(offset, pptr); in show_parsed()
1136 fprintf(stderr, "META (?(R&name) length=%d offset=", *pptr++); in show_parsed()
1137 GETOFFSET(offset, pptr); in show_parsed()
1144 fprintf(stderr, "META (?(Rnumber) length=%d offset=", *pptr++); in show_parsed()
1145 GETOFFSET(offset, pptr); in show_parsed()
1168 length = *pptr++; in show_parsed()
1171 uint32_t cc = *pptr++; in show_parsed()
5402 uint32_t *pptr = *pptrptr; in compile_branch() local
5472 for (;; pptr++) in compile_branch()
5494 meta = META_CODE(*pptr); in compile_branch()
5495 meta_arg = META_DATA(*pptr); in compile_branch()
5573 *pptrptr = pptr; in compile_branch()
5652 if (pptr[1] < META_END && pptr[2] == META_CLASS_END) in compile_branch()
5657 uint32_t c = pptr[1]; in compile_branch()
5659 pptr += 2; /* Move on to class end */ in compile_branch()
5700 if (meta == META_CLASS && pptr[1] < META_END && pptr[2] < META_END && in compile_branch()
5701 pptr[3] == META_CLASS_END) in compile_branch()
5703 uint32_t c = pptr[1]; in compile_branch()
5721 if (c != d && pptr[2] == d) in compile_branch()
5723 pptr += 3; /* Move on to class end */ in compile_branch()
5772 while ((meta = *(++pptr)) != META_CLASS_END) in compile_branch()
5779 int posix_class = *(++pptr); in compile_branch()
5888 meta = *(++pptr); in compile_branch()
5983 uint32_t ptype = *(++pptr) >> 16; in compile_branch()
5984 uint32_t pdata = *pptr & 0xffff; in compile_branch()
6016 if (pptr[1] == META_RANGE_LITERAL || pptr[1] == META_RANGE_ESCAPED) in compile_branch()
6019 BOOL range_is_literal = (pptr[1] == META_RANGE_LITERAL); in compile_branch()
6021 pptr += 2; in compile_branch()
6022 d = *pptr; in compile_branch()
6023 if (d == META_BIGVALUE) d = *(++pptr); in compile_branch()
6285 verbarglen = *(++pptr); in compile_branch()
6290 meta = *(++pptr); in compile_branch()
6317 *optionsptr = options = *(++pptr); in compile_branch()
6340 uint32_t length = *(++pptr); in compile_branch()
6342 GETPLUSOFFSET(offset, pptr); in compile_branch()
6436 GETPLUSOFFSET(offset, pptr); in compile_branch()
6445 GETPLUSOFFSET(offset, pptr); in compile_branch()
6446 groupnumber = *(++pptr); in compile_branch()
6464 if (pptr[1] > 0) in compile_branch()
6465 code[1+LINK_SIZE] = ((PCRE2_MAJOR > pptr[2]) || in compile_branch()
6466 (PCRE2_MAJOR == pptr[2] && PCRE2_MINOR >= pptr[3]))? in compile_branch()
6469 code[1+LINK_SIZE] = (PCRE2_MAJOR == pptr[2] && PCRE2_MINOR == pptr[3])? in compile_branch()
6472 pptr += 3; in compile_branch()
6503 if (pptr[1] == META_KET && in compile_branch()
6504 (pptr[2] < META_ASTERISK || pptr[2] > META_MINMAX_QUERY)) in compile_branch()
6507 pptr++; in compile_branch()
6556 pptr++; in compile_branch()
6565 &pptr, /* Input pointer (updated) */ in compile_branch()
6760 uint32_t length = *(++pptr); in compile_branch()
6762 GETPLUSOFFSET(offset, pptr); in compile_branch()
6838 PUT(code, 1, pptr[1]); /* Offset to next pattern item */ in compile_branch()
6839 PUT(code, 1 + LINK_SIZE, pptr[2]); /* Length of next pattern item */ in compile_branch()
6840 code[1 + 2*LINK_SIZE] = pptr[3]; in compile_branch()
6841 pptr += 3; in compile_branch()
6856 *lengthptr += pptr[3] + (1 + 4*LINK_SIZE); in compile_branch()
6857 pptr += 3; in compile_branch()
6858 SKIPOFFSET(pptr); in compile_branch()
6869 uint32_t length = pptr[3]; in compile_branch()
6873 PUT(code, 1, pptr[1]); /* Offset to next pattern item */ in compile_branch()
6874 PUT(code, 1 + LINK_SIZE, pptr[2]); /* Length of next pattern item */ in compile_branch()
6876 pptr += 3; in compile_branch()
6877 GETPLUSOFFSET(offset, pptr); /* Offset to string in pattern */ in compile_branch()
6917 repeat_min = *(++pptr); in compile_branch()
6918 repeat_max = *(++pptr); in compile_branch()
7757 pptr++; in compile_branch()
7770 else GETPLUSOFFSET(offset, pptr); in compile_branch()
7810 GETPLUSOFFSET(offset, pptr); in compile_branch()
7878 uint32_t ptype = *(++pptr) >> 16; in compile_branch()
7879 uint32_t pdata = *pptr & 0xffff; in compile_branch()
7938 fprintf(stderr, "** Unrecognized parsed pattern item 0x%.8x\n", *pptr); in compile_branch()
7948 meta = *pptr; /* Get the full 32 bits */ in compile_branch()
8107 uint32_t *pptr = *pptrptr; in compile_regex() local
8151 lookbehindlength = META_DATA(pptr[-1]); in compile_regex()
8152 pptr += SIZEOFFSET; in compile_regex()
8194 compile_branch(&options, &code, &pptr, errorcodeptr, &branchfirstcu, in compile_regex()
8273 if (META_CODE(*pptr) != META_ALT) in compile_regex()
8301 *pptrptr = pptr; in compile_regex()
8343 lookbehindlength = META_DATA(*pptr); in compile_regex()
8344 pptr++; in compile_regex()
8951 parsed_skip(uint32_t *pptr, uint32_t skiptype) in parsed_skip() argument
8955 for (;; pptr++) in parsed_skip()
8957 uint32_t meta = META_CODE(*pptr); in parsed_skip()
8973 if (META_DATA(*pptr) >= 10) pptr += SIZEOFFSET; in parsed_skip()
8977 switch (META_DATA(*pptr)) in parsed_skip()
8981 pptr += 1; in parsed_skip()
8986 pptr += 1 + SIZEOFFSET; in parsed_skip()
8996 pptr += pptr[1]; in parsed_skip()
9002 if (skiptype == PSKIP_CLASS) return pptr; in parsed_skip()
9026 if (nestlevel == 0 && skiptype == PSKIP_ALT) return pptr; in parsed_skip()
9030 if (nestlevel == 0) return pptr; in parsed_skip()
9039 pptr += meta_extra_lengths[meta]; in parsed_skip()
9042 return pptr; in parsed_skip()
9140 uint32_t *pptr = *pptrptr; in get_branchlength() local
9156 for (;; pptr++) in get_branchlength()
9164 if (*pptr < META_END) in get_branchlength()
9169 else switch (META_CODE(*pptr)) in get_branchlength()
9180 pptr = parsed_skip(pptr, PSKIP_ALT); in get_branchlength()
9181 if (pptr == NULL) goto PARSED_SKIP_FAILED; in get_branchlength()
9189 pptr += pptr[1] + 1; in get_branchlength()
9201 pptr += 1; in get_branchlength()
9206 pptr += 1; in get_branchlength()
9212 pptr = parsed_skip(pptr, PSKIP_CLASS); in get_branchlength()
9213 if (pptr == NULL) goto PARSED_SKIP_FAILED; in get_branchlength()
9222 pptr += 3; in get_branchlength()
9226 pptr += 3 + SIZEOFFSET; in get_branchlength()
9234 escape = META_DATA(*pptr); in get_branchlength()
9246 if (escape == ESC_p || escape == ESC_P) pptr++; /* Skip prop data */ in get_branchlength()
9256 *errcodeptr = check_lookbehinds(pptr + 1, &pptr, recurses, cb, lcptr); in get_branchlength()
9261 switch (pptr[1]) in get_branchlength()
9272 pptr++; in get_branchlength()
9278 pptr += 3; in get_branchlength()
9292 if (!set_lookbehind_lengths(&pptr, errcodeptr, lcptr, recurses, cb)) in get_branchlength()
9313 uint32_t meta_code = META_CODE(*pptr); in get_branchlength()
9314 uint32_t length = *(++pptr); in get_branchlength()
9316 GETPLUSOFFSET(offset, pptr); in get_branchlength()
9353 group = META_DATA(*pptr); in get_branchlength()
9367 group = META_DATA(*pptr); in get_branchlength()
9368 GETPLUSOFFSET(offset, pptr); in get_branchlength()
9389 if (pptr > gptr && pptr < gptrend) goto ISNOTFIXED; /* Local recursion */ in get_branchlength()
9416 pptr = parsed_skip(pptr + 1, PSKIP_KET); in get_branchlength()
9426 pptr += 2 + SIZEOFFSET; in get_branchlength()
9430 pptr += 1; in get_branchlength()
9434 pptr += 4; in get_branchlength()
9438 group = META_DATA(*pptr); in get_branchlength()
9444 pptr++; in get_branchlength()
9446 grouplength = get_grouplength(&pptr, TRUE, errcodeptr, lcptr, group, in get_branchlength()
9458 if (pptr[1] == pptr[2]) in get_branchlength()
9460 switch(pptr[1]) in get_branchlength()
9472 INT_MAX/lastitemlength < pptr[1] - 1) in get_branchlength()
9477 itemlength = (pptr[1] - 1) * lastitemlength; in get_branchlength()
9480 pptr += 2; in get_branchlength()
9509 *pptrptr = pptr; in get_branchlength()
9602 check_lookbehinds(uint32_t *pptr, uint32_t **retptr, in check_lookbehinds() argument
9610 for (; *pptr != META_END; pptr++) in check_lookbehinds()
9612 if (*pptr < META_END) continue; /* Literal */ in check_lookbehinds()
9614 switch (META_CODE(*pptr)) in check_lookbehinds()
9620 if (*pptr - META_ESCAPE == ESC_P || *pptr - META_ESCAPE == ESC_p) in check_lookbehinds()
9621 pptr += 1; in check_lookbehinds()
9627 if (retptr != NULL) *retptr = pptr; in check_lookbehinds()
9673 pptr += SIZEOFFSET; in check_lookbehinds()
9678 pptr += 1 + SIZEOFFSET; in check_lookbehinds()
9682 pptr += SIZEOFFSET; in check_lookbehinds()
9690 pptr += 1 + SIZEOFFSET; in check_lookbehinds()
9695 pptr += 3; in check_lookbehinds()
9700 pptr += 3 + SIZEOFFSET; in check_lookbehinds()
9707 pptr += 1; in check_lookbehinds()
9713 pptr += 2; in check_lookbehinds()
9717 pptr += 3; in check_lookbehinds()
9725 pptr += 1 + pptr[1]; in check_lookbehinds()
9731 if (!set_lookbehind_lengths(&pptr, &errorcode, lcptr, recurses, cb)) in check_lookbehinds()
9776 uint32_t *pptr; /* Current pointer in parsed pattern */ in pcre2_compile() local
10224 pptr = cb.parsed_pattern; in pcre2_compile()
10228 (void)compile_regex(cb.external_options, &code, &pptr, &errorcode, 0, &firstcu, in pcre2_compile()
10323 pptr = cb.parsed_pattern; in pcre2_compile()
10326 regexrc = compile_regex(re->overall_options, &code, &pptr, &errorcode, 0, in pcre2_compile()