EC_PNODE_GET_STRVEC(3)
π EC_PNODE_GET_STRVEC π
okay bestie, sit down, hydrate, and let me tell you about ec_pnode_get_strvec from the Libecoli Programmer's Manual β she's a little function that hands you back the string vector chillin' inside a parsing node π
β¨ NAME β¨
ec_pnode_get_strvec β bestie, this one literally gets the string vector associated with a parsing node. that's the whole job. icon behavior π
β¨ 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
);
like, look at her. one parameter. no drama π¦
β¨ DESCRIPTION β¨
so here's the vibe πΈ
when an input gets parsed successfully β meaning the input string vector matches the grammar tree β the matching string vector gets copied inside the associated parsing node. it's giving "your results are stored right where you'd expect them" π
for instance, say you're 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 π["bar"]on the second leaf π§
everybody gets a slice, no cap.
π«Ά and if the parsing tree does not match (peepec_pnode_matches()for that situation), the associated string vector is justNULL. nothing there. empty. ghosted π
β¨ RETURN VALUE β¨
she returns the string vector associated with the parsing node π
or NULL if:
- the node is not yet parsed β this happens when you're building the parsing tree, so like, she's still under construction bestie π§
- the parsing tree does not match the input π
β¨ SEE ALSO β¨
the whole friend group, fr fr β go read these too:
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. π
and that's the whole page, bestie!! π this lil beauty is from libecoli, dated 2026-06-11, and honestly? she ate. go parse something iconic. periodt β¨π
π¦ where this page comes from
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms