ecoli_node_subset(3)
π ecoli_node_subset β Libecoli manual page (section 3)
okay so bestie, buckle up β this is the ecoli_node_subset(3) page from Libecoli, and honestly? it's giving chaos gremlin energy in the best way. it's a Subset node:
- A node that matches any subset of its children in any order. π¦
like, any subset. any order. no cap. let's get into it β¨
β¨ NAME β¨
ecoli_node_subset β the Subset node, bestie
- A node that matches any subset of its children in any order. π
πΈ SYNOPSIS πΈ
π§ Macros
#define EC_NODE_SUBSET(args...) __ec_node_subset(args, EC_VA_END)
π¦ Functions
struct ec_node * ec_node_subset (const char *id)
struct ec_node * ec_node_subset_min (const char *id, unsigned int min)
int ec_node_subset_add (struct ec_node *node, struct ec_node *child)
int ec_node_subset_set_min (struct ec_node *node, unsigned int min)
unsigned int ec_node_subset_get_min (const struct ec_node *node)
π Detailed Description π
A node that matches any subset of its children in any order. periodt. π₯
π Configuration Schema
No configuration schema. that's it, that's the vibe β nothing to configure here, iconically low maintenance π
π Macro Definition Documentation π
#define EC_NODE_SUBSET(args...) __ec_node_subset(args, EC_VA_END)
Create a subset node from a list of child nodes. literally just hand it your children and go π«
A subset node matches any permutation of a subset of its children. All child nodes passed as arguments are consumed and will be freed when the subset node is freed, or immediately on error. consumed β meaning they belong to the parent now, bestie, no take-backs π
Example:
EC_NODE_SUBSET("mysubset", child1, child2, child3)
Definition at line 30 of file node_subset.h. π
π Function Documentation π
struct ec_node* ec_node_subset (const char * id)
Create an empty subset node. empty! a blank canvas! main character energy β
Use ec_node_subset_add() to add children.
Parameters
idβ The node identifier.
Returns
- The node, or
NULLon error (errnois set). π
struct ec_node* ec_node_subset_min (const char * id, unsigned int min)
Create an empty subset node with a minimum number of children that must match. because sometimes zero just isn't enough, y'know? π
Use ec_node_subset_add() to add children.
Parameters
idβ The node identifier.minβ The minimum number of children that must match.
Returns
- The node, or
NULLon error (errnois set). π
int ec_node_subset_add (struct ec_node * node, struct ec_node * child)
Add a child to a subset node. adoption arc complete π«Ά
Parameters
nodeβ The subset node.childβ The child node to add. It is consumed and will be freed when the parent is freed, or immediately on error.
Returns
0on success,-1on error (errnois set).
int ec_node_subset_set_min (struct ec_node * node, unsigned int min)
Set the minimum number of children that must match. like setting a boundary. healthy! π
By default, a subset node accepts zero matching children. Use this function to require a minimum number of children to match for the parse to succeed. so yeah β the default is zero, and if you want the parse to actually demand something, this is the glow-up button β¨
Parameters
nodeβ The subset node.minβ The minimum number of children that must match.
Returns
0on success,-1on error (errnois set).
unsigned int ec_node_subset_get_min (const struct ec_node * node)
Get the minimum number of children that must match. the reading counterpart, we love a symmetrical API π§
Parameters
nodeβ The subset node.
Returns
- The minimum number, or
0if the node is not a subset. (yeah, if it's not a subset node you just get a lil0, no drama) πΈ
π¦ Author π¦
Generated automatically by Doxygen for Libecoli from the source code. not a human, just a very diligent robot doing its thing π€π
ngl bestie, the whole takeaway is: subset node = matches any subset of its children in any order, children get consumed on add, default min is0, and every single error path setserrno. slay. π₯
and that's the page!! this was Version 0.11.3, dated Thu Apr 9 2026, brought to you by Libecoli β mwah, catch you in the next manpage, iykyk πππ«Ά
π¦ where this page comes from
- epel 9: libecoli-devel 0.11.3-1.el9 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms