Lines Matching refs:pptr

919 uint32_t *pptr = cb->parsed_pattern;  in show_parsed()  local
927 uint32_t meta_arg = META_DATA(*pptr); in show_parsed()
929 fprintf(stderr, "+++ %02d %.8x ", (int)(pptr - cb->parsed_pattern), *pptr); in show_parsed()
931 if (*pptr < META_END) in show_parsed()
933 if (*pptr > 32 && *pptr < 128) fprintf(stderr, "%c", *pptr); in show_parsed()
934 pptr++; in show_parsed()
937 else switch (META_CODE(*pptr++)) in show_parsed()
952 GETOFFSET(offset, pptr); in show_parsed()
960 GETOFFSET(offset, pptr); in show_parsed()
967 uint32_t ptype = *pptr >> 16; in show_parsed()
968 uint32_t pvalue = *pptr++ & 0xffff; in show_parsed()
988 min = *pptr++; in show_parsed()
989 max = *pptr++; in show_parsed()
997 min = *pptr++; in show_parsed()
998 max = *pptr++; in show_parsed()
1006 min = *pptr++; in show_parsed()
1007 max = *pptr++; in show_parsed()
1014 case META_BIGVALUE: fprintf(stderr, "META_BIGVALUE %.8x", *pptr++); break; in show_parsed()
1047 case META_POSIX: fprintf(stderr, "META_POSIX %d", *pptr++); break; in show_parsed()
1048 case META_POSIX_NEG: fprintf(stderr, "META_POSIX_NEG %d", *pptr++); break; in show_parsed()
1057 case META_OPTIONS: fprintf(stderr, "META_OPTIONS 0x%02x", *pptr++); break; in show_parsed()
1061 GETOFFSET(offset, pptr); in show_parsed()
1067 GETOFFSET(offset, pptr); in show_parsed()
1073 GETOFFSET(offset, pptr); in show_parsed()
1078 fprintf(stderr, "META (?C%d) next=%d/%d", pptr[2], pptr[0], in show_parsed()
1079 pptr[1]); in show_parsed()
1080 pptr += 3; in show_parsed()
1085 uint32_t patoffset = *pptr++; /* Offset of next pattern item */ in show_parsed()
1086 uint32_t patlength = *pptr++; /* Length of next pattern item */ in show_parsed()
1087 fprintf(stderr, "META (?Cstring) length=%d offset=", *pptr++); in show_parsed()
1088 GETOFFSET(offset, pptr); in show_parsed()
1094 fprintf(stderr, "META (?(&name) length=%d offset=", *pptr++); in show_parsed()
1095 GETOFFSET(offset, pptr); in show_parsed()
1100 fprintf(stderr, "META_BACKREF_BYNAME length=%d offset=", *pptr++); in show_parsed()
1101 GETOFFSET(offset, pptr); in show_parsed()
1106 fprintf(stderr, "META_COND_NUMBER %d offset=", pptr[SIZEOFFSET]); in show_parsed()
1107 GETOFFSET(offset, pptr); in show_parsed()
1109 pptr++; in show_parsed()
1114 GETOFFSET(offset, pptr); in show_parsed()
1119 fprintf(stderr, "META (?(VERSION%s", (*pptr++ == 0)? "=" : ">="); in show_parsed()
1120 fprintf(stderr, "%d.", *pptr++); in show_parsed()
1121 fprintf(stderr, "%d)", *pptr++); in show_parsed()
1125 fprintf(stderr, "META (?(<name>) length=%d offset=", *pptr++); in show_parsed()
1126 GETOFFSET(offset, pptr); in show_parsed()
1131 fprintf(stderr, "META (?(R&name) length=%d offset=", *pptr++); in show_parsed()
1132 GETOFFSET(offset, pptr); in show_parsed()
1139 fprintf(stderr, "META (?(Rnumber) length=%d offset=", *pptr++); in show_parsed()
1140 GETOFFSET(offset, pptr); in show_parsed()
1163 length = *pptr++; in show_parsed()
1166 uint32_t cc = *pptr++; in show_parsed()
5295 uint32_t *pptr = *pptrptr; in compile_branch() local
5365 for (;; pptr++) in compile_branch()
5388 meta = META_CODE(*pptr); in compile_branch()
5389 meta_arg = META_DATA(*pptr); in compile_branch()
5467 *pptrptr = pptr; in compile_branch()
5546 if (pptr[1] < META_END && pptr[2] == META_CLASS_END) in compile_branch()
5551 uint32_t c = pptr[1]; in compile_branch()
5553 pptr += 2; /* Move on to class end */ in compile_branch()
5594 if (meta == META_CLASS && pptr[1] < META_END && pptr[2] < META_END && in compile_branch()
5595 pptr[3] == META_CLASS_END) in compile_branch()
5597 uint32_t c = pptr[1]; in compile_branch()
5615 if (c != d && pptr[2] == d) in compile_branch()
5617 pptr += 3; /* Move on to class end */ in compile_branch()
5666 while ((meta = *(++pptr)) != META_CLASS_END) in compile_branch()
5673 int posix_class = *(++pptr); in compile_branch()
5782 meta = *(++pptr); in compile_branch()
5874 uint32_t ptype = *(++pptr) >> 16; in compile_branch()
5875 uint32_t pdata = *pptr & 0xffff; in compile_branch()
5907 if (pptr[1] == META_RANGE_LITERAL || pptr[1] == META_RANGE_ESCAPED) in compile_branch()
5910 BOOL range_is_literal = (pptr[1] == META_RANGE_LITERAL); in compile_branch()
5912 pptr += 2; in compile_branch()
5913 d = *pptr; in compile_branch()
5914 if (d == META_BIGVALUE) d = *(++pptr); in compile_branch()
6176 verbarglen = *(++pptr); in compile_branch()
6181 meta = *(++pptr); in compile_branch()
6208 *optionsptr = options = *(++pptr); in compile_branch()
6230 uint32_t length = *(++pptr); in compile_branch()
6232 GETPLUSOFFSET(offset, pptr); in compile_branch()
6326 GETPLUSOFFSET(offset, pptr); in compile_branch()
6335 GETPLUSOFFSET(offset, pptr); in compile_branch()
6336 groupnumber = *(++pptr); in compile_branch()
6354 if (pptr[1] > 0) in compile_branch()
6355 code[1+LINK_SIZE] = ((PCRE2_MAJOR > pptr[2]) || in compile_branch()
6356 (PCRE2_MAJOR == pptr[2] && PCRE2_MINOR >= pptr[3]))? in compile_branch()
6359 code[1+LINK_SIZE] = (PCRE2_MAJOR == pptr[2] && PCRE2_MINOR == pptr[3])? in compile_branch()
6362 pptr += 3; in compile_branch()
6393 if (pptr[1] == META_KET && in compile_branch()
6394 (pptr[2] < META_ASTERISK || pptr[2] > META_MINMAX_QUERY)) in compile_branch()
6397 pptr++; in compile_branch()
6446 pptr++; in compile_branch()
6455 &pptr, /* Input pointer (updated) */ in compile_branch()
6650 uint32_t length = *(++pptr); in compile_branch()
6652 GETPLUSOFFSET(offset, pptr); in compile_branch()
6728 PUT(code, 1, pptr[1]); /* Offset to next pattern item */ in compile_branch()
6729 PUT(code, 1 + LINK_SIZE, pptr[2]); /* Length of next pattern item */ in compile_branch()
6730 code[1 + 2*LINK_SIZE] = pptr[3]; in compile_branch()
6731 pptr += 3; in compile_branch()
6746 *lengthptr += pptr[3] + (1 + 4*LINK_SIZE); in compile_branch()
6747 pptr += 3; in compile_branch()
6748 SKIPOFFSET(pptr); in compile_branch()
6759 uint32_t length = pptr[3]; in compile_branch()
6763 PUT(code, 1, pptr[1]); /* Offset to next pattern item */ in compile_branch()
6764 PUT(code, 1 + LINK_SIZE, pptr[2]); /* Length of next pattern item */ in compile_branch()
6766 pptr += 3; in compile_branch()
6767 GETPLUSOFFSET(offset, pptr); /* Offset to string in pattern */ in compile_branch()
6807 repeat_min = *(++pptr); in compile_branch()
6808 repeat_max = *(++pptr); in compile_branch()
7642 pptr++; in compile_branch()
7655 else GETPLUSOFFSET(offset, pptr); in compile_branch()
7695 GETPLUSOFFSET(offset, pptr); in compile_branch()
7763 uint32_t ptype = *(++pptr) >> 16; in compile_branch()
7764 uint32_t pdata = *pptr & 0xffff; in compile_branch()
7813 fprintf(stderr, "** Unrecognized parsed pattern item 0x%.8x\n", *pptr); in compile_branch()
7823 meta = *pptr; /* Get the full 32 bits */ in compile_branch()
7982 uint32_t *pptr = *pptrptr; in compile_regex() local
8026 lookbehindlength = META_DATA(pptr[-1]); in compile_regex()
8027 pptr += SIZEOFFSET; in compile_regex()
8069 compile_branch(&options, &code, &pptr, errorcodeptr, &branchfirstcu, in compile_regex()
8148 if (META_CODE(*pptr) != META_ALT) in compile_regex()
8176 *pptrptr = pptr; in compile_regex()
8218 lookbehindlength = META_DATA(*pptr); in compile_regex()
8219 pptr++; in compile_regex()
8827 parsed_skip(uint32_t *pptr, uint32_t skiptype) in parsed_skip() argument
8831 for (;; pptr++) in parsed_skip()
8833 uint32_t meta = META_CODE(*pptr); in parsed_skip()
8849 if (META_DATA(*pptr) >= 10) pptr += SIZEOFFSET; in parsed_skip()
8853 switch (META_DATA(*pptr)) in parsed_skip()
8857 pptr += 1; in parsed_skip()
8862 pptr += 1 + SIZEOFFSET; in parsed_skip()
8872 pptr += pptr[1]; in parsed_skip()
8878 if (skiptype == PSKIP_CLASS) return pptr; in parsed_skip()
8902 if (nestlevel == 0 && skiptype == PSKIP_ALT) return pptr; in parsed_skip()
8906 if (nestlevel == 0) return pptr; in parsed_skip()
8915 pptr += meta_extra_lengths[meta]; in parsed_skip()
8918 return pptr; in parsed_skip()
9016 uint32_t *pptr = *pptrptr; in get_branchlength() local
9032 for (;; pptr++) in get_branchlength()
9040 if (*pptr < META_END) in get_branchlength()
9045 else switch (META_CODE(*pptr)) in get_branchlength()
9056 pptr = parsed_skip(pptr, PSKIP_ALT); in get_branchlength()
9057 if (pptr == NULL) goto PARSED_SKIP_FAILED; in get_branchlength()
9065 pptr += pptr[1] + 1; in get_branchlength()
9077 pptr += 1; in get_branchlength()
9082 pptr += 1; in get_branchlength()
9088 pptr = parsed_skip(pptr, PSKIP_CLASS); in get_branchlength()
9089 if (pptr == NULL) goto PARSED_SKIP_FAILED; in get_branchlength()
9098 pptr += 3; in get_branchlength()
9102 pptr += 3 + SIZEOFFSET; in get_branchlength()
9110 escape = META_DATA(*pptr); in get_branchlength()
9122 if (escape == ESC_p || escape == ESC_P) pptr++; /* Skip prop data */ in get_branchlength()
9132 *errcodeptr = check_lookbehinds(pptr + 1, &pptr, recurses, cb); in get_branchlength()
9137 switch (pptr[1]) in get_branchlength()
9148 pptr++; in get_branchlength()
9154 pptr += 3; in get_branchlength()
9168 if (!set_lookbehind_lengths(&pptr, errcodeptr, lcptr, recurses, cb)) in get_branchlength()
9189 uint32_t meta_code = META_CODE(*pptr); in get_branchlength()
9190 uint32_t length = *(++pptr); in get_branchlength()
9192 GETPLUSOFFSET(offset, pptr); in get_branchlength()
9229 group = META_DATA(*pptr); in get_branchlength()
9243 group = META_DATA(*pptr); in get_branchlength()
9244 GETPLUSOFFSET(offset, pptr); in get_branchlength()
9265 if (pptr > gptr && pptr < gptrend) goto ISNOTFIXED; /* Local recursion */ in get_branchlength()
9292 pptr = parsed_skip(pptr + 1, PSKIP_KET); in get_branchlength()
9302 pptr += 2 + SIZEOFFSET; in get_branchlength()
9306 pptr += 1; in get_branchlength()
9310 pptr += 4; in get_branchlength()
9314 group = META_DATA(*pptr); in get_branchlength()
9320 pptr++; in get_branchlength()
9322 grouplength = get_grouplength(&pptr, TRUE, errcodeptr, lcptr, group, in get_branchlength()
9334 if (pptr[1] == pptr[2]) in get_branchlength()
9336 switch(pptr[1]) in get_branchlength()
9348 INT_MAX/lastitemlength < pptr[1] - 1) in get_branchlength()
9353 itemlength = (pptr[1] - 1) * lastitemlength; in get_branchlength()
9356 pptr += 2; in get_branchlength()
9385 *pptrptr = pptr; in get_branchlength()
9477 check_lookbehinds(uint32_t *pptr, uint32_t **retptr, in check_lookbehinds() argument
9486 for (; *pptr != META_END; pptr++) in check_lookbehinds()
9488 if (*pptr < META_END) continue; /* Literal */ in check_lookbehinds()
9490 switch (META_CODE(*pptr)) in check_lookbehinds()
9496 if (*pptr - META_ESCAPE == ESC_P || *pptr - META_ESCAPE == ESC_p) in check_lookbehinds()
9497 pptr += 1; in check_lookbehinds()
9503 if (retptr != NULL) *retptr = pptr; in check_lookbehinds()
9549 pptr += SIZEOFFSET; in check_lookbehinds()
9554 pptr += 1 + SIZEOFFSET; in check_lookbehinds()
9558 pptr += SIZEOFFSET; in check_lookbehinds()
9566 pptr += 1 + SIZEOFFSET; in check_lookbehinds()
9571 pptr += 3; in check_lookbehinds()
9576 pptr += 3 + SIZEOFFSET; in check_lookbehinds()
9583 pptr += 1; in check_lookbehinds()
9589 pptr += 2; in check_lookbehinds()
9593 pptr += 3; in check_lookbehinds()
9601 pptr += 1 + pptr[1]; in check_lookbehinds()
9607 if (!set_lookbehind_lengths(&pptr, &errorcode, &loopcount, recurses, cb)) in check_lookbehinds()
9652 uint32_t *pptr; /* Current pointer in parsed pattern */ in pcre2_compile() local
10099 pptr = cb.parsed_pattern; in pcre2_compile()
10103 (void)compile_regex(cb.external_options, &code, &pptr, &errorcode, 0, &firstcu, in pcre2_compile()
10198 pptr = cb.parsed_pattern; in pcre2_compile()
10201 regexrc = compile_regex(re->overall_options, &code, &pptr, &errorcode, 0, in pcre2_compile()