summaryrefslogtreecommitdiff
path: root/lib/command_parse.y
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-08-08 17:10:23 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-08-11 12:42:01 -0400
commit9779e3f19368fe05199cddc3bc4029288c34be3f (patch)
tree75e82daeba86fefd735f98f29b2f23c9148df572 /lib/command_parse.y
parent841dcb24d76217a192a1566230100c26af9674d0 (diff)
lib: add CLI token for 48-bit mac addresses
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_parse.y')
-rw-r--r--lib/command_parse.y12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/command_parse.y b/lib/command_parse.y
index 1bc8ea1a44..0f3e42219e 100644
--- a/lib/command_parse.y
+++ b/lib/command_parse.y
@@ -101,6 +101,8 @@
%token <string> IPV6_PREFIX
%token <string> VARIABLE
%token <string> RANGE
+%token <string> MAC
+%token <string> MAC_PREFIX
/* union types for parsed rules */
%type <node> start
@@ -273,6 +275,16 @@ placeholder_token_real:
XFREE (MTYPE_LEX, $1);
}
+| MAC
+{
+ $$ = new_token_node (ctx, MAC_TKN, $1, doc_next(ctx));
+ XFREE (MTYPE_LEX, $1);
+}
+| MAC_PREFIX
+{
+ $$ = new_token_node (ctx, MAC_PREFIX_TKN, $1, doc_next(ctx));
+ XFREE (MTYPE_LEX, $1);
+}
placeholder_token:
placeholder_token_real varname_token