Lines Matching refs:cb
46 #define NLBLOCK cb /* Block containing newline information */
928 static void show_parsed(compile_block *cb) in show_parsed() argument
930 uint32_t *pptr = cb->parsed_pattern; in show_parsed()
940 fprintf(stderr, "+++ %02d %.8x ", (int)(pptr - cb->parsed_pattern), *pptr); in show_parsed()
969 offset = cb->small_ref_offset[meta_arg]; in show_parsed()
1553 compile_block *cb) in PRIV()
1597 if (cb != NULL && (escape == ESC_P || escape == ESC_p || escape == ESC_X)) in PRIV()
1598 cb->external_flags |= PCRE2_HASBKPORX; /* Note \P, \p, or \X */ in PRIV()
1661 if (cb == NULL) in PRIV()
1803 if (!read_number(&p, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &s, in PRIV()
1823 if (!read_number(&ptr, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &s, in PRIV()
1871 (s < 10 || oldptr[-1] >= CHAR_8 || s <= (int)cb->bracount)) in PRIV()
2168 uint16_t *pdataptr, int *errorcodeptr, compile_block *cb) in get_ucp() argument
2177 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2186 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2196 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2204 if (ptr >= cb->end_pattern) goto ERROR_RETURN; in get_ucp()
2220 else if (MAX_255(c) && (cb->ctypes[c] & ctype_letter) != 0) in get_ucp()
2466 int *errorcodeptr, compile_block *cb) in read_name() argument
2483 *offsetptr = (PCRE2_SIZE)(ptr - cb->start_pattern); in read_name()
2529 while (ptr < ptrend && MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_word) != 0) in read_name()
2596 uint32_t *parsed_pattern, compile_block *cb) in manage_callouts() argument
2601 cb->start_pattern - (PCRE2_SIZE)previous_callout[1]); in manage_callouts()
2615 previous_callout[1] = (uint32_t)(ptr - cb->start_pattern); in manage_callouts()
2774 compile_block *cb) in parse_regex() argument
2783 uint32_t *parsed_pattern = cb->parsed_pattern; in parse_regex()
2784 uint32_t *parsed_pattern_end = cb->parsed_pattern_end; in parse_regex()
2789 uint32_t xoptions = cb->cx->extra_options; in parse_regex()
2805 PCRE2_SPTR ptrend = cb->end_pattern; in parse_regex()
2840 auto_callout, parsed_pattern, cb); in parse_regex()
2849 end_nests = (nest_save *)(cb->start_workspace + cb->workspace_size); in parse_regex()
2856 ((cb->workspace_size * sizeof(PCRE2_UCHAR)) % sizeof(nest_save))); in parse_regex()
2882 if (nest_depth > cb->cx->parens_nest_limit) in parse_regex()
2933 auto_callout, parsed_pattern, cb); in parse_regex()
2961 (c < 256 && c != CHAR_NUMBER_SIGN && (cb->ctypes[c] & ctype_space) == 0 in parse_regex()
3007 xoptions, FALSE, cb); in parse_regex()
3066 if (c < 256 && (cb->ctypes[c] & ctype_space) != 0) continue; in parse_regex()
3076 ptr += cb->nllen; in parse_regex()
3114 parsed_pattern, cb); in parse_regex()
3136 ok = MAX_255(ptr[1]) && (cb->ctypes[ptr[1]] & ctype_lcletter) != 0; in parse_regex()
3207 xoptions, FALSE, cb); in parse_regex()
3237 offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 1); in parse_regex()
3242 if (cb->small_ref_offset[escape] == PCRE2_UNSET) in parse_regex()
3243 cb->small_ref_offset[escape] = offset; in parse_regex()
3335 if (!get_ucp(&ptr, &negated, &ptype, &pdata, &errorcode, cb)) in parse_regex()
3372 if (read_number(&p, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &i, in parse_regex()
3390 &errorcode, cb)) goto ESCAPE_FAILED; in parse_regex()
3578 (cb->external_options & PCRE2_ALLOW_EMPTY_CLASS) != 0) in parse_regex()
3775 xoptions, TRUE, cb); in parse_regex()
3865 if (!get_ucp(&ptr, &negated, &ptype, &pdata, &errorcode, cb)) in parse_regex()
3938 if (cb->bracount >= MAX_GROUP_NUMBER) in parse_regex()
3943 cb->bracount++; in parse_regex()
3944 *parsed_pattern++ = META_CAPTURE | cb->bracount; in parse_regex()
3961 else if (CHMAX_255(c) && (cb->ctypes[c] & ctype_lcletter) != 0) in parse_regex()
3967 &errorcode, cb)) goto FAILED; in parse_regex()
4044 if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace); in parse_regex()
4070 &errorcode, cb)) goto FAILED; in parse_regex()
4177 if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace); in parse_regex()
4193 top_nest->reset_group = (uint16_t)cb->bracount; in parse_regex()
4194 top_nest->max_group = (uint16_t)cb->bracount; in parse_regex()
4196 cb->external_flags |= PCRE2_DUPCAPUSED; in parse_regex()
4287 cb->external_flags |= PCRE2_JCHANGED; in parse_regex()
4337 if (top_nest > (nest_save *)(cb->start_workspace) && in parse_regex()
4382 &namelen, &errorcode, cb)) goto FAILED; in parse_regex()
4417 (IS_DIGIT(*ptr))? -1:(int)(cb->bracount), /* + and - are relative */ in parse_regex()
4430 offset = (PCRE2_SIZE)(ptr - cb->start_pattern); in parse_regex()
4442 &namelen, &errorcode, cb)) goto FAILED; in parse_regex()
4525 offset = (PCRE2_SIZE)(startptr - cb->start_pattern); in parse_regex()
4561 previous_callout[1] = (uint32_t)(ptr - cb->start_pattern); in parse_regex()
4607 if (read_number(&ptr, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &i, in parse_regex()
4616 offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 2); in parse_regex()
4691 &errorcode, cb)) goto FAILED; in parse_regex()
4792 offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 2); in parse_regex()
4810 if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace); in parse_regex()
4835 &errorcode, cb)) goto FAILED; in parse_regex()
4840 if (cb->bracount >= MAX_GROUP_NUMBER) in parse_regex()
4845 cb->bracount++; in parse_regex()
4846 *parsed_pattern++ = META_CAPTURE | cb->bracount; in parse_regex()
4851 if (cb->names_found >= MAX_NAME_COUNT) in parse_regex()
4859 if (namelen + IMM2_SIZE + 1 > cb->name_entry_size) in parse_regex()
4860 cb->name_entry_size = (uint16_t)(namelen + IMM2_SIZE + 1); in parse_regex()
4870 ng = cb->named_groups; in parse_regex()
4871 for (i = 0; i < cb->names_found; i++, ng++) in parse_regex()
4876 if (ng->number == cb->bracount) break; in parse_regex()
4883 cb->dupnames = TRUE; /* Duplicate names exist */ in parse_regex()
4885 else if (ng->number == cb->bracount) in parse_regex()
4892 if (i < cb->names_found) break; /* Ignore duplicate with same number */ in parse_regex()
4896 if (cb->names_found >= cb->named_group_list_size) in parse_regex()
4898 uint32_t newsize = cb->named_group_list_size * 2; in parse_regex()
4900 cb->cx->memctl.malloc(newsize * sizeof(named_group), in parse_regex()
4901 cb->cx->memctl.memory_data); in parse_regex()
4908 memcpy(newspace, cb->named_groups, in parse_regex()
4909 cb->named_group_list_size * sizeof(named_group)); in parse_regex()
4910 if (cb->named_group_list_size > NAMED_GROUP_LIST_SIZE) in parse_regex()
4911 cb->cx->memctl.free((void *)cb->named_groups, in parse_regex()
4912 cb->cx->memctl.memory_data); in parse_regex()
4913 cb->named_groups = newspace; in parse_regex()
4914 cb->named_group_list_size = newsize; in parse_regex()
4919 cb->named_groups[cb->names_found].name = name; in parse_regex()
4920 cb->named_groups[cb->names_found].length = (uint16_t)namelen; in parse_regex()
4921 cb->named_groups[cb->names_found].number = cb->bracount; in parse_regex()
4922 cb->named_groups[cb->names_found].isdup = (uint16_t)isdupname; in parse_regex()
4923 cb->names_found++; in parse_regex()
4937 if (cb->bracount > top_nest->max_group) in parse_regex()
4938 top_nest->max_group = (uint16_t)cb->bracount; in parse_regex()
4939 cb->bracount = top_nest->reset_group; in parse_regex()
4955 top_nest->max_group > cb->bracount) in parse_regex()
4956 cb->bracount = top_nest->max_group; in parse_regex()
4965 if (top_nest == (nest_save *)(cb->start_workspace)) top_nest = NULL; in parse_regex()
4991 parsed_pattern, cb); in parse_regex()
5025 cb->erroroffset = (PCRE2_SIZE)(ptr - cb->start_pattern); in parse_regex()
5232 uint32_t options, uint32_t xoptions, compile_block *cb, uint32_t start, in add_to_class_internal() argument
5261 options, xoptions, cb, PRIV(ucd_caseless_sets) + rc, oc); in add_to_class_internal()
5265 else if (oc >= cb->class_range_start && od <= cb->class_range_end) in add_to_class_internal()
5280 cb, oc, od); in add_to_class_internal()
5292 SETBIT(classbits, cb->fcc[c]); in add_to_class_internal()
5304 if (start > cb->class_range_start && end < cb->class_range_end) return n8; in add_to_class_internal()
5395 uint32_t options, uint32_t xoptions, compile_block *cb, const uint32_t *p, in add_list_to_class_internal() argument
5405 n8 += add_to_class_internal(classbits, uchardptr, options, xoptions, cb, in add_list_to_class_internal()
5438 uint32_t xoptions, compile_block *cb, uint32_t start, uint32_t end) in add_to_class() argument
5440 cb->class_range_start = start; in add_to_class()
5441 cb->class_range_end = end; in add_to_class()
5442 return add_to_class_internal(classbits, uchardptr, options, xoptions, cb, in add_to_class()
5474 uint32_t xoptions, compile_block *cb, const uint32_t *p, unsigned int except) in add_list_to_class() argument
5483 cb->class_range_start = p[0]; in add_list_to_class()
5484 cb->class_range_end = p[n]; in add_list_to_class()
5485 n8 += add_to_class_internal(classbits, uchardptr, options, xoptions, cb, in add_list_to_class()
5516 uint32_t options, uint32_t xoptions, compile_block *cb, const uint32_t *p) in add_not_list_to_class() argument
5521 n8 += add_to_class(classbits, uchardptr, options, xoptions, cb, 0, p[0] - 1); in add_not_list_to_class()
5525 n8 += add_to_class(classbits, uchardptr, options, xoptions, cb, p[0] + 1, in add_not_list_to_class()
5555 int *countptr, int *errorcodeptr, compile_block *cb) in find_dupname_details() argument
5559 PCRE2_UCHAR *slot = cb->name_table; in find_dupname_details()
5563 for (i = 0; i < cb->names_found; i++) in find_dupname_details()
5567 slot += cb->name_entry_size; in find_dupname_details()
5573 if (i >= cb->names_found) in find_dupname_details()
5576 cb->erroroffset = name - cb->start_pattern; in find_dupname_details()
5590 cb->backref_map |= (groupnumber < 32)? (1u << groupnumber) : 1; in find_dupname_details()
5591 if (groupnumber > cb->top_backref) cb->top_backref = groupnumber; in find_dupname_details()
5592 if (++i >= cb->names_found) break; in find_dupname_details()
5593 slot += cb->name_entry_size; in find_dupname_details()
5640 compile_block *cb, PCRE2_SIZE *lengthptr) in compile_branch() argument
5671 const uint8_t *cbits = cb->cbits; in compile_branch()
5753 if (code > cb->start_workspace + cb->workspace_size - in compile_branch()
5756 *errorcodeptr = (code >= cb->start_workspace + cb->workspace_size)? in compile_branch()
5976 d = TABLE_GET(c, cb->fcc, c); in compile_branch()
6220 options & ~PCRE2_CASELESS, xoptions, cb, PRIV(hspace_list), in compile_branch()
6226 options & ~PCRE2_CASELESS, xoptions, cb, PRIV(hspace_list)); in compile_branch()
6231 options & ~PCRE2_CASELESS, xoptions, cb, PRIV(vspace_list), in compile_branch()
6237 options & ~PCRE2_CASELESS, xoptions, cb, PRIV(vspace_list)); in compile_branch()
6276 if (c == CHAR_CR || c == CHAR_NL) cb->external_flags |= PCRE2_HASCRORLF; in compile_branch()
6291 if (d == CHAR_CR || d == CHAR_NL) cb->external_flags |= PCRE2_HASCRORLF; in compile_branch()
6300 (cb->ctypes[c] & ctype_letter) != 0 && in compile_branch()
6301 (cb->ctypes[d] & ctype_letter) != 0 && in compile_branch()
6312 cb, C + uc, ((D < CHAR_i)? D : CHAR_i) + uc); in compile_branch()
6320 cb, C + uc, ((D < CHAR_r)? D : CHAR_r) + uc); in compile_branch()
6328 cb, C + uc, D + uc); in compile_branch()
6336 options, xoptions, cb, c, d); in compile_branch()
6344 add_to_class(classbits, &class_uchardata, options, xoptions, cb, in compile_branch()
6497 cb->had_accept = had_accept = TRUE; in compile_branch()
6499 oc != NULL && oc->assert_depth >= cb->assert_depth; in compile_branch()
6512 *code++ = (cb->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT; in compile_branch()
6518 cb->had_pruneorskip = TRUE; in compile_branch()
6526 cb->external_flags |= PCRE2_HASTHEN; in compile_branch()
6538 cb->external_flags |= PCRE2_HASTHEN; in compile_branch()
6543 cb->had_pruneorskip = TRUE; in compile_branch()
6605 named_group *ng = cb->named_groups; in compile_branch()
6609 name = cb->start_pattern + offset; in compile_branch()
6617 for (i = 0; i < cb->names_found; i++, ng++) in compile_branch()
6626 if (ng->number > cb->top_backref) cb->top_backref = ng->number; in compile_branch()
6638 if (i >= cb->names_found) in compile_branch()
6649 cb->erroroffset = offset + i; in compile_branch()
6655 if (meta != META_COND_RNUMBER || groupnumber > cb->bracount) in compile_branch()
6658 cb->erroroffset = offset; in compile_branch()
6684 &count, errorcodeptr, cb)) return 0; in compile_branch()
6713 if (groupnumber > cb->bracount) in compile_branch()
6716 cb->erroroffset = offset; in compile_branch()
6719 if (groupnumber > cb->top_backref) cb->top_backref = groupnumber; in compile_branch()
6754 cb->assert_depth += 1; in compile_branch()
6759 cb->assert_depth += 1; in compile_branch()
6778 cb->assert_depth += 1; in compile_branch()
6785 cb->assert_depth += 1; in compile_branch()
6790 cb->assert_depth += 1; in compile_branch()
6795 cb->assert_depth += 1; in compile_branch()
6820 cb->parens_depth += 1; in compile_branch()
6824 tempreqvary = cb->req_varyopt; /* Save value before group */ in compile_branch()
6841 cb, /* Compile data block */ in compile_branch()
6847 cb->parens_depth -= 1; in compile_branch()
6859 cb->assert_depth -= 1; in compile_branch()
6889 cb->erroroffset = offset; in compile_branch()
6906 cb->erroroffset = offset; in compile_branch()
7027 named_group *ng = cb->named_groups; in compile_branch()
7031 name = cb->start_pattern + offset; in compile_branch()
7039 for (unsigned int i = 0; i < cb->names_found; i++, ng++) in compile_branch()
7060 cb->backref_map |= (groupnumber < 32)? (1u << groupnumber) : 1; in compile_branch()
7061 if (groupnumber > cb->top_backref) in compile_branch()
7062 cb->top_backref = groupnumber; in compile_branch()
7071 cb->erroroffset = offset; in compile_branch()
7091 &count, errorcodeptr, cb)) return 0; in compile_branch()
7146 pp = cb->start_pattern + offset; in compile_branch()
7305 reqcuflags = cb->req_varyopt; in compile_branch()
8010 cb->req_varyopt |= reqvary; in compile_branch()
8030 if (meta_arg < 10) offset = cb->small_ref_offset[meta_arg]; in compile_branch()
8033 if (meta_arg > cb->bracount) in compile_branch()
8035 cb->erroroffset = offset; in compile_branch()
8056 cb->backref_map |= (meta_arg < 32)? (1u << meta_arg) : 1; in compile_branch()
8057 if (meta_arg > cb->top_backref) cb->top_backref = meta_arg; in compile_branch()
8072 if (meta_arg > cb->bracount) in compile_branch()
8074 cb->erroroffset = offset; in compile_branch()
8083 cb->had_recurse = TRUE; in compile_branch()
8097 cb->lastcapture = meta_arg; in compile_branch()
8162 if (cb->assert_depth > 0 && meta_arg == ESC_K && in compile_branch()
8185 cb->external_flags |= PCRE2_HASBKC; /* Record */ in compile_branch()
8201 if (cb->max_lookbehind == 0) cb->max_lookbehind = 1; in compile_branch()
8281 cb->external_flags |= PCRE2_HASCRORLF; in compile_branch()
8305 reqcuflags = cb->req_varyopt; in compile_branch()
8323 reqcuflags = req_caseopt | cb->req_varyopt; in compile_branch()
8382 compile_block *cb, PCRE2_SIZE *lengthptr) in compile_regex() argument
8403 if (cb->cx->stack_guard != NULL && in compile_regex()
8404 cb->cx->stack_guard(cb->parens_depth, cb->cx->stack_guard_data)) in compile_regex()
8452 capitem.assert_depth = cb->assert_depth; in compile_regex()
8499 &bc, open_caps, cb, (lengthptr == NULL)? NULL : &length)) == 0) in compile_regex()
8693 is_anchored(PCRE2_SPTR code, uint32_t bracket_map, compile_block *cb, in is_anchored() argument
8706 if (!is_anchored(scode, bracket_map, cb, atomcount, inassert)) in is_anchored()
8717 if (!is_anchored(scode, new_map, cb, atomcount, inassert)) return FALSE; in is_anchored()
8724 if (!is_anchored(scode, bracket_map, cb, atomcount, TRUE)) return FALSE; in is_anchored()
8732 if (!is_anchored(scode, bracket_map, cb, atomcount, inassert)) in is_anchored()
8740 if (!is_anchored(scode, bracket_map, cb, atomcount + 1, inassert)) in is_anchored()
8754 if (scode[1] != OP_ALLANY || (bracket_map & cb->backref_map) != 0 || in is_anchored()
8755 atomcount > 0 || cb->had_pruneorskip || inassert || in is_anchored()
8756 (cb->external_options & PCRE2_NO_DOTSTAR_ANCHOR) != 0) in is_anchored()
8798 is_startline(PCRE2_SPTR code, unsigned int bracket_map, compile_block *cb, in is_startline() argument
8830 if (!is_startline(scode, bracket_map, cb, atomcount, TRUE)) return FALSE; in is_startline()
8844 if (!is_startline(scode, bracket_map, cb, atomcount, inassert)) in is_startline()
8855 if (!is_startline(scode, new_map, cb, atomcount, inassert)) return FALSE; in is_startline()
8862 if (!is_startline(scode, bracket_map, cb, atomcount, TRUE)) in is_startline()
8870 if (!is_startline(scode, bracket_map, cb, atomcount + 1, inassert)) in is_startline()
8883 if (scode[1] != OP_ANY || (bracket_map & cb->backref_map) != 0 || in is_startline()
8884 atomcount > 0 || cb->had_pruneorskip || inassert || in is_startline()
8885 (cb->external_options & PCRE2_NO_DOTSTAR_ANCHOR) != 0) in is_startline()
9181 add_name_to_table(compile_block *cb, PCRE2_SPTR name, int length, in add_name_to_table() argument
9185 PCRE2_UCHAR *slot = cb->name_table; in add_name_to_table()
9200 (void)memmove(slot + cb->name_entry_size, slot, in add_name_to_table()
9201 CU2BYTES((tablecount - i) * cb->name_entry_size)); in add_name_to_table()
9207 slot += cb->name_entry_size; in add_name_to_table()
9218 CU2BYTES(cb->name_entry_size - length - IMM2_SIZE)); in add_name_to_table()
9370 int *lcptr, int group, parsed_recurse_check *recurses, compile_block *cb) in get_grouplength() argument
9372 uint32_t *gi = cb->groupinfo + 2 * group; in get_grouplength()
9382 if (group > 0 && (cb->external_flags & PCRE2_DUPCAPUSED) == 0) in get_grouplength()
9399 recurses, cb); in get_grouplength()
9444 parsed_recurse_check *recurses, compile_block *cb) in get_branchlength() argument
9557 if ((cb->external_options & PCRE2_UTF) != 0 && escape == ESC_C) in get_branchlength()
9574 *errcodeptr = check_lookbehinds(pptr + 1, &pptr, recurses, cb, lcptr); in get_branchlength()
9610 if (!set_lookbehind_lengths(&pptr, errcodeptr, lcptr, recurses, cb)) in get_branchlength()
9621 if ((cb->external_options & PCRE2_MATCH_UNSET_BACKREF) != 0) in get_branchlength()
9630 named_group *ng = cb->named_groups; in get_branchlength()
9635 name = cb->start_pattern + offset; in get_branchlength()
9636 for (i = 0; i < cb->names_found; i++, ng++) in get_branchlength()
9649 cb->erroroffset = offset; in get_branchlength()
9658 (!is_dupname && (cb->external_flags & PCRE2_DUPCAPUSED) == 0)) in get_branchlength()
9668 if ((cb->external_options & PCRE2_MATCH_UNSET_BACKREF) != 0 || in get_branchlength()
9669 (cb->external_flags & PCRE2_DUPCAPUSED) != 0) in get_branchlength()
9674 offset = cb->small_ref_offset[group]; in get_branchlength()
9689 if (group > cb->bracount) in get_branchlength()
9691 cb->erroroffset = offset; in get_branchlength()
9696 for (gptr = cb->parsed_pattern; *gptr != META_END; gptr++) in get_branchlength()
9720 lcptr, group, &this_recurse, cb); in get_branchlength()
9766 lcptr, group, recurses, cb); in get_branchlength()
9874 parsed_recurse_check *recurses, compile_block *cb) in set_lookbehind_lengths() argument
9896 recurses, cb); in set_lookbehind_lengths()
9902 if (cb->erroroffset == PCRE2_UNSET) cb->erroroffset = offset; in set_lookbehind_lengths()
9909 if (branchlength > cb->max_lookbehind) cb->max_lookbehind = branchlength; in set_lookbehind_lengths()
9925 if ((uint32_t)maxlength > cb->max_varlookbehind) in set_lookbehind_lengths()
9928 cb->erroroffset = offset; in set_lookbehind_lengths()
9967 parsed_recurse_check *recurses, compile_block *cb, int *lcptr) in check_lookbehinds() argument
9972 cb->erroroffset = PCRE2_UNSET; in check_lookbehinds()
10095 if (!set_lookbehind_lengths(&pptr, &errorcode, lcptr, recurses, cb)) in check_lookbehinds()
10134 compile_block cb; /* "Static" compile-time data */ in pcre2_compile() local
10242 cb.lcc = tables + lcc_offset; /* Individual */ in pcre2_compile()
10243 cb.fcc = tables + fcc_offset; /* character */ in pcre2_compile()
10244 cb.cbits = tables + cbits_offset; /* tables */ in pcre2_compile()
10245 cb.ctypes = tables + ctypes_offset; in pcre2_compile()
10247 cb.assert_depth = 0; in pcre2_compile()
10248 cb.bracount = 0; in pcre2_compile()
10249 cb.cx = ccontext; in pcre2_compile()
10250 cb.dupnames = FALSE; in pcre2_compile()
10251 cb.end_pattern = pattern + patlen; in pcre2_compile()
10252 cb.erroroffset = 0; in pcre2_compile()
10253 cb.external_flags = 0; in pcre2_compile()
10254 cb.external_options = options; in pcre2_compile()
10255 cb.groupinfo = stack_groupinfo; in pcre2_compile()
10256 cb.had_recurse = FALSE; in pcre2_compile()
10257 cb.lastcapture = 0; in pcre2_compile()
10258 cb.max_lookbehind = 0; /* Max encountered */ in pcre2_compile()
10259 cb.max_varlookbehind = ccontext->max_varlookbehind; /* Limit */ in pcre2_compile()
10260 cb.name_entry_size = 0; in pcre2_compile()
10261 cb.name_table = NULL; in pcre2_compile()
10262 cb.named_groups = named_groups; in pcre2_compile()
10263 cb.named_group_list_size = NAMED_GROUP_LIST_SIZE; in pcre2_compile()
10264 cb.names_found = 0; in pcre2_compile()
10265 cb.parens_depth = 0; in pcre2_compile()
10266 cb.parsed_pattern = stack_parsed_pattern; in pcre2_compile()
10267 cb.req_varyopt = 0; in pcre2_compile()
10268 cb.start_code = cworkspace; in pcre2_compile()
10269 cb.start_pattern = pattern; in pcre2_compile()
10270 cb.start_workspace = cworkspace; in pcre2_compile()
10271 cb.workspace_size = COMPILE_WORK_SIZE; in pcre2_compile()
10277 cb.top_backref = 0; in pcre2_compile()
10278 cb.backref_map = 0; in pcre2_compile()
10290 for (i = 0; i < 10; i++) cb.small_ref_offset[i] = PCRE2_UNSET; in pcre2_compile()
10327 cb.external_options |= p->value; in pcre2_compile()
10386 if ((cb.external_options & (PCRE2_UTF|PCRE2_UCP)) != 0) in pcre2_compile()
10398 utf = (cb.external_options & PCRE2_UTF) != 0; in pcre2_compile()
10421 ucp = (cb.external_options & PCRE2_UCP) != 0; in pcre2_compile()
10422 if (ucp && (cb.external_options & PCRE2_NEVER_UCP) != 0) in pcre2_compile()
10435 cb.nltype = NLTYPE_FIXED; in pcre2_compile()
10439 cb.nllen = 1; in pcre2_compile()
10440 cb.nl[0] = CHAR_CR; in pcre2_compile()
10444 cb.nllen = 1; in pcre2_compile()
10445 cb.nl[0] = CHAR_NL; in pcre2_compile()
10449 cb.nllen = 1; in pcre2_compile()
10450 cb.nl[0] = CHAR_NUL; in pcre2_compile()
10454 cb.nllen = 2; in pcre2_compile()
10455 cb.nl[0] = CHAR_CR; in pcre2_compile()
10456 cb.nl[1] = CHAR_NL; in pcre2_compile()
10460 cb.nltype = NLTYPE_ANY; in pcre2_compile()
10464 cb.nltype = NLTYPE_ANYCRLF; in pcre2_compile()
10489 for (p = ptr; p < cb.end_pattern; p++) if (*p >= META_END) big32count++; in pcre2_compile()
10517 cb.parsed_pattern = heap_parsed_pattern; in pcre2_compile()
10519 cb.parsed_pattern_end = cb.parsed_pattern + parsed_size_needed + 1; in pcre2_compile()
10523 errorcode = parse_regex(ptr, cb.external_options, &has_lookbehind, &cb); in pcre2_compile()
10539 if (cb.bracount >= GROUPINFO_DEFAULT_SIZE/2) in pcre2_compile()
10541 cb.groupinfo = ccontext->memctl.malloc( in pcre2_compile()
10542 (2 * (cb.bracount + 1))*sizeof(uint32_t), ccontext->memctl.memory_data); in pcre2_compile()
10543 if (cb.groupinfo == NULL) in pcre2_compile()
10546 cb.erroroffset = 0; in pcre2_compile()
10550 memset(cb.groupinfo, 0, (2 * cb.bracount + 1) * sizeof(uint32_t)); in pcre2_compile()
10551 errorcode = check_lookbehinds(cb.parsed_pattern, NULL, NULL, &cb, &loopcount); in pcre2_compile()
10559 show_parsed(&cb); in pcre2_compile()
10566 named_group *ng = cb.named_groups; in pcre2_compile()
10567 fprintf(stderr, "+++Captures: %d\n", cb.bracount); in pcre2_compile()
10568 for (i = 0; i < cb.names_found; i++, ng++) in pcre2_compile()
10587 cb.erroroffset = patlen; /* For any subsequent errors that do not set it */ in pcre2_compile()
10588 pptr = cb.parsed_pattern; in pcre2_compile()
10592 (void)compile_regex(cb.external_options, ccontext->extra_options, &code, &pptr, in pcre2_compile()
10594 &cb, &length); in pcre2_compile()
10613 (PCRE2_SIZE)cb.names_found * (PCRE2_SIZE)cb.name_entry_size); in pcre2_compile()
10643 re->overall_options = cb.external_options; in pcre2_compile()
10645 re->flags = PCRE2_CODE_UNIT_WIDTH/8 | cb.external_flags | setflags; in pcre2_compile()
10657 re->name_entry_size = cb.name_entry_size; in pcre2_compile()
10658 re->name_count = cb.names_found; in pcre2_compile()
10671 cb.parens_depth = 0; in pcre2_compile()
10672 cb.assert_depth = 0; in pcre2_compile()
10673 cb.lastcapture = 0; in pcre2_compile()
10674 cb.name_table = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)); in pcre2_compile()
10675 cb.start_code = codestart; in pcre2_compile()
10676 cb.req_varyopt = 0; in pcre2_compile()
10677 cb.had_accept = FALSE; in pcre2_compile()
10678 cb.had_pruneorskip = FALSE; in pcre2_compile()
10683 if (cb.names_found > 0) in pcre2_compile()
10685 named_group *ng = cb.named_groups; in pcre2_compile()
10686 for (i = 0; i < cb.names_found; i++, ng++) in pcre2_compile()
10687 add_name_to_table(&cb, ng->name, ng->length, ng->number, i); in pcre2_compile()
10694 pptr = cb.parsed_pattern; in pcre2_compile()
10699 NULL, &cb, NULL); in pcre2_compile()
10701 re->top_bracket = cb.bracount; in pcre2_compile()
10702 re->top_backref = cb.top_backref; in pcre2_compile()
10703 re->max_lookbehind = cb.max_lookbehind; in pcre2_compile()
10705 if (cb.had_accept) in pcre2_compile()
10733 if (errorcode == 0 && cb.had_recurse) in pcre2_compile()
10804 if (PRIV(auto_possessify)(temp, &cb) != 0) errorcode = ERR80; in pcre2_compile()
10818 is_anchored(codestart, 0, &cb, 0, FALSE)) in pcre2_compile()
10854 if (cb.fcc[firstcu] != firstcu) re->flags |= PCRE2_FIRSTCASELESS; in pcre2_compile()
10881 is_startline(codestart, 0, &cb, 0, FALSE)) in pcre2_compile()
10921 if (cb.fcc[reqcu] != reqcu) re->flags |= PCRE2_LASTCASELESS; in pcre2_compile()
10968 if (cb.parsed_pattern != stack_parsed_pattern) in pcre2_compile()
10969 ccontext->memctl.free(cb.parsed_pattern, ccontext->memctl.memory_data); in pcre2_compile()
10970 if (cb.named_group_list_size > NAMED_GROUP_LIST_SIZE) in pcre2_compile()
10971 ccontext->memctl.free((void *)cb.named_groups, ccontext->memctl.memory_data); in pcre2_compile()
10972 if (cb.groupinfo != stack_groupinfo) in pcre2_compile()
10973 ccontext->memctl.free((void *)cb.groupinfo, ccontext->memctl.memory_data); in pcre2_compile()
10983 ptr = pattern + cb.erroroffset; in pcre2_compile()