ecoli_node_subset(3)

πŸ“¦
version 0.11.3 Β· 2 versions
, in epel 9

πŸ’… 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 NULL on error (errno is 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 NULL on error (errno is 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

  • 0 on success, -1 on error (errno is 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

  • 0 on success, -1 on error (errno is 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 0 if the node is not a subset. (yeah, if it's not a subset node you just get a lil 0, 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 is 0, and every single error path sets errno. 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