Lines Matching defs:dfa

24 					const re_dfa_t *dfa) internal_function;
25 static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
28 static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
42 RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
48 if (init_len < dfa->mb_cur_max)
49 init_len = dfa->mb_cur_max;
51 re_string_construct_common (str, len, pstr, trans, icase, dfa);
57 pstr->word_char = dfa->word_char;
58 pstr->word_ops_used = dfa->word_ops_used;
60 pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len;
70 RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
74 re_string_construct_common (str, len, pstr, trans, icase, dfa);
87 if (dfa->mb_cur_max > 1)
96 if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
110 if (dfa->mb_cur_max > 1)
174 const re_dfa_t *dfa)
182 pstr->mb_cur_max = dfa->mb_cur_max;
183 pstr->is_utf8 = dfa->is_utf8;
184 pstr->map_notascii = dfa->map_notascii;
1404 /* Add the token TOKEN to dfa->nodes, and return the index of the token.
1409 re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
1411 if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0))
1413 size_t new_nodes_alloc = dfa->nodes_alloc * 2;
1423 if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0))
1426 new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
1429 dfa->nodes = new_nodes;
1430 new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc);
1431 new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc);
1432 new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc);
1433 new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
1437 dfa->nexts = new_nexts;
1438 dfa->org_indices = new_indices;
1439 dfa->edests = new_edests;
1440 dfa->eclosures = new_eclosures;
1441 dfa->nodes_alloc = new_nodes_alloc;
1443 dfa->nodes[dfa->nodes_len] = token;
1444 dfa->nodes[dfa->nodes_len].constraint = 0;
1448 dfa->nodes[dfa->nodes_len].accept_mb =
1449 (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
1452 dfa->nexts[dfa->nodes_len] = REG_MISSING;
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,
1497 spot = dfa->state_table + (hash & dfa->state_hash_mask);
1508 /* There are no appropriate state in the dfa, create the new one. */
1509 new_state = create_ci_newstate (dfa, nodes, hash);
1528 re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
1545 spot = dfa->state_table + (hash & dfa->state_hash_mask);
1555 /* There are no appropriate state in `dfa', create the new one. */
1556 new_state = create_cd_newstate (dfa, nodes, context, hash);
1568 register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
1582 if (!IS_EPSILON_NODE (dfa->nodes[elem].type))
1587 spot = dfa->state_table + (hash & dfa->state_hash_mask);
1623 create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
1643 re_token_t *node = dfa->nodes + nodes->elems[i];
1659 err = register_state (dfa, newstate, hash);
1673 create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
1696 re_token_t *node = dfa->nodes + nodes->elems[i];
1737 err = register_state (dfa, newstate, hash);