ec_pnode_get_strvec - Man Page
Get the string vector associated with a parsing node.
Synopsis
#include <ecoli/parse.h>
const struct ec_strvec * ec_pnode_get_strvec(
/*
* The parsing node. If NULL, the function returns NULL.
*/
const struct ec_pnode *pnode
);Description
When an input is parsed successfully (i.e., the input string vector matches the grammar tree), the matching string vector is copied inside the associated parsing node.
For instance, parsing the input ["foo", "bar"] on a grammar which is a sequence of strings, the attached string vector will be ["foo", "bar"] on the root pnode, ["foo"] on the first leaf, and ["bar"] on the second leaf.
If the parsing tree does not match (see ec_pnode_matches()), the associated string vector is NULL.
Return Value
The string vector associated with the parsing node, or NULL if the node is not yet parsed (this happens when building the parsing tree), or if the parsing tree does not match the input.
See Also
ec_pnode_len(3), ec_parse(3), ec_parse_strvec(3), ec_pnode(3), ec_pnode_free_children(3), ec_pnode_get_root(3), ec_pnode_get_parent(3), ec_pnode_find_next(3), ec_pnode_get_first_child(3), ec_pnode_free(3), ec_pnode_dup(3), ec_pnode_matches(3), ec_pnode_dump(3), ec_pnode_unlink_child(3), ec_pnode_next(3), ec_pnode_del_last_child(3), ec_pnode_link_child(3), ec_pnode_count(3), ec_pnode_get_attrs(3), ec_pnode_get_last_child(3), ec_pnode_get_node(3), ec_pnode_find(3), ec_parse_child(3)
Copyright
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
Referenced By
ec_parse(3), ec_parse_child(3), ec_parse_strvec(3), ec_pnode(3), ec_pnode_count(3), ec_pnode_del_last_child(3), ec_pnode_dump(3), ec_pnode_dup(3), ec_pnode_find(3), ec_pnode_find_next(3), ec_pnode_free(3), ec_pnode_free_children(3), ec_pnode_get_attrs(3), ec_pnode_get_first_child(3), ec_pnode_get_last_child(3), ec_pnode_get_node(3), ec_pnode_get_parent(3), ec_pnode_get_root(3), ec_pnode_len(3), ec_pnode_link_child(3), ec_pnode_matches(3), ec_pnode_next(3), ec_pnode_unlink_child(3).