ec_node_once - Man Page
This node behaves like its child, but prevents it from being parsed more than once.
Synopsis
#include <ecoli/node_once.h>
struct ec_node * ec_node_once(
const char *id,
struct ec_node *child
);Description
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.
See Also
Copyright
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
Referenced By
2026-06-11 Libecoli Programmer's Manual