Lines Matching refs:nodes
154 const re_node_set *nodes)
164 static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
695 if (dfa->init_state->nodes.nelem == 0
696 && dfa->init_state_word->nodes.nelem == 0
697 && (dfa->init_state_nl->nodes.nelem == 0
1149 err = check_subexp_matching_top (mctx, &cur_state->nodes, 0);
1155 err = transit_state_bkref (mctx, &cur_state->nodes);
1253 re_token_type_t type = dfa->nodes[node].type;
1254 unsigned int constraint = dfa->nodes[node].constraint;
1279 for (i = 0; i < state->nodes.nelem; ++i)
1280 if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context))
1281 return state->nodes.elems[i];
1299 if (IS_EPSILON_NODE (dfa->nodes[node].type))
1301 re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
1339 re_token_type_t type = dfa->nodes[node].type;
1342 if (dfa->nodes[node].accept_mb)
1348 Idx subexp_idx = dfa->nodes[node].opr.idx + 1;
1370 if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
1377 || check_node_accept (mctx, dfa->nodes + node, *pidx))
1382 || !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
1568 int type = dfa->nodes[cur_node].type;
1571 Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
1582 Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
1595 if (dfa->nodes[cur_node].opt_subexp
1613 and sift the nodes in each states according to the following rules.
1633 ((state) != NULL && re_node_set_contains (&(state)->nodes, node))
1648 /* Build sifted state_log[str_idx]. It has the nodes which can epsilon
1679 /* Add all the nodes which satisfy the following conditions:
1708 (with the epsilon nodes pre-filtered out). */
1716 re_token_type_t type = dfa->nodes[prev_node].type;
1721 if (dfa->nodes[prev_node].accept_mb)
1729 && check_node_accept (mctx, dfa->nodes + prev_node, str_idx)
1794 err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes,
1795 &src[st_idx]->nodes);
1817 : &mctx->state_log[str_idx]->nodes);
1825 /* At first, add the nodes which can epsilon transit to a node in
1895 if (IS_EPSILON_NODE (dfa->nodes[cur_node].type))
1944 subexp_idx = dfa->nodes[ent->node].opr.idx;
1974 /* Else, we are on the boundary: examine the nodes on the epsilon
1979 switch (dfa->nodes[node].type)
2030 if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx)
2035 if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx)
2074 /* Check the limitations of sub expressions LIMITS, and remove the nodes
2095 subexp_idx = dfa->nodes[ent->node].opr.idx;
2103 re_token_type_t type = dfa->nodes[node].type;
2105 && subexp_idx == dfa->nodes[node].opr.idx)
2108 && subexp_idx == dfa->nodes[node].opr.idx)
2147 re_token_type_t type = dfa->nodes[node].type;
2150 if (subexp_idx != dfa->nodes[node].opr.idx)
2187 type = dfa->nodes[node].type;
2392 /* Note: We already add the nodes of the initial state,
2412 *err = check_subexp_matching_top (mctx, &next_state->nodes,
2420 *err = transit_state_bkref (mctx, &next_state->nodes);
2459 /* From the node set CUR_NODES, pick up the nodes whose types are
2474 Because there might be more than one nodes whose types are
2476 nodes.
2481 if (dfa->nodes[node].type == OP_OPEN_SUBEXP
2482 && dfa->nodes[node].opr.idx < BITSET_WORD_BITS
2484 & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx)))
2508 *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1);
2511 for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt)
2513 Idx cur_node = state->nodes.elems[node_cnt];
2514 if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx))
2545 for (i = 0; i < pstate->nodes.nelem; ++i)
2548 Idx cur_node_idx = pstate->nodes.elems[i];
2554 if (!dfa->nodes[cur_node_idx].accept_mb)
2557 if (dfa->nodes[cur_node_idx].constraint)
2562 if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint,
2610 transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
2617 for (i = 0; i < nodes->nelem; ++i)
2620 Idx node_idx = nodes->elems[i];
2622 const re_token_t *node = dfa->nodes + node_idx;
2667 : mctx->state_log[cur_str_idx]->nodes.nelem);
2699 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem)
2741 subexp_num = dfa->nodes[bkref_node].opr.idx;
2751 if (dfa->nodes[sub_top->node].opr.idx != subexp_num)
2803 /* Then, search for the other last nodes of the sub expression. */
2808 const re_node_set *nodes;
2833 nodes = &mctx->state_log[sl_str]->nodes;
2834 cls_node = find_subexp_node (dfa, nodes, subexp_num,
2896 Because there might be more than one nodes whose types are
2898 nodes.
2903 find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
2907 for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx)
2909 Idx cls_node = nodes->elems[cls_idx];
2910 const re_token_t *node = dfa->nodes + cls_node;
2936 subexp_num = dfa->nodes[top_node].opr.idx;
2982 err = re_node_set_init_copy (&next_nodes, &cur_state->nodes);
3016 &mctx->state_log[str_idx + 1]->nodes);
3063 : &mctx->state_log[last_str]->nodes);
3079 /* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them
3103 re_token_type_t type = dfa->nodes[cur_node].type;
3108 if (dfa->nodes[cur_node].accept_mb)
3121 err = re_node_set_merge (&union_set, &dest_state->nodes);
3146 || check_node_accept (mctx, dfa->nodes + cur_node, str_idx))
3160 /* For all the nodes in CUR_NODES, add the epsilon closures of them to
3161 CUR_NODES, however exclude the nodes which are:
3180 /* Create a new node set NEW_NODES with the nodes which are epsilon
3190 /* There are no problematic nodes, just merge them. */
3200 /* There are problematic nodes, re-calculate incrementally. */
3229 if (dfa->nodes[cur_node].type == type
3230 && dfa->nodes[cur_node].opr.idx == ex_subexp)
3320 if (re_node_set_contains (&mctx->state_log[to_idx]->nodes,
3324 &mctx->state_log[to_idx]->nodes);
3377 /* We build DFA states which corresponds to the destination nodes
3378 from `state'. `dests_node[i]' represents the nodes which i-th
3396 /* At first, group all nodes belonging to `state' into several
3583 /* Group all nodes belonging to STATE into several destinations.
3584 Then for all destinations, set the nodes belonging to the destination
3598 const re_node_set *cur_nodes = &state->nodes;
3602 /* For all the nodes belonging to `state', */
3605 re_token_t *node = &dfa->nodes[cur_nodes->elems[i]];
3773 /* Check how many bytes the node `dfa->nodes[node_idx]' accepts.
3777 This function handles the nodes which can accept one character, or
3778 one collating element like '.', '[a-z]', opposite to the other nodes
3786 const re_token_t *node = dfa->nodes + node_idx;