summaryrefslogtreecommitdiff
path: root/lib/grammar_sandbox.c
blob: c19be7f93414103b0e79e7a4824d4e64866034b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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);
}