#include <ecoli_node_many.h>
#include <ecoli_node_or.h>
#include <ecoli_node_str.h>
#include <ecoli_node_many.h>
#include <ecoli_node_or.h>
#include <ecoli_node_str.h>
const struct ec_strvec *strvec)
{
struct ec_node_re_lex *node = (struct ec_node_re_lex *)gen_node;
struct ec_strvec *new_vec = NULL;
const struct ec_strvec *strvec)
{
struct ec_node_re_lex *node = (struct ec_node_re_lex *)gen_node;
struct ec_strvec *new_vec = NULL;
str = ec_strvec_val(strvec, 0);
new_vec = tokenize(node->table, node->len, str);
}
str = ec_strvec_val(strvec, 0);
new_vec = tokenize(node->table, node->len, str);
}
- } else if (ret != EC_PARSED_NOMATCH) {
- child_parsed = ec_parsed_get_last_child(state);
- ec_parsed_unlink_child(state, child_parsed);
- ec_parsed_free(child_parsed);
- ret = EC_PARSED_NOMATCH;
+ } else if (ret != EC_PARSE_NOMATCH) {
+ child_parse = ec_parse_get_last_child(state);
+ ec_parse_unlink_child(state, child_parse);
+ ec_parse_free(child_parse);
+ ret = EC_PARSE_NOMATCH;
+static size_t
+ec_node_re_lex_get_children_count(const struct ec_node *gen_node)
+{
+ struct ec_node_re_lex *node = (struct ec_node_re_lex *)gen_node;
+
+ if (node->child)
+ return 1;
+ return 0;
+}
+
+static struct ec_node *
+ec_node_re_lex_get_child(const struct ec_node *gen_node, size_t i)
+{
+ struct ec_node_re_lex *node = (struct ec_node_re_lex *)gen_node;
+
+ if (i >= 1)
+ return NULL;
+
+ return node->child;
+}
+
static struct ec_node_type ec_node_re_lex_type = {
.name = "re_lex",
.parse = ec_node_re_lex_parse,
.complete = ec_node_complete_unknown,
.size = sizeof(struct ec_node_re_lex),
.free_priv = ec_node_re_lex_free_priv,
static struct ec_node_type ec_node_re_lex_type = {
.name = "re_lex",
.parse = ec_node_re_lex_parse,
.complete = ec_node_complete_unknown,
.size = sizeof(struct ec_node_re_lex),
.free_priv = ec_node_re_lex_free_priv,