]> git.puffer.fish Git - mirror/frr.git/commit
lib: parser: add named variables in CLI
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 18 Nov 2016 11:06:57 +0000 (12:06 +0100)
committerQuentin Young <qlyoung@users.noreply.github.com>
Mon, 15 May 2017 14:27:43 +0000 (10:27 -0400)
commit16705ecc653dd657c5b8149934d8734e89c27c07
tree382236b56dcc7542e95d302d031c686ae6618eb7
parent6a72763d738c7c4132fbc4af03a688a7cc0e49e3
lib: parser: add named variables in CLI

struct cmd_token now has a "varname" field which is derived from the
DEFUN's string definition.  It can be manually specified with "$name"
after some token, e.g. "foo WORD$var".  A later commit adds code to
automatically fill the value if nothing is specified.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/command.c
lib/command.h
lib/command_parse.y
lib/grammar_sandbox.c