1 /*
2   CLI generator. Take idl as input and generate a tree for use in cli.
3 
4   ***** BEGIN LICENSE BLOCK *****
5 
6   Copyright (C) 2001-2020 Olof Hagsand
7 
8   This file is part of CLIgen.
9 
10   Licensed under the Apache License, Version 2.0 (the "License");
11   you may not use this file except in compliance with the License.
12   You may obtain a copy of the License at
13 
14     http://www.apache.org/licenses/LICENSE-2.0
15 
16   Unless required by applicable law or agreed to in writing, software
17   distributed under the License is distributed on an "AS IS" BASIS,
18   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19   See the License for the specific language governing permissions and
20   limitations under the License.
21 
22   Alternatively, the contents of this file may be used under the terms of
23   the GNU General Public License Version 2 or later (the "GPL"),
24   in which case the provisions of the GPL are applicable instead
25   of those above. If you wish to allow use of your version of this file only
26   under the terms of the GPL, and not to allow others to
27   use your version of this file under the terms of Apache License version 2, indicate
28   your decision by deleting the provisions above and replace them with the
29   notice and other provisions required by the GPL. If you do not delete
30   the provisions above, a recipient may use your version of this file under
31   the terms of any one of the Apache License version 2 or the GPL.
32 
33   ***** END LICENSE BLOCK *****
34 
35 */
36 
37 #ifndef _CLIGEN_EXPAND_H_
38 #define _CLIGEN_EXPAND_H_
39 
40 /*
41  * Types
42  */
43 /* Here we should have expandv_cb but it is in cligen_object.h */
44 
45 /*
46  * Prototypes
47  */
48 int pt_expand_treeref(cligen_handle h, cg_obj *coprev, parse_tree *pt);
49 int pt_expand(cligen_handle h, parse_tree *pt, cvec *cvec, int hide, int expandv, parse_tree *ptn);
50 int pt_expand_treeref_cleanup(parse_tree *pt);
51 int pt_expand_cleanup(parse_tree *pt);
52 int reference_path_match(cg_obj *co1, parse_tree *pt0, cg_obj **co0p);
53 int transform_var_to_cmd(cg_obj *co, char *cmd, char *comment);
54 const char* cligen_escape(const char* s);
55 
56 #endif /* _CLIGEN_EXPAND_H_ */
57 
58