Lines Matching refs:dfa

23 					const re_dfa_t *dfa) internal_function;
24 static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
27 static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
41 RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
47 if (init_len < dfa->mb_cur_max)
48 init_len = dfa->mb_cur_max;
50 re_string_construct_common (str, len, pstr, trans, icase, dfa);
56 pstr->word_char = dfa->word_char;
57 pstr->word_ops_used = dfa->word_ops_used;
59 pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len;
69 RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
73 re_string_construct_common (str, len, pstr, trans, icase, dfa);
86 if (dfa->mb_cur_max > 1)
95 if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
109 if (dfa->mb_cur_max > 1)
173 const re_dfa_t *dfa)
181 pstr->mb_cur_max = dfa->mb_cur_max;
182 pstr->is_utf8 = dfa->is_utf8;
183 pstr->map_notascii = dfa->map_notascii;
1407 /* Add the token TOKEN to dfa->nodes, and return the index of the token.
1412 re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
1415 if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0))
1417 size_t new_nodes_alloc = dfa->nodes_alloc * 2;
1429 new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
1432 dfa->nodes = new_nodes;
1433 new_nexts = re_realloc (dfa->nexts, int, new_nodes_alloc);
1434 new_indices = re_realloc (dfa->org_indices, int, new_nodes_alloc);
1435 new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc);
1436 new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
1440 dfa->nexts = new_nexts;
1441 dfa->org_indices = new_indices;
1442 dfa->edests = new_edests;
1443 dfa->eclosures = new_eclosures;
1444 dfa->nodes_alloc = new_nodes_alloc;
1446 dfa->nodes[dfa->nodes_len] = token;
1447 dfa->nodes[dfa->nodes_len].constraint = 0;
1449 dfa->nodes[dfa->nodes_len].accept_mb =
1450 (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
1452 dfa->nexts[dfa->nodes_len] = -1;
1453 re_node_set_init_empty (dfa->edests + dfa->nodes_len);
1454 re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
1455 return dfa->nodes_len++;
1480 re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
1493 spot = dfa->state_table + (hash & dfa->state_hash_mask);
1504 /* There are no appropriate state in the dfa, create the new one. */
1505 new_state = create_ci_newstate (dfa, nodes, hash);
1524 re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
1537 spot = dfa->state_table + (hash & dfa->state_hash_mask);
1547 /* There are no appropriate state in `dfa', create the new one. */
1548 new_state = create_cd_newstate (dfa, nodes, context, hash);
1561 register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
1575 if (!IS_EPSILON_NODE (dfa->nodes[elem].type))
1580 spot = dfa->state_table + (hash & dfa->state_hash_mask);
1616 create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
1636 re_token_t *node = dfa->nodes + nodes->elems[i];
1652 err = register_state (dfa, newstate, hash);
1666 create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
1688 re_token_t *node = dfa->nodes + nodes->elems[i];
1728 err = register_state (dfa, newstate, hash);