Lines Matching refs:str_idx
25 Idx str_idx, Idx from, Idx to);
26 static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx);
28 Idx str_idx);
30 Idx node, Idx str_idx);
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,
96 Idx node, Idx str_idx,
103 Idx str_idx);
106 Idx str_idx, const re_node_set *candidates);
120 Idx str_idx);
145 Idx str_idx,
1322 push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, in push_fail_stack() argument
1338 fs->stack[num].idx = str_idx; in push_fail_stack()
1564 Idx str_idx = sctx->last_str_idx; in sift_states_backward() local
1567 DEBUG_ASSERT (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); in sift_states_backward()
1574 err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); in sift_states_backward()
1579 while (str_idx > 0) in sift_states_backward()
1582 null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; in sift_states_backward()
1586 sizeof (re_dfastate_t *) * str_idx); in sift_states_backward()
1591 --str_idx; in sift_states_backward()
1593 if (mctx->state_log[str_idx]) in sift_states_backward()
1595 err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); in sift_states_backward()
1604 err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); in sift_states_backward()
1617 Idx str_idx, re_node_set *cur_dest) in build_sifted_states() argument
1620 const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; in build_sifted_states()
1641 str_idx, sctx->last_str_idx); in build_sifted_states()
1647 && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) in build_sifted_states()
1648 && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], in build_sifted_states()
1657 Idx to_idx = str_idx + naccepted; in build_sifted_states()
1660 prev_node, str_idx)) in build_sifted_states()
1726 re_sift_context_t *sctx, Idx str_idx, in update_cur_sifted_state() argument
1732 candidates = ((mctx->state_log[str_idx] == NULL) ? NULL in update_cur_sifted_state()
1733 : &mctx->state_log[str_idx]->nodes); in update_cur_sifted_state()
1736 sctx->sifted_states[str_idx] = NULL; in update_cur_sifted_state()
1751 mctx->bkref_ents, str_idx); in update_cur_sifted_state()
1757 sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); in update_cur_sifted_state()
1762 if (candidates && mctx->state_log[str_idx]->has_backref) in update_cur_sifted_state()
1764 err = sift_states_bkref (mctx, sctx, str_idx, candidates); in update_cur_sifted_state()
1966 Idx subexp_idx, Idx from_node, Idx str_idx, in check_dst_limits_calc_pos() argument
1973 if (str_idx < lim->subexp_from) in check_dst_limits_calc_pos()
1976 if (lim->subexp_to < str_idx) in check_dst_limits_calc_pos()
1980 boundaries = (str_idx == lim->subexp_from); in check_dst_limits_calc_pos()
1981 boundaries |= (str_idx == lim->subexp_to) << 1; in check_dst_limits_calc_pos()
1996 struct re_backref_cache_entry *bkref_ents, Idx str_idx) in check_subexp_limits() argument
2007 if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) in check_subexp_limits()
2011 if (ent->subexp_to == str_idx) in check_subexp_limits()
2083 Idx str_idx, const re_node_set *candidates) in sift_states_bkref() argument
2089 Idx first_idx = search_cur_bkref_entry (mctx, str_idx); in sift_states_bkref()
2104 if (node == sctx->last_node && str_idx == sctx->last_str_idx) in sift_states_bkref()
2122 to_idx = str_idx + subexp_len; in sift_states_bkref()
2130 str_idx, dst_node, to_idx)) in sift_states_bkref()
2141 local_sctx.last_str_idx = str_idx; in sift_states_bkref()
2148 cur_state = local_sctx.sifted_states[str_idx]; in sift_states_bkref()
2156 str_idx + 1); in sift_states_bkref()
2160 local_sctx.sifted_states[str_idx] = cur_state; in sift_states_bkref()
2182 Idx node_idx, Idx str_idx, Idx max_str_idx) in sift_states_iter_mb() argument
2187 naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); in sift_states_iter_mb()
2188 if (naccepted > 0 && str_idx + naccepted <= max_str_idx in sift_states_iter_mb()
2189 && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], in sift_states_iter_mb()
2378 Idx str_idx) in check_subexp_matching_top() argument
2397 err = match_ctx_add_subtop (mctx, node, str_idx); in check_subexp_matching_top()
2561 if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) in transit_state_bkref()
2660 sl_str = sub_top->str_idx; in get_subexp()
2668 sl_str_diff = sub_last->str_idx - sl_str; in get_subexp()
2716 sl_str_off = sl_str - sub_top->str_idx; in get_subexp()
2748 sl_str - sub_top->str_idx + 1); in get_subexp()
2755 sub_top->str_idx, cls_node, sl_str, in get_subexp()
2790 sub_last->str_idx, bkref_node, bkref_str, in get_subexp_sub()
2794 err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, in get_subexp_sub()
2795 sub_last->str_idx); in get_subexp_sub()
2798 to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; in get_subexp_sub()
2839 Idx subexp_num, backup_cur_idx, str_idx, null_cnt; in check_arrival() local
2867 str_idx = path->next_idx ? path->next_idx : top_str; in check_arrival()
2873 mctx->input.cur_idx = str_idx; in check_arrival()
2876 context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); in check_arrival()
2877 if (str_idx == top_str) in check_arrival()
2891 cur_state = mctx->state_log[str_idx]; in check_arrival()
2901 if (str_idx == top_str || (cur_state && cur_state->has_backref)) in check_arrival()
2905 err = expand_bkref_cache (mctx, &next_nodes, str_idx, in check_arrival()
2919 mctx->state_log[str_idx] = cur_state; in check_arrival()
2922 for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) in check_arrival()
2925 if (mctx->state_log[str_idx + 1]) in check_arrival()
2928 &mctx->state_log[str_idx + 1]->nodes); in check_arrival()
2937 err = check_arrival_add_next_nodes (mctx, str_idx, in check_arrival()
2946 ++str_idx; in check_arrival()
2955 err = expand_bkref_cache (mctx, &next_nodes, str_idx, in check_arrival()
2963 context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); in check_arrival()
2970 mctx->state_log[str_idx] = cur_state; in check_arrival()
2976 path->next_idx = str_idx; in check_arrival()
2999 check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, in check_arrival_add_next_nodes() argument
3021 str_idx); in check_arrival_add_next_nodes()
3026 Idx next_idx = str_idx + naccepted; in check_arrival_add_next_nodes()
3056 || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) in check_arrival_add_next_nodes()
3648 const re_string_t *input, Idx str_idx) in check_node_accept_bytes() argument
3656 unsigned char c = re_string_byte_at (input, str_idx), d; in check_node_accept_bytes()
3660 if (str_idx + 2 > input->len) in check_node_accept_bytes()
3663 d = re_string_byte_at (input, str_idx + 1); in check_node_accept_bytes()
3693 if (str_idx + char_len > input->len) in check_node_accept_bytes()
3698 d = re_string_byte_at (input, str_idx + i); in check_node_accept_bytes()
3705 char_len = re_string_char_size_at (input, str_idx); in check_node_accept_bytes()
3714 && re_string_byte_at (input, str_idx) == '\n') in check_node_accept_bytes()
3716 && re_string_byte_at (input, str_idx) == '\0')) in check_node_accept_bytes()
3721 elem_len = re_string_elem_size_at (input, str_idx); in check_node_accept_bytes()
3730 = ((const unsigned char *) re_string_get_buffer (input) + str_idx); in check_node_accept_bytes()
3736 ? re_string_wchar_at (input, str_idx) : 0); in check_node_accept_bytes()
4130 match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, in match_ctx_add_entry() argument
4149 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) in match_ctx_add_entry()
4153 mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; in match_ctx_add_entry()
4178 search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) in search_cur_bkref_entry() argument
4185 if (mctx->bkref_ents[mid].str_idx < str_idx) in search_cur_bkref_entry()
4190 if (left < last && mctx->bkref_ents[left].str_idx == str_idx) in search_cur_bkref_entry()
4201 match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) in match_ctx_add_subtop() argument
4220 mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; in match_ctx_add_subtop()
4229 match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) in match_ctx_add_sublast() argument
4248 new_entry->str_idx = str_idx; in match_ctx_add_sublast()