diff options
| author | Quentin Young <qlyoung@users.noreply.github.com> | 2021-09-09 12:22:53 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-09 12:22:53 -0400 |
| commit | 32acb4a7adc4e7fcd72b36a124e8ec3929d79e10 (patch) | |
| tree | 59036d4eb3c66e713097fac4308da117011c37d4 /lib/command_parse.y | |
| parent | f334c88ed9675eab624728ecd6eaaff3a9b41255 (diff) | |
| parent | 3be280bb8c48de8bb71ad8b193a83a0b4eec4b62 (diff) | |
Merge pull request #9497 from opensourcerouting/cli-better-no
Diffstat (limited to 'lib/command_parse.y')
| -rw-r--r-- | lib/command_parse.y | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/command_parse.y b/lib/command_parse.y index f5e42cc304..3e2cdc79af 100644 --- a/lib/command_parse.y +++ b/lib/command_parse.y @@ -105,6 +105,9 @@ %token <string> MAC %token <string> MAC_PREFIX +/* special syntax, value is irrelevant */ +%token <string> EXCL_BRACKET + /* union types for parsed rules */ %type <node> start %type <node> literal_token @@ -372,6 +375,19 @@ selector: '[' selector_seq_seq ']' varname_token } ; +/* ![option] productions */ +selector: EXCL_BRACKET selector_seq_seq ']' varname_token +{ + struct graph_node *neg_only = new_token_node (ctx, NEG_ONLY_TKN, NULL, NULL); + + $$ = $2; + graph_add_edge ($$.start, neg_only); + graph_add_edge (neg_only, $$.end); + cmd_token_varname_set ($2.end->data, $4); + XFREE (MTYPE_LEX, $4); +} +; + %% #undef scanner |
