• Home
  • Raw
  • Download

Lines Matching refs:Idx

24 				     Idx n) internal_function;
27 static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node,
28 Idx str_idx, Idx from, Idx to)
30 static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
32 static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node,
33 Idx str_idx) internal_function;
35 Idx node, Idx str_idx)
38 re_dfastate_t **limited_sts, Idx last_node,
39 Idx last_str_idx)
42 const char *string, Idx length,
43 Idx start, Idx last_start, Idx stop,
47 const char *string1, Idx length1,
48 const char *string2, Idx length2,
49 Idx start, regoff_t range,
51 Idx stop, bool ret_len) internal_function;
53 const char *string, Idx length, Idx start,
54 regoff_t range, Idx stop,
58 Idx nregs, int regs_allocated)
62 static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match,
63 Idx *p_match_first) internal_function;
64 static Idx check_halt_state_context (const re_match_context_t *mctx,
65 const re_dfastate_t *state, Idx idx)
68 regmatch_t *prev_idx_match, Idx cur_node,
69 Idx cur_idx, Idx nmatch) internal_function;
71 Idx str_idx, Idx dest_node, Idx nregs,
85 Idx node_idx, Idx str_idx, Idx max_str_idx)
92 re_sift_context_t *sctx, Idx str_idx,
97 Idx str_idx,
106 Idx dst_node, Idx dst_idx, Idx src_node,
107 Idx src_idx) internal_function;
109 int boundaries, Idx subexp_idx,
110 Idx from_node, Idx bkref_idx)
113 Idx limit, Idx subexp_idx,
114 Idx node, Idx str_idx,
115 Idx bkref_idx) internal_function;
121 Idx str_idx) internal_function;
124 Idx str_idx, const re_node_set *candidates)
128 re_dfastate_t **src, Idx num)
141 Idx str_idx) internal_function;
157 Idx bkref_node, Idx bkref_str_idx)
162 Idx bkref_node, Idx bkref_str)
164 static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
165 Idx subexp_idx, int type) internal_function;
167 state_array_t *path, Idx top_node,
168 Idx top_str, Idx last_node, Idx last_str,
171 Idx str_idx,
177 Idx ex_subexp, int type)
181 Idx target, Idx ex_subexp,
184 re_node_set *cur_nodes, Idx cur_str,
185 Idx subexp_num, int type)
190 static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
191 const re_string_t *input, Idx idx)
199 static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
204 const re_token_t *node, Idx idx)
234 Idx start, length;
317 Idx length, start;
330 Idx length, start;
345 Idx length1, length2, start, stop;
359 Idx length1, length2, start, stop;
373 const char *string1, Idx length1, in weak_alias()
374 const char *string2, Idx length2, in weak_alias()
375 Idx start, regoff_t range, struct re_registers *regs, in weak_alias()
376 Idx stop, bool ret_len) in weak_alias()
380 Idx len = length1 + length2; in weak_alias()
421 const char *string, Idx length, in re_search_stub()
422 Idx start, regoff_t range, Idx stop, struct re_registers *regs, in re_search_stub()
427 Idx nregs; in re_search_stub()
433 Idx last_start = start + range; in re_search_stub()
513 re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, in re_copy_regs()
517 Idx i; in re_copy_regs()
518 Idx need_regs = nregs + 1; in re_copy_regs()
644 const char *string, Idx length, in re_search_internal()
645 Idx start, Idx last_start, Idx stop, in re_search_internal()
651 Idx left_lim, right_lim; in re_search_internal()
655 Idx match_first; in re_search_internal()
656 Idx match_last = REG_MISSING; in re_search_internal()
657 Idx extra_nmatch; in re_search_internal()
906 Idx reg_idx; in re_search_internal()
981 Idx halt_node, match_last; in prune_impossible_nodes()
1075 Idx idx) in acquire_init_state_context()
1114 static Idx
1117 Idx *p_match_first) in check_matching()
1121 Idx match = 0; in check_matching()
1122 Idx match_last = REG_MISSING; in check_matching()
1123 Idx cur_str_idx = re_string_cur_idx (&mctx->input); in check_matching()
1126 Idx next_start_idx = cur_str_idx; in check_matching()
1178 Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; in check_matching()
1248 check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) in check_halt_node_context()
1265 static Idx
1268 const re_dfastate_t *state, Idx idx) in check_halt_state_context()
1270 Idx i; in check_halt_state_context()
1287 static Idx
1289 proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, in proceed_next_node()
1290 Idx *pidx, Idx node, re_node_set *eps_via_nodes, in proceed_next_node()
1294 Idx i; in proceed_next_node()
1300 Idx dest_node; in proceed_next_node()
1308 Idx candidate = edests->elems[i]; in proceed_next_node()
1335 Idx naccepted = 0; in proceed_next_node()
1345 Idx subexp_idx = dfa->nodes[node].opr.idx + 1; in proceed_next_node()
1362 Idx dest_node; in proceed_next_node()
1376 Idx dest_node = dfa->nexts[node]; in proceed_next_node()
1391 push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, in push_fail_stack()
1392 Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) in push_fail_stack()
1395 Idx num = fs->num++; in push_fail_stack()
1416 static Idx
1418 pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, in pop_fail_stack()
1421 Idx num = --fs->num; in pop_fail_stack()
1442 Idx idx, cur_node; in set_regs()
1486 Idx reg_idx; in set_regs()
1549 Idx fs_idx; in free_fail_stack_return()
1563 regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) in update_regs()
1568 Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; in update_regs()
1579 Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; in update_regs()
1638 Idx str_idx = sctx->last_str_idx; in sift_states_backward()
1693 Idx str_idx, re_node_set *cur_dest) in build_sifted_states()
1697 Idx i; in build_sifted_states()
1708 Idx prev_node = cur_src->elems[i]; in build_sifted_states()
1736 Idx to_idx = str_idx + naccepted; in build_sifted_states()
1754 clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) in clean_state_log_if_needed()
1756 Idx top = mctx->state_log_top; in clean_state_log_if_needed()
1780 re_dfastate_t **src, Idx num) in merge_state_array()
1782 Idx st_idx; in merge_state_array()
1807 re_sift_context_t *sctx, Idx str_idx, in update_cur_sifted_state()
1858 Idx i; in add_epsilon_src_nodes()
1879 sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, in sub_epsilon_src_nodes()
1882 Idx ecl_idx; in sub_epsilon_src_nodes()
1889 Idx cur_node = inv_eclosure->elems[ecl_idx]; in sub_epsilon_src_nodes()
1894 Idx edst1 = dfa->edests[cur_node].elems[0]; in sub_epsilon_src_nodes()
1895 Idx edst2 = ((dfa->edests[cur_node].nelem > 1) in sub_epsilon_src_nodes()
1915 Idx cur_node = inv_eclosure->elems[ecl_idx]; in sub_epsilon_src_nodes()
1918 Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1; in sub_epsilon_src_nodes()
1929 Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) in check_dst_limits()
1932 Idx lim_idx, src_pos, dst_pos; in check_dst_limits()
1934 Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); in check_dst_limits()
1935 Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); in check_dst_limits()
1938 Idx subexp_idx; in check_dst_limits()
1965 Idx subexp_idx, Idx from_node, Idx bkref_idx) in check_dst_limits_calc_pos_1()
1969 Idx node_idx; in check_dst_limits_calc_pos_1()
1975 Idx node = eclosures->elems[node_idx]; in check_dst_limits_calc_pos_1()
1984 Idx dst; in check_dst_limits_calc_pos_1()
2046 check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, in check_dst_limits_calc_pos()
2047 Idx subexp_idx, Idx from_node, Idx str_idx, in check_dst_limits_calc_pos()
2048 Idx bkref_idx) in check_dst_limits_calc_pos()
2078 struct re_backref_cache_entry *bkref_ents, Idx str_idx) in check_subexp_limits()
2081 Idx node_idx, lim_idx; in check_subexp_limits()
2085 Idx subexp_idx; in check_subexp_limits()
2095 Idx ops_node = REG_MISSING; in check_subexp_limits()
2096 Idx cls_node = REG_MISSING; in check_subexp_limits()
2099 Idx node = dest_nodes->elems[node_idx]; in check_subexp_limits()
2123 Idx node = dest_nodes->elems[node_idx]; in check_subexp_limits()
2143 Idx node = dest_nodes->elems[node_idx]; in check_subexp_limits()
2165 Idx str_idx, const re_node_set *candidates) in sift_states_bkref()
2169 Idx node_idx, node; in sift_states_bkref()
2171 Idx first_idx = search_cur_bkref_entry (mctx, str_idx); in sift_states_bkref()
2180 Idx enabled_idx; in sift_states_bkref()
2195 Idx subexp_len; in sift_states_bkref()
2196 Idx to_idx; in sift_states_bkref()
2197 Idx dst_node; in sift_states_bkref()
2265 Idx node_idx, Idx str_idx, Idx max_str_idx) in sift_states_iter_mb()
2356 Idx cur_idx = re_string_cur_idx (&mctx->input); in merge_state_with_log()
2436 Idx max = mctx->state_log_top; in find_recover_state()
2437 Idx cur_str_idx = re_string_cur_idx (&mctx->input); in find_recover_state()
2463 Idx str_idx) in check_subexp_matching_top()
2466 Idx node_idx; in check_subexp_matching_top()
2476 Idx node = cur_nodes->elems[node_idx]; in check_subexp_matching_top()
2501 Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input);
2509 Idx cur_node = state->nodes.elems[node_cnt];
2539 Idx i; in transit_state_mb()
2544 Idx cur_node_idx = pstate->nodes.elems[i]; in transit_state_mb()
2546 Idx dest_idx; in transit_state_mb()
2610 Idx i; in transit_state_bkref()
2611 Idx cur_str_idx = re_string_cur_idx (&mctx->input); in transit_state_bkref()
2615 Idx dest_str_idx, prev_nelem, bkc_idx; in transit_state_bkref()
2616 Idx node_idx = nodes->elems[i]; in transit_state_bkref()
2647 Idx subexp_len; in transit_state_bkref()
2720 get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) in get_subexp()
2723 Idx subexp_num, sub_top_idx; in get_subexp()
2726 Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); in get_subexp()
2745 Idx sub_last_idx, sl_str, bkref_str_off; in get_subexp()
2802 Idx cls_node; in get_subexp()
2871 re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) in get_subexp_sub()
2874 Idx to_idx; in get_subexp_sub()
2897 static Idx
2900 Idx subexp_idx, int type) in find_subexp_node()
2902 Idx cls_idx; in find_subexp_node()
2905 Idx cls_node = nodes->elems[cls_idx]; in find_subexp_node()
2921 check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, in check_arrival()
2922 Idx top_str, Idx last_node, Idx last_str, int type) in check_arrival()
2926 Idx subexp_num, backup_cur_idx, str_idx, null_cnt; in check_arrival()
2937 Idx old_alloc = path->alloc; in check_arrival()
2938 Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1; in check_arrival()
3083 check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, in check_arrival_add_next_nodes()
3088 Idx cur_idx; in check_arrival_add_next_nodes()
3097 Idx cur_node = cur_nodes->elems[cur_idx]; in check_arrival_add_next_nodes()
3111 Idx next_node = dfa->nexts[cur_node]; in check_arrival_add_next_nodes()
3112 Idx next_idx = str_idx + naccepted; in check_arrival_add_next_nodes()
3165 Idx ex_subexp, int type) in check_arrival_expand_ecl()
3168 Idx idx, outside_node; in check_arrival_expand_ecl()
3181 Idx cur_node = cur_nodes->elems[idx]; in check_arrival_expand_ecl()
3218 Idx target, Idx ex_subexp, int type) in check_arrival_expand_ecl_sub()
3220 Idx cur_node; in check_arrival_expand_ecl_sub()
3263 Idx cur_str, Idx subexp_num, int type) in expand_bkref_cache()
3267 Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); in expand_bkref_cache()
3277 Idx to_idx, next_node; in expand_bkref_cache()
3354 Idx i, j; in build_trtable()
3360 Idx ndests; /* Number of the destination states from `state'. */ in build_trtable()
3448 Idx next_node; in build_trtable()
3584 static Idx
3591 Idx i, j, k; in group_nodes_into_DFAstates()
3592 Idx ndests; /* Number of the destinations from `state'. */ in group_nodes_into_DFAstates()
3779 check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, in check_node_accept_bytes()
3780 const re_string_t *input, Idx str_idx) in check_node_accept_bytes()
3784 Idx i; in check_node_accept_bytes()
3863 Idx j; in check_node_accept_bytes()
3962 Idx cnt = 0; in check_node_accept_bytes()
4080 Idx idx) in check_node_accept()
4192 match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) in match_ctx_init()
4229 Idx st_idx; in match_ctx_clean()
4232 Idx sl_idx; in match_ctx_clean()
4272 match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, in match_ctx_add_entry()
4273 Idx to) in match_ctx_add_entry()
4319 static Idx
4321 search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) in search_cur_bkref_entry()
4323 Idx left, right, mid, last; in search_cur_bkref_entry()
4344 match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) in match_ctx_add_subtop()
4352 Idx new_asub_tops = mctx->asub_tops * 2; in match_ctx_add_subtop()
4374 match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) in match_ctx_add_sublast()
4379 Idx new_alasts = 2 * subtop->alasts + 1; in match_ctx_add_sublast()
4402 re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) in sift_ctx_init()