Skip to content

Commit

Permalink
Fixed [Ability to use show attribute to display a multiword string #33](
Browse files Browse the repository at this point in the history
  • Loading branch information
olofhagsand committed Dec 1, 2019
1 parent 62dc022 commit d8be6a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 4.3.0 (Expected: December 2019)
Bumped version to match with clixon 4.3

* Fixed [Ability to use show attribute to display a multiword string #33](https://github.com/olofhagsand/cligen/issues/33)
* Fixed: [Is it possible to hide non-terminal commands? #31](https://github.com/olofhagsand/cligen/issues/31)
* Removed "auth" as a local variable in docs, since it is not implemented

Expand Down
4 changes: 0 additions & 4 deletions cligen_gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,6 @@ struct cg_obj{
size_t co_userlen; /* Length of the userdata (need copying) */
int co_treeref; /* This node is top of expanded sub-tree */
int co_refdone; /* This reference has already been expanded */
/* Experiment to make the junos edit style work. When we graft the tree,
these places should insert extra NULL child to be able to edit.
*/
int co_nonterminal; /* Set if we should be able to <CR> here */

/* Ugly application code */
struct parse_tree co_pt_push; /* Saved orig of parse-tree (ugly user code) */
Expand Down
9 changes: 6 additions & 3 deletions cligen_parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -1213,15 +1213,18 @@ keypairs : keypair
| keypairs ' ' keypair
;

numdec : NUMBER { $$ = $1; }
| DECIMAL
;
numdec : NUMBER { $$ = $1; }
| DECIMAL
;

keypair : NAME '(' ')' { expand_fn(_ya, $1); }
| NAME '(' exparglist ')' { expand_fn(_ya, $1); }
| V_SHOW ':' NAME {
_YA->ya_var->co_show = $3;
}
| V_SHOW ':' DQ charseq DQ {
_YA->ya_var->co_show = $4;
}
| V_RANGE '[' numdec ':' numdec ']' {
if (cg_range(_ya, $3, $5) < 0) YYERROR; free($3); free($5);
}
Expand Down

0 comments on commit d8be6a6

Please sign in to comment.