Lines Matching refs:cb

46 #define NLBLOCK cb             /* Block containing newline information */
927 static void show_parsed(compile_block *cb) in show_parsed() argument
929 uint32_t *pptr = cb->parsed_pattern; in show_parsed()
939 fprintf(stderr, "+++ %02d %.8x ", (int)(pptr - cb->parsed_pattern), *pptr); in show_parsed()
968 offset = cb->small_ref_offset[meta_arg]; in show_parsed()
1552 compile_block *cb) in PRIV()
1596 if (cb != NULL && (escape == ESC_P || escape == ESC_p || escape == ESC_X)) in PRIV()
1597 cb->external_flags |= PCRE2_HASBKPORX; /* Note \P, \p, or \X */ in PRIV()
1660 if (cb == NULL) in PRIV()
1802 if (!read_number(&p, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &s, in PRIV()
1822 if (!read_number(&ptr, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &s, in PRIV()
1870 (s < 10 || oldptr[-1] >= CHAR_8 || s <= (int)cb->bracount)) in PRIV()
2167 uint16_t *pdataptr, int *errorcodeptr, compile_block *cb) in get_ucp() argument
2176 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2185 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2195 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2203 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2219 else if (MAX_255(c) && (cb->ctypes[c] & ctype_letter) != 0) in get_ucp()
2465 int *errorcodeptr, compile_block *cb) in read_name() argument
2482 *offsetptr = (PCRE2_SIZE)(ptr - cb->start_pattern); in read_name()
2528 while (ptr < ptrend && MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_word) != 0) in read_name()
2595 uint32_t *parsed_pattern, compile_block *cb) in manage_callouts() argument
2600 cb->start_pattern - (PCRE2_SIZE)previous_callout[1]); in manage_callouts()
2614 previous_callout[1] = (uint32_t)(ptr - cb->start_pattern); in manage_callouts()
2773 compile_block *cb) in parse_regex() argument
2782 uint32_t *parsed_pattern = cb->parsed_pattern; in parse_regex()
2783 uint32_t *parsed_pattern_end = cb->parsed_pattern_end; in parse_regex()
2788 uint32_t xoptions = cb->cx->extra_options; in parse_regex()
2804 PCRE2_SPTR ptrend = cb->end_pattern; in parse_regex()
2839 auto_callout, parsed_pattern, cb); in parse_regex()
2848 end_nests = (nest_save *)(cb->start_workspace + cb->workspace_size); in parse_regex()
2855 ((cb->workspace_size * sizeof(PCRE2_UCHAR)) % sizeof(nest_save))); in parse_regex()
2881 if (nest_depth > cb->cx->parens_nest_limit) in parse_regex()
2932 auto_callout, parsed_pattern, cb); in parse_regex()
2960 (c < 256 && c != CHAR_NUMBER_SIGN && (cb->ctypes[c] & ctype_space) == 0 in parse_regex()
3006 xoptions, FALSE, cb); in parse_regex()
3065 if (c < 256 && (cb->ctypes[c] & ctype_space) != 0) continue; in parse_regex()
3075 ptr += cb->nllen; in parse_regex()
3113 parsed_pattern, cb); in parse_regex()
3135 ok = MAX_255(ptr[1]) && (cb->ctypes[ptr[1]] & ctype_lcletter) != 0; in parse_regex()
3206 xoptions, FALSE, cb); in parse_regex()
3236 offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 1); in parse_regex()
3241 if (cb->small_ref_offset[escape] == PCRE2_UNSET) in parse_regex()
3242 cb->small_ref_offset[escape] = offset; in parse_regex()
3334 if (!get_ucp(&ptr, &negated, &ptype, &pdata, &errorcode, cb)) in parse_regex()
3371 if (read_number(&p, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &i, in parse_regex()
3389 &errorcode, cb)) goto ESCAPE_FAILED; in parse_regex()
3577 (cb->external_options & PCRE2_ALLOW_EMPTY_CLASS) != 0) in parse_regex()
3774 xoptions, TRUE, cb); in parse_regex()
3864 if (!get_ucp(&ptr, &negated, &ptype, &pdata, &errorcode, cb)) in parse_regex()
3937 if (cb->bracount >= MAX_GROUP_NUMBER) in parse_regex()
3942 cb->bracount++; in parse_regex()
3943 *parsed_pattern++ = META_CAPTURE | cb->bracount; in parse_regex()
3960 else if (CHMAX_255(c) && (cb->ctypes[c] & ctype_lcletter) != 0) in parse_regex()
3966 &errorcode, cb)) goto FAILED; in parse_regex()
4043 if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace); in parse_regex()
4069 &errorcode, cb)) goto FAILED; in parse_regex()
4176 if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace); in parse_regex()
4192 top_nest->reset_group = (uint16_t)cb->bracount; in parse_regex()
4193 top_nest->max_group = (uint16_t)cb->bracount; in parse_regex()
4195 cb->external_flags |= PCRE2_DUPCAPUSED; in parse_regex()
4286 cb->external_flags |= PCRE2_JCHANGED; in parse_regex()
4336 if (top_nest > (nest_save *)(cb->start_workspace) && in parse_regex()
4381 &namelen, &errorcode, cb)) goto FAILED; in parse_regex()
4416 (IS_DIGIT(*ptr))? -1:(int)(cb->bracount), /* + and - are relative */ in parse_regex()
4429 offset = (PCRE2_SIZE)(ptr - cb->start_pattern); in parse_regex()
4441 &namelen, &errorcode, cb)) goto FAILED; in parse_regex()
4524 offset = (PCRE2_SIZE)(startptr - cb->start_pattern); in parse_regex()
4560 previous_callout[1] = (uint32_t)(ptr - cb->start_pattern); in parse_regex()
4606 if (read_number(&ptr, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &i, in parse_regex()
4615 offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 2); in parse_regex()
4690 &errorcode, cb)) goto FAILED; in parse_regex()
4791 offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 2); in parse_regex()
4809 if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace); in parse_regex()
4834 &errorcode, cb)) goto FAILED; in parse_regex()
4839 if (cb->bracount >= MAX_GROUP_NUMBER) in parse_regex()
4844 cb->bracount++; in parse_regex()
4845 *parsed_pattern++ = META_CAPTURE | cb->bracount; in parse_regex()
4850 if (cb->names_found >= MAX_NAME_COUNT) in parse_regex()
4858 if (namelen + IMM2_SIZE + 1 > cb->name_entry_size) in parse_regex()
4859 cb->name_entry_size = (uint16_t)(namelen + IMM2_SIZE + 1); in parse_regex()
4869 ng = cb->named_groups; in parse_regex()
4870 for (i = 0; i < cb->names_found; i++, ng++) in parse_regex()
4875 if (ng->number == cb->bracount) break; in parse_regex()
4882 cb->dupnames = TRUE; /* Duplicate names exist */ in parse_regex()
4884 else if (ng->number == cb->bracount) in parse_regex()
4891 if (i < cb->names_found) break; /* Ignore duplicate with same number */ in parse_regex()
4895 if (cb->names_found >= cb->named_group_list_size) in parse_regex()
4897 uint32_t newsize = cb->named_group_list_size * 2; in parse_regex()
4899 cb->cx->memctl.malloc(newsize * sizeof(named_group), in parse_regex()
4900 cb->cx->memctl.memory_data); in parse_regex()
4907 memcpy(newspace, cb->named_groups, in parse_regex()
4908 cb->named_group_list_size * sizeof(named_group)); in parse_regex()
4909 if (cb->named_group_list_size > NAMED_GROUP_LIST_SIZE) in parse_regex()
4910 cb->cx->memctl.free((void *)cb->named_groups, in parse_regex()
4911 cb->cx->memctl.memory_data); in parse_regex()
4912 cb->named_groups = newspace; in parse_regex()
4913 cb->named_group_list_size = newsize; in parse_regex()
4918 cb->named_groups[cb->names_found].name = name; in parse_regex()
4919 cb->named_groups[cb->names_found].length = (uint16_t)namelen; in parse_regex()
4920 cb->named_groups[cb->names_found].number = cb->bracount; in parse_regex()
4921 cb->named_groups[cb->names_found].isdup = (uint16_t)isdupname; in parse_regex()
4922 cb->names_found++; in parse_regex()
4936 if (cb->bracount > top_nest->max_group) in parse_regex()
4937 top_nest->max_group = (uint16_t)cb->bracount; in parse_regex()
4938 cb->bracount = top_nest->reset_group; in parse_regex()
4954 top_nest->max_group > cb->bracount) in parse_regex()
4955 cb->bracount = top_nest->max_group; in parse_regex()
4964 if (top_nest == (nest_save *)(cb->start_workspace)) top_nest = NULL; in parse_regex()
4990 parsed_pattern, cb); in parse_regex()
5024 cb->erroroffset = (PCRE2_SIZE)(ptr - cb->start_pattern); in parse_regex()
5231 uint32_t options, uint32_t xoptions, compile_block *cb, uint32_t start, in add_to_class_internal() argument
5260 options, xoptions, cb, PRIV(ucd_caseless_sets) + rc, oc); in add_to_class_internal()
5264 else if (oc >= cb->class_range_start && od <= cb->class_range_end) in add_to_class_internal()
5279 cb, oc, od); in add_to_class_internal()
5291 SETBIT(classbits, cb->fcc[c]); in add_to_class_internal()
5303 if (start > cb->class_range_start && end < cb->class_range_end) return n8; in add_to_class_internal()
5394 uint32_t options, uint32_t xoptions, compile_block *cb, const uint32_t *p, in add_list_to_class_internal() argument
5404 n8 += add_to_class_internal(classbits, uchardptr, options, xoptions, cb, in add_list_to_class_internal()
5437 uint32_t xoptions, compile_block *cb, uint32_t start, uint32_t end) in add_to_class() argument
5439 cb->class_range_start = start; in add_to_class()
5440 cb->class_range_end = end; in add_to_class()
5441 return add_to_class_internal(classbits, uchardptr, options, xoptions, cb, in add_to_class()
5473 uint32_t xoptions, compile_block *cb, const uint32_t *p, unsigned int except) in add_list_to_class() argument
5482 cb->class_range_start = p[0]; in add_list_to_class()
5483 cb->class_range_end = p[n]; in add_list_to_class()
5484 n8 += add_to_class_internal(classbits, uchardptr, options, xoptions, cb, in add_list_to_class()
5515 uint32_t options, uint32_t xoptions, compile_block *cb, const uint32_t *p) in add_not_list_to_class() argument
5520 n8 += add_to_class(classbits, uchardptr, options, xoptions, cb, 0, p[0] - 1); in add_not_list_to_class()
5524 n8 += add_to_class(classbits, uchardptr, options, xoptions, cb, p[0] + 1, in add_not_list_to_class()
5554 int *countptr, int *errorcodeptr, compile_block *cb) in find_dupname_details() argument
5558 PCRE2_UCHAR *slot = cb->name_table; in find_dupname_details()
5562 for (i = 0; i < cb->names_found; i++) in find_dupname_details()
5566 slot += cb->name_entry_size; in find_dupname_details()
5572 if (i >= cb->names_found) in find_dupname_details()
5575 cb->erroroffset = name - cb->start_pattern; in find_dupname_details()
5589 cb->backref_map |= (groupnumber < 32)? (1u << groupnumber) : 1; in find_dupname_details()
5590 if (groupnumber > cb->top_backref) cb->top_backref = groupnumber; in find_dupname_details()
5591 if (++i >= cb->names_found) break; in find_dupname_details()
5592 slot += cb->name_entry_size; in find_dupname_details()
5639 compile_block *cb, PCRE2_SIZE *lengthptr) in compile_branch() argument
5670 const uint8_t *cbits = cb->cbits; in compile_branch()
5752 if (code > cb->start_workspace + cb->workspace_size - in compile_branch()
5755 *errorcodeptr = (code >= cb->start_workspace + cb->workspace_size)? in compile_branch()
5975 d = TABLE_GET(c, cb->fcc, c); in compile_branch()
6219 options & ~PCRE2_CASELESS, xoptions, cb, PRIV(hspace_list), in compile_branch()
6225 options & ~PCRE2_CASELESS, xoptions, cb, PRIV(hspace_list)); in compile_branch()
6230 options & ~PCRE2_CASELESS, xoptions, cb, PRIV(vspace_list), in compile_branch()
6236 options & ~PCRE2_CASELESS, xoptions, cb, PRIV(vspace_list)); in compile_branch()
6275 if (c == CHAR_CR || c == CHAR_NL) cb->external_flags |= PCRE2_HASCRORLF; in compile_branch()
6290 if (d == CHAR_CR || d == CHAR_NL) cb->external_flags |= PCRE2_HASCRORLF; in compile_branch()
6299 (cb->ctypes[c] & ctype_letter) != 0 && in compile_branch()
6300 (cb->ctypes[d] & ctype_letter) != 0 && in compile_branch()
6311 cb, C + uc, ((D < CHAR_i)? D : CHAR_i) + uc); in compile_branch()
6319 cb, C + uc, ((D < CHAR_r)? D : CHAR_r) + uc); in compile_branch()
6327 cb, C + uc, D + uc); in compile_branch()
6335 options, xoptions, cb, c, d); in compile_branch()
6343 add_to_class(classbits, &class_uchardata, options, xoptions, cb, in compile_branch()
6496 cb->had_accept = had_accept = TRUE; in compile_branch()
6498 oc != NULL && oc->assert_depth >= cb->assert_depth; in compile_branch()
6511 *code++ = (cb->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT; in compile_branch()
6517 cb->had_pruneorskip = TRUE; in compile_branch()
6525 cb->external_flags |= PCRE2_HASTHEN; in compile_branch()
6537 cb->external_flags |= PCRE2_HASTHEN; in compile_branch()
6542 cb->had_pruneorskip = TRUE; in compile_branch()
6604 named_group *ng = cb->named_groups; in compile_branch()
6608 name = cb->start_pattern + offset; in compile_branch()
6616 for (i = 0; i < cb->names_found; i++, ng++) in compile_branch()
6625 if (ng->number > cb->top_backref) cb->top_backref = ng->number; in compile_branch()
6637 if (i >= cb->names_found) in compile_branch()
6648 cb->erroroffset = offset + i; in compile_branch()
6654 if (meta != META_COND_RNUMBER || groupnumber > cb->bracount) in compile_branch()
6657 cb->erroroffset = offset; in compile_branch()
6683 &count, errorcodeptr, cb)) return 0; in compile_branch()
6712 if (groupnumber > cb->bracount) in compile_branch()
6715 cb->erroroffset = offset; in compile_branch()
6718 if (groupnumber > cb->top_backref) cb->top_backref = groupnumber; in compile_branch()
6753 cb->assert_depth += 1; in compile_branch()
6758 cb->assert_depth += 1; in compile_branch()
6777 cb->assert_depth += 1; in compile_branch()
6784 cb->assert_depth += 1; in compile_branch()
6789 cb->assert_depth += 1; in compile_branch()
6794 cb->assert_depth += 1; in compile_branch()
6819 cb->parens_depth += 1; in compile_branch()
6823 tempreqvary = cb->req_varyopt; /* Save value before group */ in compile_branch()
6840 cb, /* Compile data block */ in compile_branch()
6846 cb->parens_depth -= 1; in compile_branch()
6858 cb->assert_depth -= 1; in compile_branch()
6888 cb->erroroffset = offset; in compile_branch()
6905 cb->erroroffset = offset; in compile_branch()
7026 named_group *ng = cb->named_groups; in compile_branch()
7030 name = cb->start_pattern + offset; in compile_branch()
7038 for (unsigned int i = 0; i < cb->names_found; i++, ng++) in compile_branch()
7059 cb->backref_map |= (groupnumber < 32)? (1u << groupnumber) : 1; in compile_branch()
7060 if (groupnumber > cb->top_backref) in compile_branch()
7061 cb->top_backref = groupnumber; in compile_branch()
7070 cb->erroroffset = offset; in compile_branch()
7090 &count, errorcodeptr, cb)) return 0; in compile_branch()
7145 pp = cb->start_pattern + offset; in compile_branch()
7304 reqcuflags = cb->req_varyopt; in compile_branch()
8008 cb->req_varyopt |= reqvary; in compile_branch()
8028 if (meta_arg < 10) offset = cb->small_ref_offset[meta_arg]; in compile_branch()
8031 if (meta_arg > cb->bracount) in compile_branch()
8033 cb->erroroffset = offset; in compile_branch()
8054 cb->backref_map |= (meta_arg < 32)? (1u << meta_arg) : 1; in compile_branch()
8055 if (meta_arg > cb->top_backref) cb->top_backref = meta_arg; in compile_branch()
8070 if (meta_arg > cb->bracount) in compile_branch()
8072 cb->erroroffset = offset; in compile_branch()
8081 cb->had_recurse = TRUE; in compile_branch()
8095 cb->lastcapture = meta_arg; in compile_branch()
8160 if (cb->assert_depth > 0 && meta_arg == ESC_K && in compile_branch()
8183 cb->external_flags |= PCRE2_HASBKC; /* Record */ in compile_branch()
8199 if (cb->max_lookbehind == 0) cb->max_lookbehind = 1; in compile_branch()
8279 cb->external_flags |= PCRE2_HASCRORLF; in compile_branch()
8303 reqcuflags = cb->req_varyopt; in compile_branch()
8321 reqcuflags = req_caseopt | cb->req_varyopt; in compile_branch()
8380 compile_block *cb, PCRE2_SIZE *lengthptr) in compile_regex() argument
8401 if (cb->cx->stack_guard != NULL && in compile_regex()
8402 cb->cx->stack_guard(cb->parens_depth, cb->cx->stack_guard_data)) in compile_regex()
8450 capitem.assert_depth = cb->assert_depth; in compile_regex()
8497 &bc, open_caps, cb, (lengthptr == NULL)? NULL : &length)) == 0) in compile_regex()
8691 is_anchored(PCRE2_SPTR code, uint32_t bracket_map, compile_block *cb, in is_anchored() argument
8704 if (!is_anchored(scode, bracket_map, cb, atomcount, inassert)) in is_anchored()
8715 if (!is_anchored(scode, new_map, cb, atomcount, inassert)) return FALSE; in is_anchored()
8722 if (!is_anchored(scode, bracket_map, cb, atomcount, TRUE)) return FALSE; in is_anchored()
8730 if (!is_anchored(scode, bracket_map, cb, atomcount, inassert)) in is_anchored()
8738 if (!is_anchored(scode, bracket_map, cb, atomcount + 1, inassert)) in is_anchored()
8752 if (scode[1] != OP_ALLANY || (bracket_map & cb->backref_map) != 0 || in is_anchored()
8753 atomcount > 0 || cb->had_pruneorskip || inassert || in is_anchored()
8754 (cb->external_options & PCRE2_NO_DOTSTAR_ANCHOR) != 0) in is_anchored()
8796 is_startline(PCRE2_SPTR code, unsigned int bracket_map, compile_block *cb, in is_startline() argument
8828 if (!is_startline(scode, bracket_map, cb, atomcount, TRUE)) return FALSE; in is_startline()
8842 if (!is_startline(scode, bracket_map, cb, atomcount, inassert)) in is_startline()
8853 if (!is_startline(scode, new_map, cb, atomcount, inassert)) return FALSE; in is_startline()
8860 if (!is_startline(scode, bracket_map, cb, atomcount, TRUE)) in is_startline()
8868 if (!is_startline(scode, bracket_map, cb, atomcount + 1, inassert)) in is_startline()
8881 if (scode[1] != OP_ANY || (bracket_map & cb->backref_map) != 0 || in is_startline()
8882 atomcount > 0 || cb->had_pruneorskip || inassert || in is_startline()
8883 (cb->external_options & PCRE2_NO_DOTSTAR_ANCHOR) != 0) in is_startline()
9179 add_name_to_table(compile_block *cb, PCRE2_SPTR name, int length, in add_name_to_table() argument
9183 PCRE2_UCHAR *slot = cb->name_table; in add_name_to_table()
9198 (void)memmove(slot + cb->name_entry_size, slot, in add_name_to_table()
9199 CU2BYTES((tablecount - i) * cb->name_entry_size)); in add_name_to_table()
9205 slot += cb->name_entry_size; in add_name_to_table()
9216 CU2BYTES(cb->name_entry_size - length - IMM2_SIZE)); in add_name_to_table()
9368 int *lcptr, int group, parsed_recurse_check *recurses, compile_block *cb) in get_grouplength() argument
9370 uint32_t *gi = cb->groupinfo + 2 * group; in get_grouplength()
9380 if (group > 0 && (cb->external_flags & PCRE2_DUPCAPUSED) == 0) in get_grouplength()
9397 recurses, cb); in get_grouplength()
9442 parsed_recurse_check *recurses, compile_block *cb) in get_branchlength() argument
9555 if ((cb->external_options & PCRE2_UTF) != 0 && escape == ESC_C) in get_branchlength()
9572 *errcodeptr = check_lookbehinds(pptr + 1, &pptr, recurses, cb, lcptr); in get_branchlength()
9608 if (!set_lookbehind_lengths(&pptr, errcodeptr, lcptr, recurses, cb)) in get_branchlength()
9619 if ((cb->external_options & PCRE2_MATCH_UNSET_BACKREF) != 0) in get_branchlength()
9628 named_group *ng = cb->named_groups; in get_branchlength()
9633 name = cb->start_pattern + offset; in get_branchlength()
9634 for (i = 0; i < cb->names_found; i++, ng++) in get_branchlength()
9647 cb->erroroffset = offset; in get_branchlength()
9656 (!is_dupname && (cb->external_flags & PCRE2_DUPCAPUSED) == 0)) in get_branchlength()
9666 if ((cb->external_options & PCRE2_MATCH_UNSET_BACKREF) != 0 || in get_branchlength()
9667 (cb->external_flags & PCRE2_DUPCAPUSED) != 0) in get_branchlength()
9672 offset = cb->small_ref_offset[group]; in get_branchlength()
9687 if (group > cb->bracount) in get_branchlength()
9689 cb->erroroffset = offset; in get_branchlength()
9694 for (gptr = cb->parsed_pattern; *gptr != META_END; gptr++) in get_branchlength()
9718 lcptr, group, &this_recurse, cb); in get_branchlength()
9764 lcptr, group, recurses, cb); in get_branchlength()
9872 parsed_recurse_check *recurses, compile_block *cb) in set_lookbehind_lengths() argument
9894 recurses, cb); in set_lookbehind_lengths()
9900 if (cb->erroroffset == PCRE2_UNSET) cb->erroroffset = offset; in set_lookbehind_lengths()
9907 if (branchlength > cb->max_lookbehind) cb->max_lookbehind = branchlength; in set_lookbehind_lengths()
9923 if ((uint32_t)maxlength > cb->max_varlookbehind) in set_lookbehind_lengths()
9926 cb->erroroffset = offset; in set_lookbehind_lengths()
9965 parsed_recurse_check *recurses, compile_block *cb, int *lcptr) in check_lookbehinds() argument
9970 cb->erroroffset = PCRE2_UNSET; in check_lookbehinds()
10093 if (!set_lookbehind_lengths(&pptr, &errorcode, lcptr, recurses, cb)) in check_lookbehinds()
10132 compile_block cb; /* "Static" compile-time data */ in pcre2_compile() local
10240 cb.lcc = tables + lcc_offset; /* Individual */ in pcre2_compile()
10241 cb.fcc = tables + fcc_offset; /* character */ in pcre2_compile()
10242 cb.cbits = tables + cbits_offset; /* tables */ in pcre2_compile()
10243 cb.ctypes = tables + ctypes_offset; in pcre2_compile()
10245 cb.assert_depth = 0; in pcre2_compile()
10246 cb.bracount = 0; in pcre2_compile()
10247 cb.cx = ccontext; in pcre2_compile()
10248 cb.dupnames = FALSE; in pcre2_compile()
10249 cb.end_pattern = pattern + patlen; in pcre2_compile()
10250 cb.erroroffset = 0; in pcre2_compile()
10251 cb.external_flags = 0; in pcre2_compile()
10252 cb.external_options = options; in pcre2_compile()
10253 cb.groupinfo = stack_groupinfo; in pcre2_compile()
10254 cb.had_recurse = FALSE; in pcre2_compile()
10255 cb.lastcapture = 0; in pcre2_compile()
10256 cb.max_lookbehind = 0; /* Max encountered */ in pcre2_compile()
10257 cb.max_varlookbehind = ccontext->max_varlookbehind; /* Limit */ in pcre2_compile()
10258 cb.name_entry_size = 0; in pcre2_compile()
10259 cb.name_table = NULL; in pcre2_compile()
10260 cb.named_groups = named_groups; in pcre2_compile()
10261 cb.named_group_list_size = NAMED_GROUP_LIST_SIZE; in pcre2_compile()
10262 cb.names_found = 0; in pcre2_compile()
10263 cb.parens_depth = 0; in pcre2_compile()
10264 cb.parsed_pattern = stack_parsed_pattern; in pcre2_compile()
10265 cb.req_varyopt = 0; in pcre2_compile()
10266 cb.start_code = cworkspace; in pcre2_compile()
10267 cb.start_pattern = pattern; in pcre2_compile()
10268 cb.start_workspace = cworkspace; in pcre2_compile()
10269 cb.workspace_size = COMPILE_WORK_SIZE; in pcre2_compile()
10275 cb.top_backref = 0; in pcre2_compile()
10276 cb.backref_map = 0; in pcre2_compile()
10288 for (i = 0; i < 10; i++) cb.small_ref_offset[i] = PCRE2_UNSET; in pcre2_compile()
10325 cb.external_options |= p->value; in pcre2_compile()
10384 if ((cb.external_options & (PCRE2_UTF|PCRE2_UCP)) != 0) in pcre2_compile()
10396 utf = (cb.external_options & PCRE2_UTF) != 0; in pcre2_compile()
10419 ucp = (cb.external_options & PCRE2_UCP) != 0; in pcre2_compile()
10420 if (ucp && (cb.external_options & PCRE2_NEVER_UCP) != 0) in pcre2_compile()
10433 cb.nltype = NLTYPE_FIXED; in pcre2_compile()
10437 cb.nllen = 1; in pcre2_compile()
10438 cb.nl[0] = CHAR_CR; in pcre2_compile()
10442 cb.nllen = 1; in pcre2_compile()
10443 cb.nl[0] = CHAR_NL; in pcre2_compile()
10447 cb.nllen = 1; in pcre2_compile()
10448 cb.nl[0] = CHAR_NUL; in pcre2_compile()
10452 cb.nllen = 2; in pcre2_compile()
10453 cb.nl[0] = CHAR_CR; in pcre2_compile()
10454 cb.nl[1] = CHAR_NL; in pcre2_compile()
10458 cb.nltype = NLTYPE_ANY; in pcre2_compile()
10462 cb.nltype = NLTYPE_ANYCRLF; in pcre2_compile()
10487 for (p = ptr; p < cb.end_pattern; p++) if (*p >= META_END) big32count++; in pcre2_compile()
10515 cb.parsed_pattern = heap_parsed_pattern; in pcre2_compile()
10517 cb.parsed_pattern_end = cb.parsed_pattern + parsed_size_needed + 1; in pcre2_compile()
10521 errorcode = parse_regex(ptr, cb.external_options, &has_lookbehind, &cb); in pcre2_compile()
10537 if (cb.bracount >= GROUPINFO_DEFAULT_SIZE/2) in pcre2_compile()
10539 cb.groupinfo = ccontext->memctl.malloc( in pcre2_compile()
10540 (2 * (cb.bracount + 1))*sizeof(uint32_t), ccontext->memctl.memory_data); in pcre2_compile()
10541 if (cb.groupinfo == NULL) in pcre2_compile()
10544 cb.erroroffset = 0; in pcre2_compile()
10548 memset(cb.groupinfo, 0, (2 * cb.bracount + 1) * sizeof(uint32_t)); in pcre2_compile()
10549 errorcode = check_lookbehinds(cb.parsed_pattern, NULL, NULL, &cb, &loopcount); in pcre2_compile()
10557 show_parsed(&cb); in pcre2_compile()
10564 named_group *ng = cb.named_groups; in pcre2_compile()
10565 fprintf(stderr, "+++Captures: %d\n", cb.bracount); in pcre2_compile()
10566 for (i = 0; i < cb.names_found; i++, ng++) in pcre2_compile()
10585 cb.erroroffset = patlen; /* For any subsequent errors that do not set it */ in pcre2_compile()
10586 pptr = cb.parsed_pattern; in pcre2_compile()
10590 (void)compile_regex(cb.external_options, ccontext->extra_options, &code, &pptr, in pcre2_compile()
10592 &cb, &length); in pcre2_compile()
10611 (PCRE2_SIZE)cb.names_found * (PCRE2_SIZE)cb.name_entry_size); in pcre2_compile()
10634 re->overall_options = cb.external_options; in pcre2_compile()
10636 re->flags = PCRE2_CODE_UNIT_WIDTH/8 | cb.external_flags | setflags; in pcre2_compile()
10648 re->name_entry_size = cb.name_entry_size; in pcre2_compile()
10649 re->name_count = cb.names_found; in pcre2_compile()
10662 cb.parens_depth = 0; in pcre2_compile()
10663 cb.assert_depth = 0; in pcre2_compile()
10664 cb.lastcapture = 0; in pcre2_compile()
10665 cb.name_table = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)); in pcre2_compile()
10666 cb.start_code = codestart; in pcre2_compile()
10667 cb.req_varyopt = 0; in pcre2_compile()
10668 cb.had_accept = FALSE; in pcre2_compile()
10669 cb.had_pruneorskip = FALSE; in pcre2_compile()
10674 if (cb.names_found > 0) in pcre2_compile()
10676 named_group *ng = cb.named_groups; in pcre2_compile()
10677 for (i = 0; i < cb.names_found; i++, ng++) in pcre2_compile()
10678 add_name_to_table(&cb, ng->name, ng->length, ng->number, i); in pcre2_compile()
10685 pptr = cb.parsed_pattern; in pcre2_compile()
10690 NULL, &cb, NULL); in pcre2_compile()
10692 re->top_bracket = cb.bracount; in pcre2_compile()
10693 re->top_backref = cb.top_backref; in pcre2_compile()
10694 re->max_lookbehind = cb.max_lookbehind; in pcre2_compile()
10696 if (cb.had_accept) in pcre2_compile()
10724 if (errorcode == 0 && cb.had_recurse) in pcre2_compile()
10795 if (PRIV(auto_possessify)(temp, &cb) != 0) errorcode = ERR80; in pcre2_compile()
10809 is_anchored(codestart, 0, &cb, 0, FALSE)) in pcre2_compile()
10845 if (cb.fcc[firstcu] != firstcu) re->flags |= PCRE2_FIRSTCASELESS; in pcre2_compile()
10872 is_startline(codestart, 0, &cb, 0, FALSE)) in pcre2_compile()
10912 if (cb.fcc[reqcu] != reqcu) re->flags |= PCRE2_LASTCASELESS; in pcre2_compile()
10959 if (cb.parsed_pattern != stack_parsed_pattern) in pcre2_compile()
10960 ccontext->memctl.free(cb.parsed_pattern, ccontext->memctl.memory_data); in pcre2_compile()
10961 if (cb.named_group_list_size > NAMED_GROUP_LIST_SIZE) in pcre2_compile()
10962 ccontext->memctl.free((void *)cb.named_groups, ccontext->memctl.memory_data); in pcre2_compile()
10963 if (cb.groupinfo != stack_groupinfo) in pcre2_compile()
10964 ccontext->memctl.free((void *)cb.groupinfo, ccontext->memctl.memory_data); in pcre2_compile()
10974 ptr = pattern + cb.erroroffset; in pcre2_compile()