Lines Matching defs:sctx
37 static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
84 re_sift_context_t *sctx,
89 re_sift_context_t *sctx)
92 re_sift_context_t *sctx, Idx str_idx,
96 re_sift_context_t *sctx,
123 re_sift_context_t *sctx,
988 re_sift_context_t sctx;
1017 sift_ctx_init (&sctx, sifted_states, lim_states, halt_node,
1019 ret = sift_states_backward (mctx, &sctx);
1020 re_node_set_free (&sctx.limits);
1048 sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last);
1049 ret = sift_states_backward (mctx, &sctx);
1050 re_node_set_free (&sctx.limits);
1612 /* This function checks the STATE_LOG from the SCTX->last_str_idx to 0
1637 sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
1641 Idx str_idx = sctx->last_str_idx;
1650 err = re_node_set_init_1 (&cur_dest, sctx->last_node);
1653 err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
1661 null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0;
1664 memset (sctx->sifted_states, '\0',
1674 err = build_sifted_states (mctx, sctx, str_idx, &cur_dest);
1683 err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
1695 build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
1722 naccepted = sift_states_iter_mb (mctx, sctx, prev_node,
1723 str_idx, sctx->last_str_idx);
1730 && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1],
1737 if (sctx->limits.nelem)
1740 if (check_dst_limits (mctx, &sctx->limits,
1810 re_sift_context_t *sctx, Idx str_idx,
1820 sctx->sifted_states[str_idx] = NULL;
1832 if (sctx->limits.nelem)
1834 err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits,
1841 sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes);
1848 err = sift_states_bkref (mctx, sctx, str_idx, candidates);
2167 sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
2189 if (node == sctx->last_node && str_idx == sctx->last_str_idx)
2211 if (to_idx > sctx->last_str_idx
2212 || sctx->sifted_states[to_idx] == NULL
2213 || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node)
2214 || check_dst_limits (mctx, &sctx->limits, node,
2220 local_sctx = *sctx;
2221 err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits);
2237 if (sctx->limited_states != NULL)
2239 err = merge_state_array (dfa, sctx->limited_states,
2267 sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
2275 !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
4406 sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
4409 sctx->sifted_states = sifted_sts;
4410 sctx->limited_states = limited_sts;
4411 sctx->last_node = last_node;
4412 sctx->last_str_idx = last_str_idx;
4413 re_node_set_init_empty (&sctx->limits);