Lines Matching refs:state_log
734 mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1);
735 if (BE (mctx.state_log == NULL, 0))
742 mctx.state_log = NULL;
879 re_dfastate_t *pstate = mctx.state_log[match_last];
972 re_free (mctx.state_log);
990 assert (mctx->state_log != NULL);
1033 } while (mctx->state_log[match_last] == NULL
1034 || !mctx->state_log[match_last]->halt);
1036 mctx->state_log[match_last],
1059 re_free (mctx->state_log);
1060 mctx->state_log = sifted_states;
1140 if (mctx->state_log != NULL)
1142 mctx->state_log[cur_str_idx] = cur_state;
1196 if (mctx->state_log != NULL)
1207 if (mctx->state_log == NULL
1301 re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
1370 if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
1381 if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL
1382 || !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
1454 assert (mctx->state_log != NULL);
1612 /* This function checks the STATE_LOG from the SCTX->last_str_idx to 0
1614 Updated state_log will be wrote to STATE_LOG.
1616 Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if...
1617 state_log):
1622 i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw
1624 ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is
1627 i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the
1629 ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away,
1645 assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL);
1648 /* Build sifted state_log[str_idx]. It has the nodes which can epsilon
1657 /* Then check each states in the state_log. */
1672 if (mctx->state_log[str_idx])
1682 And update state_log. */
1699 const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes;
1706 `cur_dest' is the sifted state from `state_log[str_idx + 1]'.
1707 `cur_src' points the node_set of the old `state_log[str_idx]'
1773 memset (mctx->state_log + top + 1, '\0',
1816 candidates = ((mctx->state_log[str_idx] == NULL) ? NULL
1817 : &mctx->state_log[str_idx]->nodes);
1846 if (candidates && mctx->state_log[str_idx]->has_backref)
2292 accepting the current input byte, and update STATE_LOG if necessary.
2294 update the destination of STATE_LOG. */
2353 /* Update the state_log if we need */
2364 mctx->state_log[cur_idx] = next_state;
2367 else if (mctx->state_log[cur_idx] == 0)
2369 mctx->state_log[cur_idx] = next_state;
2376 /* If (state_log[cur_idx] != 0), it implies that cur_idx is
2380 pstate = mctx->state_log[cur_idx];
2398 next_state = mctx->state_log[cur_idx]
2423 next_state = mctx->state_log[cur_idx];
2449 while (mctx->state_log[cur_str_idx] == NULL);
2585 dest_state = mctx->state_log[dest_idx];
2597 mctx->state_log[dest_idx]
2601 if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0))
2645 the backreference to appropriate state_log. */
2665 dest_state = mctx->state_log[dest_str_idx];
2666 prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0
2667 : mctx->state_log[cur_str_idx]->nodes.nelem);
2668 /* Add `new_dest_node' to state_log. */
2671 mctx->state_log[dest_str_idx]
2674 if (BE (mctx->state_log[dest_str_idx] == NULL
2689 mctx->state_log[dest_str_idx]
2692 if (BE (mctx->state_log[dest_str_idx] == NULL
2699 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem)
2830 if (mctx->state_log[sl_str] == NULL)
2833 nodes = &mctx->state_log[sl_str]->nodes;
2958 backup_state_log = mctx->state_log;
2960 mctx->state_log = path->array;
2979 cur_state = mctx->state_log[str_idx];
3007 mctx->state_log[str_idx] = cur_state;
3013 if (mctx->state_log[str_idx + 1])
3016 &mctx->state_log[str_idx + 1]->nodes);
3058 mctx->state_log[str_idx] = cur_state;
3062 cur_nodes = (mctx->state_log[last_str] == NULL ? NULL
3063 : &mctx->state_log[last_str]->nodes);
3067 mctx->state_log = backup_state_log;
3117 dest_state = mctx->state_log[next_idx];
3134 mctx->state_log[next_idx] = re_acquire_state (&err, dfa,
3136 if (BE (mctx->state_log[next_idx] == NULL
3289 to MCTX->STATE_LOG. */
3317 if (mctx->state_log[to_idx])
3320 if (re_node_set_contains (&mctx->state_log[to_idx]->nodes,
3324 &mctx->state_log[to_idx]->nodes);
3339 mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set);
3341 if (BE (mctx->state_log[to_idx] == NULL
4147 if (mctx->state_log != NULL)
4149 /* And double the length of state_log. */
4151 allocation fail we have no indication that the state_log array
4153 re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *,
4157 mctx->state_log = new_array;