Lines Matching refs:nodes

152 					  const re_node_set *nodes)
162 static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
693 if (dfa->init_state->nodes.nelem == 0
694 && dfa->init_state_word->nodes.nelem == 0
695 && (dfa->init_state_nl->nodes.nelem == 0
1147 err = check_subexp_matching_top (mctx, &cur_state->nodes, 0);
1153 err = transit_state_bkref (mctx, &cur_state->nodes);
1251 re_token_type_t type = dfa->nodes[node].type;
1252 unsigned int constraint = dfa->nodes[node].constraint;
1277 for (i = 0; i < state->nodes.nelem; ++i)
1278 if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context))
1279 return state->nodes.elems[i];
1297 if (IS_EPSILON_NODE (dfa->nodes[node].type))
1299 re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
1337 re_token_type_t type = dfa->nodes[node].type;
1340 if (dfa->nodes[node].accept_mb)
1346 Idx subexp_idx = dfa->nodes[node].opr.idx + 1;
1368 if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
1375 || check_node_accept (mctx, dfa->nodes + node, *pidx))
1380 || !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
1566 int type = dfa->nodes[cur_node].type;
1569 Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
1580 Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
1593 if (dfa->nodes[cur_node].opt_subexp
1611 and sift the nodes in each states according to the following rules.
1631 ((state) != NULL && re_node_set_contains (&(state)->nodes, node))
1646 /* Build sifted state_log[str_idx]. It has the nodes which can epsilon
1677 /* Add all the nodes which satisfy the following conditions:
1706 (with the epsilon nodes pre-filtered out). */
1714 re_token_type_t type = dfa->nodes[prev_node].type;
1719 if (dfa->nodes[prev_node].accept_mb)
1727 && check_node_accept (mctx, dfa->nodes + prev_node, str_idx)
1792 err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes,
1793 &src[st_idx]->nodes);
1815 : &mctx->state_log[str_idx]->nodes);
1823 /* At first, add the nodes which can epsilon transit to a node in
1897 if (IS_EPSILON_NODE (dfa->nodes[cur_node].type))
1946 subexp_idx = dfa->nodes[ent->node].opr.idx;
1976 /* Else, we are on the boundary: examine the nodes on the epsilon
1981 switch (dfa->nodes[node].type)
2032 if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx)
2037 if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx)
2076 /* Check the limitations of sub expressions LIMITS, and remove the nodes
2097 subexp_idx = dfa->nodes[ent->node].opr.idx;
2105 re_token_type_t type = dfa->nodes[node].type;
2107 && subexp_idx == dfa->nodes[node].opr.idx)
2110 && subexp_idx == dfa->nodes[node].opr.idx)
2149 re_token_type_t type = dfa->nodes[node].type;
2152 if (subexp_idx != dfa->nodes[node].opr.idx)
2189 type = dfa->nodes[node].type;
2394 /* Note: We already add the nodes of the initial state,
2414 *err = check_subexp_matching_top (mctx, &next_state->nodes,
2422 *err = transit_state_bkref (mctx, &next_state->nodes);
2461 /* From the node set CUR_NODES, pick up the nodes whose types are
2476 Because there might be more than one nodes whose types are
2478 nodes.
2483 if (dfa->nodes[node].type == OP_OPEN_SUBEXP
2484 && dfa->nodes[node].opr.idx < BITSET_WORD_BITS
2486 & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx)))
2510 *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1);
2513 for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt)
2515 Idx cur_node = state->nodes.elems[node_cnt];
2516 if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx))
2547 for (i = 0; i < pstate->nodes.nelem; ++i)
2550 Idx cur_node_idx = pstate->nodes.elems[i];
2556 if (!dfa->nodes[cur_node_idx].accept_mb)
2559 if (dfa->nodes[cur_node_idx].constraint)
2564 if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint,
2612 transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
2619 for (i = 0; i < nodes->nelem; ++i)
2622 Idx node_idx = nodes->elems[i];
2624 const re_token_t *node = dfa->nodes + node_idx;
2669 : mctx->state_log[cur_str_idx]->nodes.nelem);
2701 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem)
2743 subexp_num = dfa->nodes[bkref_node].opr.idx;
2753 if (dfa->nodes[sub_top->node].opr.idx != subexp_num)
2805 /* Then, search for the other last nodes of the sub expression. */
2810 const re_node_set *nodes;
2835 nodes = &mctx->state_log[sl_str]->nodes;
2836 cls_node = find_subexp_node (dfa, nodes, subexp_num,
2898 Because there might be more than one nodes whose types are
2900 nodes.
2905 find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
2909 for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx)
2911 Idx cls_node = nodes->elems[cls_idx];
2912 const re_token_t *node = dfa->nodes + cls_node;
2938 subexp_num = dfa->nodes[top_node].opr.idx;
2984 err = re_node_set_init_copy (&next_nodes, &cur_state->nodes);
3018 &mctx->state_log[str_idx + 1]->nodes);
3065 : &mctx->state_log[last_str]->nodes);
3081 /* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them
3105 re_token_type_t type = dfa->nodes[cur_node].type;
3110 if (dfa->nodes[cur_node].accept_mb)
3123 err = re_node_set_merge (&union_set, &dest_state->nodes);
3148 || check_node_accept (mctx, dfa->nodes + cur_node, str_idx))
3162 /* For all the nodes in CUR_NODES, add the epsilon closures of them to
3163 CUR_NODES, however exclude the nodes which are:
3182 /* Create a new node set NEW_NODES with the nodes which are epsilon
3192 /* There are no problematic nodes, just merge them. */
3202 /* There are problematic nodes, re-calculate incrementally. */
3231 if (dfa->nodes[cur_node].type == type
3232 && dfa->nodes[cur_node].opr.idx == ex_subexp)
3322 if (re_node_set_contains (&mctx->state_log[to_idx]->nodes,
3326 &mctx->state_log[to_idx]->nodes);
3379 /* We build DFA states which corresponds to the destination nodes
3380 from `state'. `dests_node[i]' represents the nodes which i-th
3398 /* At first, group all nodes belonging to `state' into several
3585 /* Group all nodes belonging to STATE into several destinations.
3586 Then for all destinations, set the nodes belonging to the destination
3600 const re_node_set *cur_nodes = &state->nodes;
3604 /* For all the nodes belonging to `state', */
3607 re_token_t *node = &dfa->nodes[cur_nodes->elems[i]];
3775 /* Check how many bytes the node `dfa->nodes[node_idx]' accepts.
3779 This function handles the nodes which can accept one character, or
3780 one collating element like '.', '[a-z]', opposite to the other nodes
3788 const re_token_t *node = dfa->nodes + node_idx;