#include <ecoli_test.h>
#include <ecoli_strvec.h>
#include <ecoli_node.h>
-#include <ecoli_parsed.h>
+#include <ecoli_parse.h>
#include <ecoli_complete.h>
#include <ecoli_node_str.h>
#include <ecoli_node_option.h>
static int
ec_node_seq_parse(const struct ec_node *gen_node,
- struct ec_parsed *state,
+ struct ec_parse *state,
const struct ec_strvec *strvec)
{
struct ec_node_seq *node = (struct ec_node_seq *)gen_node;
ec_strvec_free(childvec);
childvec = NULL;
- if (ret == EC_PARSED_NOMATCH) {
- ec_parsed_free_children(state);
- return EC_PARSED_NOMATCH;
+ if (ret == EC_PARSE_NOMATCH) {
+ ec_parse_free_children(state);
+ return EC_PARSE_NOMATCH;
}
len += ret;
struct ec_comp *comp,
const struct ec_strvec *strvec)
{
- struct ec_parsed *parsed = ec_comp_get_state(comp);
+ struct ec_parse *parse = ec_comp_get_state(comp);
struct ec_strvec *childvec = NULL;
unsigned int i;
int ret;
if (childvec == NULL)
goto fail;
- ret = ec_node_parse_child(table[0], parsed, childvec);
+ ret = ec_node_parse_child(table[0], parse, childvec);
if (ret < 0)
goto fail;
childvec = NULL;
if ((unsigned int)ret != i) {
- if (ret != EC_PARSED_NOMATCH)
- ec_parsed_del_last_child(parsed);
+ if (ret != EC_PARSE_NOMATCH)
+ ec_parse_del_last_child(parse);
continue;
}
childvec = ec_strvec_ndup(strvec, i, ec_strvec_len(strvec) - i);
if (childvec == NULL) {
- ec_parsed_del_last_child(parsed);
+ ec_parse_del_last_child(parse);
goto fail;
}
ret = __ec_node_seq_complete(&table[1],
table_len - 1,
comp, childvec);
- ec_parsed_del_last_child(parsed);
+ ec_parse_del_last_child(parse);
ec_strvec_free(childvec);
childvec = NULL;