Lines Matching refs:cb

46 #define NLBLOCK cb             /* Block containing newline information */
917 static void show_parsed(compile_block *cb) in show_parsed() argument
919 uint32_t *pptr = cb->parsed_pattern; in show_parsed()
929 fprintf(stderr, "+++ %02d %.8x ", (int)(pptr - cb->parsed_pattern), *pptr); in show_parsed()
958 offset = cb->small_ref_offset[meta_arg]; in show_parsed()
1485 compile_block *cb) in PRIV()
1527 if (cb != NULL && (escape == ESC_P || escape == ESC_p || escape == ESC_X)) in PRIV()
1528 cb->external_flags |= PCRE2_HASBKPORX; /* Note \P, \p, or \X */ in PRIV()
1589 if (cb == NULL) in PRIV()
1723 if (!read_number(&p, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &s, in PRIV()
1741 if (!read_number(&ptr, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &s, in PRIV()
1786 if (s < 10 || oldptr[-1] >= CHAR_8 || s <= (int)cb->bracount) in PRIV()
2065 uint16_t *pdataptr, int *errorcodeptr, compile_block *cb) in get_ucp() argument
2072 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2081 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2089 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2102 else if (MAX_255(c) && (cb->ctypes[c] & ctype_letter) != 0) in get_ucp()
2275 int *errorcodeptr, compile_block *cb) in read_name() argument
2288 *offsetptr = (PCRE2_SIZE)(ptr - cb->start_pattern); in read_name()
2334 while (ptr < ptrend && MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_word) != 0) in read_name()
2399 uint32_t *parsed_pattern, compile_block *cb) in manage_callouts() argument
2404 cb->start_pattern - (PCRE2_SIZE)previous_callout[1]); in manage_callouts()
2418 previous_callout[1] = (uint32_t)(ptr - cb->start_pattern); in manage_callouts()
2493 compile_block *cb) in parse_regex() argument
2502 uint32_t *parsed_pattern = cb->parsed_pattern; in parse_regex()
2503 uint32_t *parsed_pattern_end = cb->parsed_pattern_end; in parse_regex()
2506 uint32_t extra_options = cb->cx->extra_options; in parse_regex()
2522 PCRE2_SPTR ptrend = cb->end_pattern; in parse_regex()
2557 auto_callout, parsed_pattern, cb); in parse_regex()
2566 end_nests = (nest_save *)(cb->start_workspace + cb->workspace_size); in parse_regex()
2573 ((cb->workspace_size * sizeof(PCRE2_UCHAR)) % sizeof(nest_save))); in parse_regex()
2598 if (nest_depth > cb->cx->parens_nest_limit) in parse_regex()
2638 auto_callout, parsed_pattern, cb); in parse_regex()
2666 (c < 256 && c != CHAR_NUMBER_SIGN && (cb->ctypes[c] & ctype_space) == 0 in parse_regex()
2712 cb->cx->extra_options, FALSE, cb); in parse_regex()
2766 if (c < 256 && (cb->ctypes[c] & ctype_space) != 0) continue; in parse_regex()
2776 ptr += cb->nllen; in parse_regex()
2813 parsed_pattern, cb); in parse_regex()
2833 ok = MAX_255(ptr[1]) && (cb->ctypes[ptr[1]] & ctype_lcletter) != 0; in parse_regex()
2905 cb->cx->extra_options, FALSE, cb); in parse_regex()
2935 offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 1); in parse_regex()
2940 if (cb->small_ref_offset[escape] == PCRE2_UNSET) in parse_regex()
2941 cb->small_ref_offset[escape] = offset; in parse_regex()
3050 if (!get_ucp(&ptr, &negated, &ptype, &pdata, &errorcode, cb)) in parse_regex()
3087 if (read_number(&p, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &i, in parse_regex()
3104 &errorcode, cb)) goto ESCAPE_FAILED; in parse_regex()
3291 (cb->external_options & PCRE2_ALLOW_EMPTY_CLASS) != 0) in parse_regex()
3482 cb->cx->extra_options, TRUE, cb); in parse_regex()
3597 if (!get_ucp(&ptr, &negated, &ptype, &pdata, &errorcode, cb)) in parse_regex()
3670 if (cb->bracount >= MAX_GROUP_NUMBER) in parse_regex()
3675 cb->bracount++; in parse_regex()
3676 *parsed_pattern++ = META_CAPTURE | cb->bracount; in parse_regex()
3693 else if (CHMAX_255(c) && (cb->ctypes[c] & ctype_lcletter) != 0) in parse_regex()
3699 &errorcode, cb)) goto FAILED; in parse_regex()
3776 if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace); in parse_regex()
3801 &errorcode, cb)) goto FAILED; in parse_regex()
3908 if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace); in parse_regex()
3923 top_nest->reset_group = (uint16_t)cb->bracount; in parse_regex()
3924 top_nest->max_group = (uint16_t)cb->bracount; in parse_regex()
3926 cb->external_flags |= PCRE2_DUPCAPUSED; in parse_regex()
3971 cb->external_flags |= PCRE2_JCHANGED; in parse_regex()
4019 if (top_nest > (nest_save *)(cb->start_workspace) && in parse_regex()
4063 &namelen, &errorcode, cb)) goto FAILED; in parse_regex()
4098 (IS_DIGIT(*ptr))? -1:(int)(cb->bracount), /* + and - are relative */ in parse_regex()
4111 offset = (PCRE2_SIZE)(ptr - cb->start_pattern); in parse_regex()
4123 &namelen, &errorcode, cb)) goto FAILED; in parse_regex()
4206 offset = (PCRE2_SIZE)(startptr - cb->start_pattern); in parse_regex()
4242 previous_callout[1] = (uint32_t)(ptr - cb->start_pattern); in parse_regex()
4288 if (read_number(&ptr, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &i, in parse_regex()
4297 offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 2); in parse_regex()
4371 &errorcode, cb)) goto FAILED; in parse_regex()
4472 offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 2); in parse_regex()
4490 if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace); in parse_regex()
4514 &errorcode, cb)) goto FAILED; in parse_regex()
4519 if (cb->bracount >= MAX_GROUP_NUMBER) in parse_regex()
4524 cb->bracount++; in parse_regex()
4525 *parsed_pattern++ = META_CAPTURE | cb->bracount; in parse_regex()
4530 if (cb->names_found >= MAX_NAME_COUNT) in parse_regex()
4538 if (namelen + IMM2_SIZE + 1 > cb->name_entry_size) in parse_regex()
4539 cb->name_entry_size = (uint16_t)(namelen + IMM2_SIZE + 1); in parse_regex()
4549 ng = cb->named_groups; in parse_regex()
4550 for (i = 0; i < cb->names_found; i++, ng++) in parse_regex()
4555 if (ng->number == cb->bracount) break; in parse_regex()
4562 cb->dupnames = TRUE; /* Duplicate names exist */ in parse_regex()
4564 else if (ng->number == cb->bracount) in parse_regex()
4571 if (i < cb->names_found) break; /* Ignore duplicate with same number */ in parse_regex()
4575 if (cb->names_found >= cb->named_group_list_size) in parse_regex()
4577 uint32_t newsize = cb->named_group_list_size * 2; in parse_regex()
4579 cb->cx->memctl.malloc(newsize * sizeof(named_group), in parse_regex()
4580 cb->cx->memctl.memory_data); in parse_regex()
4587 memcpy(newspace, cb->named_groups, in parse_regex()
4588 cb->named_group_list_size * sizeof(named_group)); in parse_regex()
4589 if (cb->named_group_list_size > NAMED_GROUP_LIST_SIZE) in parse_regex()
4590 cb->cx->memctl.free((void *)cb->named_groups, in parse_regex()
4591 cb->cx->memctl.memory_data); in parse_regex()
4592 cb->named_groups = newspace; in parse_regex()
4593 cb->named_group_list_size = newsize; in parse_regex()
4598 cb->named_groups[cb->names_found].name = name; in parse_regex()
4599 cb->named_groups[cb->names_found].length = (uint16_t)namelen; in parse_regex()
4600 cb->named_groups[cb->names_found].number = cb->bracount; in parse_regex()
4601 cb->named_groups[cb->names_found].isdup = (uint16_t)isdupname; in parse_regex()
4602 cb->names_found++; in parse_regex()
4616 if (cb->bracount > top_nest->max_group) in parse_regex()
4617 top_nest->max_group = (uint16_t)cb->bracount; in parse_regex()
4618 cb->bracount = top_nest->reset_group; in parse_regex()
4633 top_nest->max_group > cb->bracount) in parse_regex()
4634 cb->bracount = top_nest->max_group; in parse_regex()
4643 if (top_nest == (nest_save *)(cb->start_workspace)) top_nest = NULL; in parse_regex()
4669 parsed_pattern, cb); in parse_regex()
4703 cb->erroroffset = (PCRE2_SIZE)(ptr - cb->start_pattern); in parse_regex()
4893 uint32_t options, compile_block *cb, uint32_t start, uint32_t end) in add_to_class_internal() argument
4919 if (rc > 0) n8 += add_list_to_class_internal(classbits, uchardptr, options, cb, in add_to_class_internal()
4924 else if (oc >= cb->class_range_start && od <= cb->class_range_end) continue; in add_to_class_internal()
4936 else n8 += add_to_class_internal(classbits, uchardptr, options, cb, oc, od); in add_to_class_internal()
4946 SETBIT(classbits, cb->fcc[c]); in add_to_class_internal()
4958 if (start > cb->class_range_start && end < cb->class_range_end) return n8; in add_to_class_internal()
5048 uint32_t options, compile_block *cb, const uint32_t *p, unsigned int except) in add_list_to_class_internal() argument
5057 n8 += add_to_class_internal(classbits, uchardptr, options, cb, p[0], p[n]); in add_list_to_class_internal()
5088 compile_block *cb, uint32_t start, uint32_t end) in add_to_class() argument
5090 cb->class_range_start = start; in add_to_class()
5091 cb->class_range_end = end; in add_to_class()
5092 return add_to_class_internal(classbits, uchardptr, options, cb, start, end); in add_to_class()
5122 compile_block *cb, const uint32_t *p, unsigned int except) in add_list_to_class() argument
5131 cb->class_range_start = p[0]; in add_list_to_class()
5132 cb->class_range_end = p[n]; in add_list_to_class()
5133 n8 += add_to_class_internal(classbits, uchardptr, options, cb, p[0], p[n]); in add_list_to_class()
5162 uint32_t options, compile_block *cb, const uint32_t *p) in add_not_list_to_class() argument
5167 n8 += add_to_class(classbits, uchardptr, options, cb, 0, p[0] - 1); in add_not_list_to_class()
5171 n8 += add_to_class(classbits, uchardptr, options, cb, p[0] + 1, in add_not_list_to_class()
5201 int *countptr, int *errorcodeptr, compile_block *cb) in find_dupname_details() argument
5205 PCRE2_UCHAR *slot = cb->name_table; in find_dupname_details()
5209 for (i = 0; i < cb->names_found; i++) in find_dupname_details()
5213 slot += cb->name_entry_size; in find_dupname_details()
5219 if (i >= cb->names_found) in find_dupname_details()
5222 cb->erroroffset = name - cb->start_pattern; in find_dupname_details()
5236 cb->backref_map |= (groupnumber < 32)? (1u << groupnumber) : 1; in find_dupname_details()
5237 if (groupnumber > cb->top_backref) cb->top_backref = groupnumber; in find_dupname_details()
5238 if (++i >= cb->names_found) break; in find_dupname_details()
5239 slot += cb->name_entry_size; in find_dupname_details()
5283 compile_block *cb, PCRE2_SIZE *lengthptr) in compile_branch() argument
5313 const uint8_t *cbits = cb->cbits; in compile_branch()
5396 if (code > cb->start_workspace + cb->workspace_size - in compile_branch()
5399 *errorcodeptr = (code >= cb->start_workspace + cb->workspace_size)? in compile_branch()
5612 d = TABLE_GET(c, cb->fcc, c); in compile_branch()
5849 options & ~PCRE2_CASELESS, cb, PRIV(hspace_list), NOTACHAR); in compile_branch()
5854 options & ~PCRE2_CASELESS, cb, PRIV(hspace_list)); in compile_branch()
5859 options & ~PCRE2_CASELESS, cb, PRIV(vspace_list), NOTACHAR); in compile_branch()
5864 options & ~PCRE2_CASELESS, cb, PRIV(vspace_list)); in compile_branch()
5903 if (c == CHAR_CR || c == CHAR_NL) cb->external_flags |= PCRE2_HASCRORLF; in compile_branch()
5918 if (d == CHAR_CR || d == CHAR_NL) cb->external_flags |= PCRE2_HASCRORLF; in compile_branch()
5927 (cb->ctypes[c] & ctype_letter) != 0 && in compile_branch()
5928 (cb->ctypes[d] & ctype_letter) != 0 && in compile_branch()
5938 add_to_class(classbits, &class_uchardata, options, cb, C + uc, in compile_branch()
5946 add_to_class(classbits, &class_uchardata, options, cb, C + uc, in compile_branch()
5954 add_to_class(classbits, &class_uchardata, options, cb, C + uc, in compile_branch()
5963 add_to_class(classbits, &class_uchardata, options, cb, c, d); in compile_branch()
5971 add_to_class(classbits, &class_uchardata, options, cb, meta, meta); in compile_branch()
6123 cb->had_accept = had_accept = TRUE; in compile_branch()
6124 for (oc = cb->open_caps; in compile_branch()
6125 oc != NULL && oc->assert_depth >= cb->assert_depth; in compile_branch()
6138 *code++ = (cb->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT; in compile_branch()
6144 cb->had_pruneorskip = TRUE; in compile_branch()
6152 cb->external_flags |= PCRE2_HASTHEN; in compile_branch()
6164 cb->external_flags |= PCRE2_HASTHEN; in compile_branch()
6169 cb->had_pruneorskip = TRUE; in compile_branch()
6229 named_group *ng = cb->named_groups; in compile_branch()
6233 name = cb->start_pattern + offset; in compile_branch()
6241 for (i = 0; i < cb->names_found; i++, ng++) in compile_branch()
6250 if (ng->number > cb->top_backref) cb->top_backref = ng->number; in compile_branch()
6262 if (i >= cb->names_found) in compile_branch()
6273 cb->erroroffset = offset + i; in compile_branch()
6279 if (meta != META_COND_RNUMBER || groupnumber > cb->bracount) in compile_branch()
6282 cb->erroroffset = offset; in compile_branch()
6308 &count, errorcodeptr, cb)) return 0; in compile_branch()
6337 if (groupnumber > cb->bracount) in compile_branch()
6340 cb->erroroffset = offset; in compile_branch()
6343 if (groupnumber > cb->top_backref) cb->top_backref = groupnumber; in compile_branch()
6378 cb->assert_depth += 1; in compile_branch()
6383 cb->assert_depth += 1; in compile_branch()
6402 cb->assert_depth += 1; in compile_branch()
6409 cb->assert_depth += 1; in compile_branch()
6414 cb->assert_depth += 1; in compile_branch()
6419 cb->assert_depth += 1; in compile_branch()
6444 cb->parens_depth += 1; in compile_branch()
6448 tempreqvary = cb->req_varyopt; /* Save value before group */ in compile_branch()
6463 cb, /* Compile data block */ in compile_branch()
6469 cb->parens_depth -= 1; in compile_branch()
6481 cb->assert_depth -= 1; in compile_branch()
6511 cb->erroroffset = offset; in compile_branch()
6528 cb->erroroffset = offset; in compile_branch()
6649 named_group *ng = cb->named_groups; in compile_branch()
6653 name = cb->start_pattern + offset; in compile_branch()
6661 for (i = 0; i < cb->names_found; i++, ng++) in compile_branch()
6682 cb->backref_map |= (groupnumber < 32)? (1u << groupnumber) : 1; in compile_branch()
6683 if (groupnumber > cb->top_backref) in compile_branch()
6684 cb->top_backref = groupnumber; in compile_branch()
6693 cb->erroroffset = offset; in compile_branch()
6713 &count, errorcodeptr, cb)) return 0; in compile_branch()
6768 pp = cb->start_pattern + offset; in compile_branch()
6923 reqcuflags = req_caseopt | cb->req_varyopt; in compile_branch()
7634 cb->req_varyopt |= reqvary; in compile_branch()
7654 if (meta_arg < 10) offset = cb->small_ref_offset[meta_arg]; in compile_branch()
7657 if (meta_arg > cb->bracount) in compile_branch()
7659 cb->erroroffset = offset; in compile_branch()
7680 cb->backref_map |= (meta_arg < 32)? (1u << meta_arg) : 1; in compile_branch()
7681 if (meta_arg > cb->top_backref) cb->top_backref = meta_arg; in compile_branch()
7696 if (meta_arg > cb->bracount) in compile_branch()
7698 cb->erroroffset = offset; in compile_branch()
7707 cb->had_recurse = TRUE; in compile_branch()
7721 cb->lastcapture = meta_arg; in compile_branch()
7789 if (meta_arg == ESC_C) cb->external_flags |= PCRE2_HASBKC; /* Record */ in compile_branch()
7791 cb->max_lookbehind == 0) in compile_branch()
7792 cb->max_lookbehind = 1; in compile_branch()
7874 cb->external_flags |= PCRE2_HASCRORLF; in compile_branch()
7898 reqcuflags = cb->req_varyopt; in compile_branch()
7916 reqcuflags = req_caseopt | cb->req_varyopt; in compile_branch()
7973 branch_chain *bcptr, compile_block *cb, PCRE2_SIZE *lengthptr) in compile_regex() argument
7993 if (cb->cx->stack_guard != NULL && in compile_regex()
7994 cb->cx->stack_guard(cb->parens_depth, cb->cx->stack_guard_data)) in compile_regex()
8040 capitem.next = cb->open_caps; in compile_regex()
8041 capitem.assert_depth = cb->assert_depth; in compile_regex()
8042 cb->open_caps = &capitem; in compile_regex()
8071 cb, (lengthptr == NULL)? NULL : &length)) == 0) in compile_regex()
8171 if (capnumber > 0) cb->open_caps = cb->open_caps->next; in compile_regex()
8269 is_anchored(PCRE2_SPTR code, unsigned int bracket_map, compile_block *cb, in is_anchored() argument
8282 if (!is_anchored(scode, bracket_map, cb, atomcount, inassert)) in is_anchored()
8293 if (!is_anchored(scode, new_map, cb, atomcount, inassert)) return FALSE; in is_anchored()
8300 if (!is_anchored(scode, bracket_map, cb, atomcount, TRUE)) return FALSE; in is_anchored()
8308 if (!is_anchored(scode, bracket_map, cb, atomcount, inassert)) in is_anchored()
8316 if (!is_anchored(scode, bracket_map, cb, atomcount + 1, inassert)) in is_anchored()
8330 if (scode[1] != OP_ALLANY || (bracket_map & cb->backref_map) != 0 || in is_anchored()
8331 atomcount > 0 || cb->had_pruneorskip || inassert || in is_anchored()
8332 (cb->external_options & PCRE2_NO_DOTSTAR_ANCHOR) != 0) in is_anchored()
8374 is_startline(PCRE2_SPTR code, unsigned int bracket_map, compile_block *cb, in is_startline() argument
8406 if (!is_startline(scode, bracket_map, cb, atomcount, TRUE)) return FALSE; in is_startline()
8420 if (!is_startline(scode, bracket_map, cb, atomcount, inassert)) in is_startline()
8431 if (!is_startline(scode, new_map, cb, atomcount, inassert)) return FALSE; in is_startline()
8438 if (!is_startline(scode, bracket_map, cb, atomcount, TRUE)) in is_startline()
8446 if (!is_startline(scode, bracket_map, cb, atomcount + 1, inassert)) in is_startline()
8459 if (scode[1] != OP_ANY || (bracket_map & cb->backref_map) != 0 || in is_startline()
8460 atomcount > 0 || cb->had_pruneorskip || inassert || in is_startline()
8461 (cb->external_options & PCRE2_NO_DOTSTAR_ANCHOR) != 0) in is_startline()
8758 add_name_to_table(compile_block *cb, PCRE2_SPTR name, int length, in add_name_to_table() argument
8762 PCRE2_UCHAR *slot = cb->name_table; in add_name_to_table()
8777 (void)memmove(slot + cb->name_entry_size, slot, in add_name_to_table()
8778 CU2BYTES((tablecount - i) * cb->name_entry_size)); in add_name_to_table()
8784 slot += cb->name_entry_size; in add_name_to_table()
8795 CU2BYTES(cb->name_entry_size - length - IMM2_SIZE)); in add_name_to_table()
8947 int group, parsed_recurse_check *recurses, compile_block *cb) in get_grouplength() argument
8957 if (group > 0 && (cb->external_flags & PCRE2_DUPCAPUSED) == 0) in get_grouplength()
8959 uint32_t groupinfo = cb->groupinfo[group]; in get_grouplength()
8972 branchlength = get_branchlength(pptrptr, errcodeptr, lcptr, recurses, cb); in get_grouplength()
8981 cb->groupinfo[group] |= (uint32_t)(GI_SET_FIXED_LENGTH | grouplength); in get_grouplength()
8985 if (group > 0) cb->groupinfo[group] |= GI_NOT_FIXED_LENGTH; in get_grouplength()
9011 parsed_recurse_check *recurses, compile_block *cb) in get_branchlength() argument
9115 if ((cb->external_options & PCRE2_UTF) != 0 && escape == ESC_C) in get_branchlength()
9132 *errcodeptr = check_lookbehinds(pptr + 1, &pptr, recurses, cb); in get_branchlength()
9168 if (!set_lookbehind_lengths(&pptr, errcodeptr, lcptr, recurses, cb)) in get_branchlength()
9179 if ((cb->external_options & PCRE2_MATCH_UNSET_BACKREF) != 0) in get_branchlength()
9188 named_group *ng = cb->named_groups; in get_branchlength()
9193 name = cb->start_pattern + offset; in get_branchlength()
9194 for (i = 0; i < cb->names_found; i++, ng++) in get_branchlength()
9207 cb->erroroffset = offset; in get_branchlength()
9216 (!is_dupname && (cb->external_flags & PCRE2_DUPCAPUSED) == 0)) in get_branchlength()
9226 if ((cb->external_options & PCRE2_MATCH_UNSET_BACKREF) != 0 || in get_branchlength()
9227 (cb->external_flags & PCRE2_DUPCAPUSED) != 0) in get_branchlength()
9232 offset = cb->small_ref_offset[group]; in get_branchlength()
9247 if (group > cb->bracount) in get_branchlength()
9249 cb->erroroffset = offset; in get_branchlength()
9254 for (gptr = cb->parsed_pattern; *gptr != META_END; gptr++) in get_branchlength()
9278 &this_recurse, cb); in get_branchlength()
9323 recurses, cb); in get_branchlength()
9422 parsed_recurse_check *recurses, compile_block *cb) in set_lookbehind_lengths() argument
9434 branchlength = get_branchlength(pptrptr, errcodeptr, lcptr, recurses, cb); in set_lookbehind_lengths()
9439 if (cb->erroroffset == PCRE2_UNSET) cb->erroroffset = offset; in set_lookbehind_lengths()
9442 if (branchlength > cb->max_lookbehind) cb->max_lookbehind = branchlength; in set_lookbehind_lengths()
9478 parsed_recurse_check *recurses, compile_block *cb) in check_lookbehinds() argument
9484 cb->erroroffset = PCRE2_UNSET; in check_lookbehinds()
9607 if (!set_lookbehind_lengths(&pptr, &errorcode, &loopcount, recurses, cb)) in check_lookbehinds()
9646 compile_block cb; /* "Static" compile-time data */ in pcre2_compile() local
9751 cb.lcc = tables + lcc_offset; /* Individual */ in pcre2_compile()
9752 cb.fcc = tables + fcc_offset; /* character */ in pcre2_compile()
9753 cb.cbits = tables + cbits_offset; /* tables */ in pcre2_compile()
9754 cb.ctypes = tables + ctypes_offset; in pcre2_compile()
9756 cb.assert_depth = 0; in pcre2_compile()
9757 cb.bracount = 0; in pcre2_compile()
9758 cb.cx = ccontext; in pcre2_compile()
9759 cb.dupnames = FALSE; in pcre2_compile()
9760 cb.end_pattern = pattern + patlen; in pcre2_compile()
9761 cb.erroroffset = 0; in pcre2_compile()
9762 cb.external_flags = 0; in pcre2_compile()
9763 cb.external_options = options; in pcre2_compile()
9764 cb.groupinfo = stack_groupinfo; in pcre2_compile()
9765 cb.had_recurse = FALSE; in pcre2_compile()
9766 cb.lastcapture = 0; in pcre2_compile()
9767 cb.max_lookbehind = 0; in pcre2_compile()
9768 cb.name_entry_size = 0; in pcre2_compile()
9769 cb.name_table = NULL; in pcre2_compile()
9770 cb.named_groups = named_groups; in pcre2_compile()
9771 cb.named_group_list_size = NAMED_GROUP_LIST_SIZE; in pcre2_compile()
9772 cb.names_found = 0; in pcre2_compile()
9773 cb.open_caps = NULL; in pcre2_compile()
9774 cb.parens_depth = 0; in pcre2_compile()
9775 cb.parsed_pattern = stack_parsed_pattern; in pcre2_compile()
9776 cb.req_varyopt = 0; in pcre2_compile()
9777 cb.start_code = cworkspace; in pcre2_compile()
9778 cb.start_pattern = pattern; in pcre2_compile()
9779 cb.start_workspace = cworkspace; in pcre2_compile()
9780 cb.workspace_size = COMPILE_WORK_SIZE; in pcre2_compile()
9786 cb.top_backref = 0; in pcre2_compile()
9787 cb.backref_map = 0; in pcre2_compile()
9799 for (i = 0; i < 10; i++) cb.small_ref_offset[i] = PCRE2_UNSET; in pcre2_compile()
9836 cb.external_options |= p->value; in pcre2_compile()
9895 if ((cb.external_options & (PCRE2_UTF|PCRE2_UCP)) != 0) in pcre2_compile()
9907 utf = (cb.external_options & PCRE2_UTF) != 0; in pcre2_compile()
9930 ucp = (cb.external_options & PCRE2_UCP) != 0; in pcre2_compile()
9931 if (ucp && (cb.external_options & PCRE2_NEVER_UCP) != 0) in pcre2_compile()
9944 cb.nltype = NLTYPE_FIXED; in pcre2_compile()
9948 cb.nllen = 1; in pcre2_compile()
9949 cb.nl[0] = CHAR_CR; in pcre2_compile()
9953 cb.nllen = 1; in pcre2_compile()
9954 cb.nl[0] = CHAR_NL; in pcre2_compile()
9958 cb.nllen = 1; in pcre2_compile()
9959 cb.nl[0] = CHAR_NUL; in pcre2_compile()
9963 cb.nllen = 2; in pcre2_compile()
9964 cb.nl[0] = CHAR_CR; in pcre2_compile()
9965 cb.nl[1] = CHAR_NL; in pcre2_compile()
9969 cb.nltype = NLTYPE_ANY; in pcre2_compile()
9973 cb.nltype = NLTYPE_ANYCRLF; in pcre2_compile()
9998 for (p = ptr; p < cb.end_pattern; p++) if (*p >= META_END) big32count++; in pcre2_compile()
10026 cb.parsed_pattern = heap_parsed_pattern; in pcre2_compile()
10028 cb.parsed_pattern_end = cb.parsed_pattern + parsed_size_needed + 1; in pcre2_compile()
10032 errorcode = parse_regex(ptr, cb.external_options, &has_lookbehind, &cb); in pcre2_compile()
10044 if (cb.bracount >= GROUPINFO_DEFAULT_SIZE) in pcre2_compile()
10046 cb.groupinfo = ccontext->memctl.malloc( in pcre2_compile()
10047 (cb.bracount + 1)*sizeof(uint32_t), ccontext->memctl.memory_data); in pcre2_compile()
10048 if (cb.groupinfo == NULL) in pcre2_compile()
10051 cb.erroroffset = 0; in pcre2_compile()
10055 memset(cb.groupinfo, 0, (cb.bracount + 1) * sizeof(uint32_t)); in pcre2_compile()
10062 errorcode = check_lookbehinds(cb.parsed_pattern, NULL, NULL, &cb); in pcre2_compile()
10070 show_parsed(&cb); in pcre2_compile()
10077 named_group *ng = cb.named_groups; in pcre2_compile()
10078 fprintf(stderr, "+++Captures: %d\n", cb.bracount); in pcre2_compile()
10079 for (i = 0; i < cb.names_found; i++, ng++) in pcre2_compile()
10098 cb.erroroffset = patlen; /* For any subsequent errors that do not set it */ in pcre2_compile()
10099 pptr = cb.parsed_pattern; in pcre2_compile()
10103 (void)compile_regex(cb.external_options, &code, &pptr, &errorcode, 0, &firstcu, in pcre2_compile()
10104 &firstcuflags, &reqcu, &reqcuflags, NULL, &cb, &length); in pcre2_compile()
10123 (PCRE2_SIZE)cb.names_found * (PCRE2_SIZE)cb.name_entry_size); in pcre2_compile()
10146 re->overall_options = cb.external_options; in pcre2_compile()
10148 re->flags = PCRE2_CODE_UNIT_WIDTH/8 | cb.external_flags | setflags; in pcre2_compile()
10160 re->name_entry_size = cb.name_entry_size; in pcre2_compile()
10161 re->name_count = cb.names_found; in pcre2_compile()
10174 cb.parens_depth = 0; in pcre2_compile()
10175 cb.assert_depth = 0; in pcre2_compile()
10176 cb.lastcapture = 0; in pcre2_compile()
10177 cb.name_table = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)); in pcre2_compile()
10178 cb.start_code = codestart; in pcre2_compile()
10179 cb.req_varyopt = 0; in pcre2_compile()
10180 cb.had_accept = FALSE; in pcre2_compile()
10181 cb.had_pruneorskip = FALSE; in pcre2_compile()
10182 cb.open_caps = NULL; in pcre2_compile()
10187 if (cb.names_found > 0) in pcre2_compile()
10189 named_group *ng = cb.named_groups; in pcre2_compile()
10190 for (i = 0; i < cb.names_found; i++, ng++) in pcre2_compile()
10191 add_name_to_table(&cb, ng->name, ng->length, ng->number, i); in pcre2_compile()
10198 pptr = cb.parsed_pattern; in pcre2_compile()
10202 &firstcu, &firstcuflags, &reqcu, &reqcuflags, NULL, &cb, NULL); in pcre2_compile()
10204 re->top_bracket = cb.bracount; in pcre2_compile()
10205 re->top_backref = cb.top_backref; in pcre2_compile()
10206 re->max_lookbehind = cb.max_lookbehind; in pcre2_compile()
10208 if (cb.had_accept) in pcre2_compile()
10236 if (errorcode == 0 && cb.had_recurse) in pcre2_compile()
10307 if (PRIV(auto_possessify)(temp, &cb) != 0) errorcode = ERR80; in pcre2_compile()
10321 is_anchored(codestart, 0, &cb, 0, FALSE)) in pcre2_compile()
10357 if (cb.fcc[firstcu] != firstcu) re->flags |= PCRE2_FIRSTCASELESS; in pcre2_compile()
10384 is_startline(codestart, 0, &cb, 0, FALSE)) in pcre2_compile()
10424 if (cb.fcc[reqcu] != reqcu) re->flags |= PCRE2_LASTCASELESS; in pcre2_compile()
10471 if (cb.parsed_pattern != stack_parsed_pattern) in pcre2_compile()
10472 ccontext->memctl.free(cb.parsed_pattern, ccontext->memctl.memory_data); in pcre2_compile()
10473 if (cb.named_group_list_size > NAMED_GROUP_LIST_SIZE) in pcre2_compile()
10474 ccontext->memctl.free((void *)cb.named_groups, ccontext->memctl.memory_data); in pcre2_compile()
10475 if (cb.groupinfo != stack_groupinfo) in pcre2_compile()
10476 ccontext->memctl.free((void *)cb.groupinfo, ccontext->memctl.memory_data); in pcre2_compile()
10486 ptr = pattern + cb.erroroffset; in pcre2_compile()