ecoli_node_subset - Man Page

Name

ecoli_node_subset — Subset node

— A node that matches any subset of its children in any order.  

Synopsis

Macros

#define EC_NODE_SUBSET(args...)

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.

Configuration Schema

No configuration schema.

Macro Definition Documentation

#define EC_NODE_SUBSET( args...)

Value:

__ec_node_subset(args, EC_VA_END)

Create a subset node from a list of child nodes.

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.

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.

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.

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.

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.

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.

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.

Parameters

node The subset node.

Returns

The minimum number, or 0 if the node is not a subset.

Author

Generated automatically by Doxygen for Libecoli from the source code.

Referenced By

The man pages ec_node_subset(3), EC_NODE_SUBSET(3), ec_node_subset_add(3), ec_node_subset_get_min(3), ec_node_subset_min(3) and ec_node_subset_set_min(3) are aliases of ecoli_node_subset(3).

Version 0.11.3 Libecoli