A node that parses commands using a format string.
More...
A node that parses commands using a format string.
Configuration Schema
schema cmd {
string expr {
description "The expression to match. Supported operators are or '|', list ',', all '&',
many '+', many-or-zero '*', option '[]', group '()'. An identifier
(alphanumeric) can reference a node whose node_id matches. Else it is
interpreted as ec_node_str() matching this string. The ',' operator requires at
least one match, the '&' operator requires all to match (in any order). Example:
command [option] (subset1, subset2) x|y";
}
list children {
description "The list of children nodes.";
node {
description "A child node whose id is referenced in the expression.";
}
}
}
◆ EC_NODE_CMD
| #define EC_NODE_CMD |
( |
| args... | ) |
|
Value:Create a command node from a format string.
The format string describes a command grammar using a simple syntax. Child nodes are passed as variadic arguments and referenced by name in the format string.
Example:
#define EC_NODE_CMD(args...)
struct ec_node * ec_node_str(const char *id, const char *str)
- Examples
- readline/main.c.
Definition at line 30 of file node_cmd.h.