summaryrefslogtreecommitdiff
path: root/src/cli_def.l
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-01-24 17:34:30 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2008-01-24 17:34:30 -0800
commit72c4913ad51c64f73f49e6ec00764185b8c32740 (patch)
treeb9e92b23778e2a08f769d8a46c4c8dd5015e1ed1 /src/cli_def.l
parentc0f8c1cbd9afc87ae76222024dd0e98127ca1708 (diff)
downloadvyatta-cfg-72c4913ad51c64f73f49e6ec00764185b8c32740.tar.gz
vyatta-cfg-72c4913ad51c64f73f49e6ec00764185b8c32740.zip
add "official" support for "comp_help" and "allowed" in config template
parser (ignored by backend).
Diffstat (limited to 'src/cli_def.l')
-rw-r--r--src/cli_def.l18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/cli_def.l b/src/cli_def.l
index d959fb0..df768c1 100644
--- a/src/cli_def.l
+++ b/src/cli_def.l
@@ -21,13 +21,19 @@ static char *reg_fields[] = { "default", "tag", "type", "multi", NULL };
static int reg_fields_t[] = { DEFAULT, TAG, TYPE, MULTI, 0 };
static char *act_fields[] = { "help", "syntax", "commit",
"delete", "update", "activate", "create",
- "begin", "end", NULL };
+ "begin", "end",
+ "comp_help", "allowed",
+ NULL };
static int act_fields_t[] = { HELP, SYNTAX, COMMIT,
ACTION, ACTION, ACTION, ACTION,
- ACTION, ACTION, 0 };
+ ACTION, ACTION,
+ DUMMY, DUMMY,
+ 0 };
static int act_types[] = { -1, -1, -1,
delete_act, update_act, activate_act, create_act,
- begin_act, end_act, -1 };
+ begin_act, end_act,
+ -1, -1,
+ -1 };
static char *type_names[] = { "txt", "u32", "ipv4", "ipv4net",
"ipv6", "ipv6net", "bool", "macaddr",
@@ -257,7 +263,7 @@ RE_OP_OTHER (pattern|exec|,|\|\||&&|=|!|\(|\)|;)
/* template fields */
RE_REG_FIELD (default|tag|type|multi)
-RE_ACT_FIELD (help|syntax|commit|delete|update|activate|create|begin|end)
+RE_ACT_FIELD (help|syntax|commit|delete|update|activate|create|begin|end|comp_help|allowed)
%%
@@ -405,6 +411,10 @@ RE_ACT_FIELD (help|syntax|commit|delete|update|activate|create|begin|end)
{RE_VAL_BOOL} { return return_value(BOOL_TYPE); }
{RE_MACADDR} { return return_value(MACADDR_TYPE); }
+. {
+ return SYNTAX_ERROR;
+ }
+
%%
static void