Lines Matching refs:Idx
21 Idx n);
24 static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node,
25 Idx str_idx, Idx from, Idx to);
26 static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx);
27 static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node,
28 Idx str_idx);
30 Idx node, Idx str_idx);
32 re_dfastate_t **limited_sts, Idx last_node,
33 Idx last_str_idx);
35 const char *string, Idx length,
36 Idx start, Idx last_start, Idx stop,
40 const char *string1, Idx length1,
41 const char *string2, Idx length2,
42 Idx start, regoff_t range,
44 Idx stop, bool ret_len);
46 const char *string, Idx length, Idx start,
47 regoff_t range, Idx stop,
51 Idx nregs, int regs_allocated);
53 static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match,
54 Idx *p_match_first);
55 static Idx check_halt_state_context (const re_match_context_t *mctx,
56 const re_dfastate_t *state, Idx idx);
58 regmatch_t *prev_idx_match, Idx cur_node,
59 Idx cur_idx, Idx nmatch);
61 Idx str_idx, Idx dest_node, Idx nregs,
73 Idx node_idx, Idx str_idx, Idx max_str_idx);
78 re_sift_context_t *sctx, Idx str_idx,
82 Idx str_idx,
89 Idx dst_node, Idx dst_idx, Idx src_node,
90 Idx src_idx);
92 int boundaries, Idx subexp_idx,
93 Idx from_node, Idx bkref_idx);
95 Idx limit, Idx subexp_idx,
96 Idx node, Idx str_idx,
97 Idx bkref_idx);
103 Idx str_idx);
106 Idx str_idx, const re_node_set *candidates);
109 re_dfastate_t **src, Idx num);
120 Idx str_idx);
133 Idx bkref_node, Idx bkref_str_idx);
137 Idx bkref_node, Idx bkref_str);
138 static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
139 Idx subexp_idx, int type);
141 state_array_t *path, Idx top_node,
142 Idx top_str, Idx last_node, Idx last_str,
145 Idx str_idx,
150 Idx ex_subexp, int type);
153 Idx target, Idx ex_subexp,
156 re_node_set *cur_nodes, Idx cur_str,
157 Idx subexp_num, int type);
160 static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
161 const re_string_t *input, Idx idx);
167 static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
172 const re_token_t *node, Idx idx);
196 Idx start, length; in regexec()
276 re_match (struct re_pattern_buffer *bufp, const char *string, Idx length, in re_match()
277 Idx start, struct re_registers *regs) in re_match()
286 re_search (struct re_pattern_buffer *bufp, const char *string, Idx length, in weak_alias()
287 Idx start, regoff_t range, struct re_registers *regs) in weak_alias()
297 re_match_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1, in weak_alias()
298 const char *string2, Idx length2, Idx start, in weak_alias()
299 struct re_registers *regs, Idx stop) in weak_alias()
309 re_search_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1, in weak_alias()
310 const char *string2, Idx length2, Idx start, regoff_t range, in weak_alias()
311 struct re_registers *regs, Idx stop) in weak_alias()
322 Idx length1, const char *string2, Idx length2, Idx start, in weak_alias()
324 Idx stop, bool ret_len) in weak_alias()
328 Idx len; in weak_alias()
369 re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length, in re_search_stub()
370 Idx start, regoff_t range, Idx stop, struct re_registers *regs, in re_search_stub()
375 Idx nregs; in re_search_stub()
379 Idx last_start = start + range; in re_search_stub()
458 re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, in re_copy_regs()
462 Idx i; in re_copy_regs()
463 Idx need_regs = nregs + 1; in re_copy_regs()
584 re_search_internal (const regex_t *preg, const char *string, Idx length, in re_search_internal()
585 Idx start, Idx last_start, Idx stop, size_t nmatch, in re_search_internal()
590 Idx left_lim, right_lim; in re_search_internal()
594 Idx match_first; in re_search_internal()
595 Idx match_last = -1; in re_search_internal()
596 Idx extra_nmatch; in re_search_internal()
846 Idx reg_idx; in re_search_internal()
921 Idx halt_node, match_last; in prune_impossible_nodes()
1015 Idx idx) in acquire_init_state_context()
1054 static Idx
1057 Idx *p_match_first) in check_matching()
1061 Idx match = 0; in check_matching()
1062 Idx match_last = -1; in check_matching()
1063 Idx cur_str_idx = re_string_cur_idx (&mctx->input); in check_matching()
1066 Idx next_start_idx = cur_str_idx; in check_matching()
1118 Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; in check_matching()
1188 check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) in check_halt_node_context()
1205 static Idx
1207 const re_dfastate_t *state, Idx idx) in check_halt_state_context()
1209 Idx i; in check_halt_state_context()
1226 static Idx
1227 proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, in proceed_next_node()
1228 Idx *pidx, Idx node, re_node_set *eps_via_nodes, in proceed_next_node()
1232 Idx i; in proceed_next_node()
1238 Idx dest_node; in proceed_next_node()
1246 Idx candidate = edests->elems[i]; in proceed_next_node()
1273 Idx naccepted = 0; in proceed_next_node()
1283 Idx subexp_idx = dfa->nodes[node].opr.idx + 1; in proceed_next_node()
1302 Idx dest_node; in proceed_next_node()
1316 Idx dest_node = dfa->nexts[node]; in proceed_next_node()
1331 push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, in push_fail_stack()
1332 Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) in push_fail_stack()
1335 Idx num = fs->num++; in push_fail_stack()
1356 static Idx
1357 pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, in pop_fail_stack()
1360 Idx num = --fs->num; in pop_fail_stack()
1381 Idx idx, cur_node; in set_regs()
1425 Idx reg_idx; in set_regs()
1487 Idx fs_idx; in free_fail_stack_return()
1500 regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) in update_regs()
1505 Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; in update_regs()
1516 Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; in update_regs()
1574 Idx str_idx = sctx->last_str_idx; in sift_states_backward()
1629 Idx str_idx, re_node_set *cur_dest) in build_sifted_states()
1633 Idx i; in build_sifted_states()
1644 Idx prev_node = cur_src->elems[i]; in build_sifted_states()
1672 Idx to_idx = str_idx + naccepted; in build_sifted_states()
1689 clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) in clean_state_log_if_needed()
1691 Idx top = mctx->state_log_top; in clean_state_log_if_needed()
1715 re_dfastate_t **src, Idx num) in merge_state_array()
1717 Idx st_idx; in merge_state_array()
1741 re_sift_context_t *sctx, Idx str_idx, in update_cur_sifted_state()
1792 Idx i; in add_epsilon_src_nodes()
1816 sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, in sub_epsilon_src_nodes()
1819 Idx ecl_idx; in sub_epsilon_src_nodes()
1826 Idx cur_node = inv_eclosure->elems[ecl_idx]; in sub_epsilon_src_nodes()
1831 Idx edst1 = dfa->edests[cur_node].elems[0]; in sub_epsilon_src_nodes()
1832 Idx edst2 = ((dfa->edests[cur_node].nelem > 1) in sub_epsilon_src_nodes()
1852 Idx cur_node = inv_eclosure->elems[ecl_idx]; in sub_epsilon_src_nodes()
1855 Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1; in sub_epsilon_src_nodes()
1865 Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) in check_dst_limits()
1868 Idx lim_idx, src_pos, dst_pos; in check_dst_limits()
1870 Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); in check_dst_limits()
1871 Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); in check_dst_limits()
1874 Idx subexp_idx; in check_dst_limits()
1900 Idx subexp_idx, Idx from_node, Idx bkref_idx) in check_dst_limits_calc_pos_1()
1904 Idx node_idx; in check_dst_limits_calc_pos_1()
1910 Idx node = eclosures->elems[node_idx]; in check_dst_limits_calc_pos_1()
1919 Idx dst; in check_dst_limits_calc_pos_1()
1980 check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, in check_dst_limits_calc_pos()
1981 Idx subexp_idx, Idx from_node, Idx str_idx, in check_dst_limits_calc_pos()
1982 Idx bkref_idx) in check_dst_limits_calc_pos()
2011 struct re_backref_cache_entry *bkref_ents, Idx str_idx) in check_subexp_limits()
2014 Idx node_idx, lim_idx; in check_subexp_limits()
2018 Idx subexp_idx; in check_subexp_limits()
2028 Idx ops_node = -1; in check_subexp_limits()
2029 Idx cls_node = -1; in check_subexp_limits()
2032 Idx node = dest_nodes->elems[node_idx]; in check_subexp_limits()
2056 Idx node = dest_nodes->elems[node_idx]; in check_subexp_limits()
2076 Idx node = dest_nodes->elems[node_idx]; in check_subexp_limits()
2098 Idx str_idx, const re_node_set *candidates) in sift_states_bkref()
2102 Idx node_idx, node; in sift_states_bkref()
2104 Idx first_idx = search_cur_bkref_entry (mctx, str_idx); in sift_states_bkref()
2113 Idx enabled_idx; in sift_states_bkref()
2128 Idx subexp_len; in sift_states_bkref()
2129 Idx to_idx; in sift_states_bkref()
2130 Idx dst_node; in sift_states_bkref()
2197 Idx node_idx, Idx str_idx, Idx max_str_idx) in sift_states_iter_mb()
2287 Idx cur_idx = re_string_cur_idx (&mctx->input); in merge_state_with_log()
2366 Idx max = mctx->state_log_top; in find_recover_state()
2367 Idx cur_str_idx = re_string_cur_idx (&mctx->input); in find_recover_state()
2392 Idx str_idx) in check_subexp_matching_top()
2395 Idx node_idx; in check_subexp_matching_top()
2405 Idx node = cur_nodes->elems[node_idx]; in check_subexp_matching_top()
2430 Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input);
2438 Idx cur_node = state->nodes.elems[node_cnt];
2467 Idx i; in transit_state_mb()
2472 Idx cur_node_idx = pstate->nodes.elems[i]; in transit_state_mb()
2474 Idx dest_idx; in transit_state_mb()
2537 Idx i; in transit_state_bkref()
2538 Idx cur_str_idx = re_string_cur_idx (&mctx->input); in transit_state_bkref()
2542 Idx dest_str_idx, prev_nelem, bkc_idx; in transit_state_bkref()
2543 Idx node_idx = nodes->elems[i]; in transit_state_bkref()
2574 Idx subexp_len; in transit_state_bkref()
2647 get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) in get_subexp()
2650 Idx subexp_num, sub_top_idx; in get_subexp()
2653 Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); in get_subexp()
2672 Idx sub_last_idx, sl_str, bkref_str_off; in get_subexp()
2729 Idx cls_node; in get_subexp()
2797 re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) in get_subexp_sub()
2800 Idx to_idx; in get_subexp_sub()
2823 static Idx
2825 Idx subexp_idx, int type) in find_subexp_node()
2827 Idx cls_idx; in find_subexp_node()
2830 Idx cls_node = nodes->elems[cls_idx]; in find_subexp_node()
2846 check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, in check_arrival()
2847 Idx top_str, Idx last_node, Idx last_str, int type) in check_arrival()
2851 Idx subexp_num, backup_cur_idx, str_idx, null_cnt; in check_arrival()
2862 Idx old_alloc = path->alloc; in check_arrival()
2863 Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1; in check_arrival()
2864 Idx new_alloc; in check_arrival()
3011 check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, in check_arrival_add_next_nodes()
3016 Idx cur_idx; in check_arrival_add_next_nodes()
3025 Idx cur_node = cur_nodes->elems[cur_idx]; in check_arrival_add_next_nodes()
3039 Idx next_node = dfa->nexts[cur_node]; in check_arrival_add_next_nodes()
3040 Idx next_idx = str_idx + naccepted; in check_arrival_add_next_nodes()
3092 Idx ex_subexp, int type) in check_arrival_expand_ecl()
3095 Idx idx, outside_node; in check_arrival_expand_ecl()
3108 Idx cur_node = cur_nodes->elems[idx]; in check_arrival_expand_ecl()
3145 Idx target, Idx ex_subexp, int type) in check_arrival_expand_ecl_sub()
3147 Idx cur_node; in check_arrival_expand_ecl_sub()
3190 Idx cur_str, Idx subexp_num, int type) in expand_bkref_cache()
3194 Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); in expand_bkref_cache()
3204 Idx to_idx, next_node; in expand_bkref_cache()
3280 Idx i, j; in build_trtable()
3286 Idx ndests; /* Number of the destination states from 'state'. */ in build_trtable()
3376 Idx next_node; in build_trtable()
3512 static Idx
3518 Idx i, j, k; in group_nodes_into_DFAstates()
3519 Idx ndests; /* Number of the destinations from 'state'. */ in group_nodes_into_DFAstates()
3709 check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, in check_node_accept_bytes()
3710 const re_string_t *input, Idx str_idx) in check_node_accept_bytes()
3714 Idx i; in check_node_accept_bytes()
3793 Idx j; in check_node_accept_bytes()
3999 Idx idx) in check_node_accept()
4114 match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) in match_ctx_init()
4150 Idx st_idx; in match_ctx_clean()
4153 Idx sl_idx; in match_ctx_clean()
4192 match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, in match_ctx_add_entry()
4193 Idx to) in match_ctx_add_entry()
4239 static Idx
4240 search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) in search_cur_bkref_entry()
4242 Idx left, right, mid, last; in search_cur_bkref_entry()
4263 match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) in match_ctx_add_subtop()
4271 Idx new_asub_tops = mctx->asub_tops * 2; in match_ctx_add_subtop()
4292 match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) in match_ctx_add_sublast()
4297 Idx new_alasts = 2 * subtop->alasts + 1; in match_ctx_add_sublast()
4319 re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) in sift_ctx_init()