• Home
  • Raw
  • Download

Lines Matching refs:str_idx

28 					  Idx str_idx, Idx from, Idx to)
30 static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
33 Idx str_idx) internal_function;
35 Idx node, Idx str_idx)
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,
114 Idx node, Idx str_idx,
121 Idx str_idx) internal_function;
124 Idx str_idx, const re_node_set *candidates)
141 Idx str_idx) internal_function;
171 Idx str_idx,
1391 push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, in push_fail_stack() argument
1406 fs->stack[num].idx = str_idx; in push_fail_stack()
1638 Idx str_idx = sctx->last_str_idx; in sift_states_backward() local
1642 assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); in sift_states_backward()
1650 err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); in sift_states_backward()
1655 while (str_idx > 0) in sift_states_backward()
1658 null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; in sift_states_backward()
1662 sizeof (re_dfastate_t *) * str_idx); in sift_states_backward()
1667 --str_idx; in sift_states_backward()
1669 if (mctx->state_log[str_idx]) in sift_states_backward()
1671 err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); in sift_states_backward()
1680 err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); in sift_states_backward()
1693 Idx str_idx, re_node_set *cur_dest) in build_sifted_states() argument
1696 const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; in build_sifted_states()
1720 str_idx, sctx->last_str_idx); in build_sifted_states()
1726 && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) in build_sifted_states()
1727 && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], in build_sifted_states()
1736 Idx to_idx = str_idx + naccepted; in build_sifted_states()
1739 prev_node, str_idx)) in build_sifted_states()
1807 re_sift_context_t *sctx, Idx str_idx, in update_cur_sifted_state() argument
1813 candidates = ((mctx->state_log[str_idx] == NULL) ? NULL in update_cur_sifted_state()
1814 : &mctx->state_log[str_idx]->nodes); in update_cur_sifted_state()
1817 sctx->sifted_states[str_idx] = NULL; in update_cur_sifted_state()
1832 mctx->bkref_ents, str_idx); in update_cur_sifted_state()
1838 sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); in update_cur_sifted_state()
1843 if (candidates && mctx->state_log[str_idx]->has_backref) in update_cur_sifted_state()
1845 err = sift_states_bkref (mctx, sctx, str_idx, candidates); in update_cur_sifted_state()
2047 Idx subexp_idx, Idx from_node, Idx str_idx, in check_dst_limits_calc_pos() argument
2054 if (str_idx < lim->subexp_from) in check_dst_limits_calc_pos()
2057 if (lim->subexp_to < str_idx) in check_dst_limits_calc_pos()
2061 boundaries = (str_idx == lim->subexp_from); in check_dst_limits_calc_pos()
2062 boundaries |= (str_idx == lim->subexp_to) << 1; in check_dst_limits_calc_pos()
2078 struct re_backref_cache_entry *bkref_ents, Idx str_idx) in check_subexp_limits() argument
2089 if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) in check_subexp_limits()
2093 if (ent->subexp_to == str_idx) in check_subexp_limits()
2165 Idx str_idx, const re_node_set *candidates) in sift_states_bkref() argument
2171 Idx first_idx = search_cur_bkref_entry (mctx, str_idx); in sift_states_bkref()
2186 if (node == sctx->last_node && str_idx == sctx->last_str_idx) in sift_states_bkref()
2204 to_idx = str_idx + subexp_len; in sift_states_bkref()
2212 str_idx, dst_node, to_idx)) in sift_states_bkref()
2223 local_sctx.last_str_idx = str_idx; in sift_states_bkref()
2230 cur_state = local_sctx.sifted_states[str_idx]; in sift_states_bkref()
2238 str_idx + 1); in sift_states_bkref()
2242 local_sctx.sifted_states[str_idx] = cur_state; in sift_states_bkref()
2265 Idx node_idx, Idx str_idx, Idx max_str_idx) in sift_states_iter_mb() argument
2270 naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); in sift_states_iter_mb()
2271 if (naccepted > 0 && str_idx + naccepted <= max_str_idx && in sift_states_iter_mb()
2272 !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], in sift_states_iter_mb()
2463 Idx str_idx) in check_subexp_matching_top() argument
2482 err = match_ctx_add_subtop (mctx, node, str_idx); in check_subexp_matching_top()
2651 if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) in transit_state_bkref()
2750 sl_str = sub_top->str_idx; in get_subexp()
2758 sl_str_diff = sub_last->str_idx - sl_str; in get_subexp()
2805 sl_str_off = sl_str - sub_top->str_idx; in get_subexp()
2837 sl_str - sub_top->str_idx + 1); in get_subexp()
2844 sub_top->str_idx, cls_node, sl_str, in get_subexp()
2877 sub_last->str_idx, bkref_node, bkref_str, in get_subexp_sub()
2881 err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, in get_subexp_sub()
2882 sub_last->str_idx); in get_subexp_sub()
2885 to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; in get_subexp_sub()
2926 Idx subexp_num, backup_cur_idx, str_idx, null_cnt; in check_arrival() local
2951 str_idx = path->next_idx ? path->next_idx : top_str; in check_arrival()
2957 mctx->input.cur_idx = str_idx; in check_arrival()
2960 context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); in check_arrival()
2961 if (str_idx == top_str) in check_arrival()
2975 cur_state = mctx->state_log[str_idx]; in check_arrival()
2985 if (str_idx == top_str || (cur_state && cur_state->has_backref)) in check_arrival()
2989 err = expand_bkref_cache (mctx, &next_nodes, str_idx, in check_arrival()
3003 mctx->state_log[str_idx] = cur_state; in check_arrival()
3006 for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) in check_arrival()
3009 if (mctx->state_log[str_idx + 1]) in check_arrival()
3012 &mctx->state_log[str_idx + 1]->nodes); in check_arrival()
3021 err = check_arrival_add_next_nodes (mctx, str_idx, in check_arrival()
3030 ++str_idx; in check_arrival()
3039 err = expand_bkref_cache (mctx, &next_nodes, str_idx, in check_arrival()
3047 context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); in check_arrival()
3054 mctx->state_log[str_idx] = cur_state; in check_arrival()
3060 path->next_idx = str_idx; in check_arrival()
3083 check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, in check_arrival_add_next_nodes() argument
3107 str_idx); in check_arrival_add_next_nodes()
3112 Idx next_idx = str_idx + naccepted; in check_arrival_add_next_nodes()
3142 || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) in check_arrival_add_next_nodes()
3780 const re_string_t *input, Idx str_idx) in check_node_accept_bytes() argument
3788 unsigned char c = re_string_byte_at (input, str_idx), d; in check_node_accept_bytes()
3792 if (str_idx + 2 > input->len) in check_node_accept_bytes()
3795 d = re_string_byte_at (input, str_idx + 1); in check_node_accept_bytes()
3825 if (str_idx + char_len > input->len) in check_node_accept_bytes()
3830 d = re_string_byte_at (input, str_idx + i); in check_node_accept_bytes()
3837 char_len = re_string_char_size_at (input, str_idx); in check_node_accept_bytes()
3846 re_string_byte_at (input, str_idx) == '\n') || in check_node_accept_bytes()
3848 re_string_byte_at (input, str_idx) == '\0')) in check_node_accept_bytes()
3853 elem_len = re_string_elem_size_at (input, str_idx); in check_node_accept_bytes()
3862 = ((const unsigned char *) re_string_get_buffer (input) + str_idx); in check_node_accept_bytes()
3868 ? re_string_wchar_at (input, str_idx) : 0); in check_node_accept_bytes()
4272 match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, in match_ctx_add_entry() argument
4291 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) in match_ctx_add_entry()
4295 mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; in match_ctx_add_entry()
4321 search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) in search_cur_bkref_entry() argument
4328 if (mctx->bkref_ents[mid].str_idx < str_idx) in search_cur_bkref_entry()
4333 if (left < last && mctx->bkref_ents[left].str_idx == str_idx) 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() argument
4365 mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; 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() argument
4393 new_entry->str_idx = str_idx; in match_ctx_add_sublast()