Lines Matching refs: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;
1406 /* Add the token TOKEN to dfa->nodes, and return the index of the token.
1411 re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
1413 if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0))
1415 size_t new_nodes_alloc = dfa->nodes_alloc * 2;
1425 if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0))
1428 new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
1431 dfa->nodes = new_nodes;
1432 new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc);
1433 new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc);
1434 new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc);
1435 new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
1439 dfa->nexts = new_nexts;
1440 dfa->org_indices = new_indices;
1441 dfa->edests = new_edests;
1442 dfa->eclosures = new_eclosures;
1443 dfa->nodes_alloc = new_nodes_alloc;
1445 dfa->nodes[dfa->nodes_len] = token;
1446 dfa->nodes[dfa->nodes_len].constraint = 0;
1450 dfa->nodes[dfa->nodes_len].accept_mb =
1451 (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
1454 dfa->nexts[dfa->nodes_len] = REG_MISSING;
1455 re_node_set_init_empty (dfa->edests + dfa->nodes_len);
1456 re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
1457 return dfa->nodes_len++;
1482 re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
1499 spot = dfa->state_table + (hash & dfa->state_hash_mask);
1510 /* There are no appropriate state in the dfa, create the new one. */
1511 new_state = create_ci_newstate (dfa, nodes, hash);
1530 re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
1547 spot = dfa->state_table + (hash & dfa->state_hash_mask);
1557 /* There are no appropriate state in `dfa', create the new one. */
1558 new_state = create_cd_newstate (dfa, nodes, context, hash);
1571 register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
1585 if (!IS_EPSILON_NODE (dfa->nodes[elem].type))
1590 spot = dfa->state_table + (hash & dfa->state_hash_mask);
1626 create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
1646 re_token_t *node = dfa->nodes + nodes->elems[i];
1662 err = register_state (dfa, newstate, hash);
1676 create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
1698 re_token_t *node = dfa->nodes + nodes->elems[i];
1738 err = register_state (dfa, newstate, hash);