diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-06-23 16:47:32 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-07-12 17:05:05 +0200 |
commit | 51e156b303174567062db59268bc8afa43ef730f (patch) | |
tree | fb7b1f5bfec7a329e1738272377ce258ed0b6d28 /lib/grammar_sandbox.c | |
parent | pimd: Start naive implementation of anysource_forward_stop (diff) | |
download | frr-51e156b303174567062db59268bc8afa43ef730f.tar.xz frr-51e156b303174567062db59268bc8afa43ef730f.zip |
Add grammar sandbox framework
Diffstat (limited to 'lib/grammar_sandbox.c')
-rw-r--r-- | lib/grammar_sandbox.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c new file mode 100644 index 000000000..c19be7f93 --- /dev/null +++ b/lib/grammar_sandbox.c @@ -0,0 +1,53 @@ +#include "command.h" + +#define GRAMMAR_STR "CLI grammar sandbox\n" + +DEFUN (grammar_midkey_test, + grammar_midkey_test_cmd, + "grammar {one|two} test", + GRAMMAR_STR + "First option\n" + "Second option\n" + "Test parameter to end string\n") +{ + return CMD_SUCCESS; +} + +DEFUN (grammar_onemidkey_test, + grammar_onemidkey_test_cmd, + "grammar {onekey} test", + GRAMMAR_STR + "First option\n" + "Test parameter to end string\n") +{ + return CMD_SUCCESS; +} + +DEFUN (grammar_smashmouth_test, + grammar_smashmouth_test_cmd, + "grammar {smash MOUTH} test", + GRAMMAR_STR + "It ain't easy bein' cheesy\n" + "Test parameter to end string\n") +{ + return CMD_SUCCESS; +} + +DEFUN (grammar_midopt_test, + grammar_midopt_test_cmd, + "grammar [option] test", + GRAMMAR_STR + "optional argument\n" + "Test parameter to end string\n") +{ + return CMD_SUCCESS; +} + + +void grammar_sandbox_init(void); +void grammar_sandbox_init() { + install_element (ENABLE_NODE, &grammar_midkey_test_cmd); + install_element (ENABLE_NODE, &grammar_onemidkey_test_cmd); + install_element (ENABLE_NODE, &grammar_midopt_test_cmd); + install_element (ENABLE_NODE, &grammar_smashmouth_test_cmd); +} |