ecoli_node_once - Man Page

Name

ecoli_node_once — Once node

— A node that prevents its child from being parsed more than once.  

Synopsis

Functions

struct ec_node * ec_node_once (const char *id, struct ec_node *child)
int ec_node_once_set_child (struct ec_node *node, struct ec_node *child)

Detailed Description

A node that prevents its child from being parsed more than once.

Configuration Schema

schema once {
    node child  {
        description "The child node.";
    }
}

Function Documentation

struct ec_node * ec_node_once (const char * id, struct ec_node * child)

This node behaves like its child, but prevents it from being parsed more than once.

Example:

many(
  or(
    once(str("foo")),
    str("bar")))

Matches: [], ["foo", "bar"], ["bar", "bar"], ["foo", "bar", "bar"], ... But not: ["foo", "foo"], ["foo", "bar", "foo"], ...

On error, the child is not freed.

int ec_node_once_set_child (struct ec_node * node, struct ec_node * child)

Set the child of a once node. On error, the child is freed.

Author

Generated automatically by Doxygen for Libecoli from the source code.

Referenced By

The man pages ec_node_once(3) and ec_node_once_set_child(3) are aliases of ecoli_node_once(3).

Version 0.11.3 Libecoli