CliXoN
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
clixon_json_parse.h
Go to the documentation of this file.
1 /*
2  *
3  ***** BEGIN LICENSE BLOCK *****
4 
5  Copyright (C) 2009-2017 Olof Hagsand and Benny Holmgren
6 
7  This file is part of CLIXON.
8 
9  Licensed under the Apache License, Version 2.0 (the "License");
10  you may not use this file except in compliance with the License.
11  You may obtain a copy of the License at
12 
13  http://www.apache.org/licenses/LICENSE-2.0
14 
15  Unless required by applicable law or agreed to in writing, software
16  distributed under the License is distributed on an "AS IS" BASIS,
17  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  See the License for the specific language governing permissions and
19  limitations under the License.
20 
21  Alternatively, the contents of this file may be used under the terms of
22  the GNU General Public License Version 3 or later (the "GPL"),
23  in which case the provisions of the GPL are applicable instead
24  of those above. If you wish to allow use of your version of this file only
25  under the terms of the GPL, and not to allow others to
26  use your version of this file under the terms of Apache License version 2,
27  indicate your decision by deleting the provisions above and replace them with
28  the notice and other provisions required by the GPL. If you do not delete
29  the provisions above, a recipient may use your version of this file under
30  the terms of any one of the Apache License version 2 or the GPL.
31 
32  ***** END LICENSE BLOCK *****
33 
34  */
35 #ifndef _CLIXON_JSON_PARSE_H_
36 #define _CLIXON_JSON_PARSE_H_
37 
38 /*
39  * Types
40  */
41 
42 struct clicon_json_yacc_arg{ /* XXX: mostly unrelevant */
43  const char *jy_name; /* Name of syntax (for error string) */
44  int jy_linenum; /* Number of \n in parsed buffer */
45  char *jy_parse_string; /* original (copy of) parse string */
46  void *jy_lexbuf; /* internal parse buffer from lex */
47  cxobj *jy_current;
48 };
49 
50 /*
51  * Variables
52  */
53 extern char *clixon_json_parsetext;
54 
55 /*
56  * Prototypes
57  */
58 int json_scan_init(struct clicon_json_yacc_arg *jy);
59 int json_scan_exit(struct clicon_json_yacc_arg *jy);
60 
63 
64 int clixon_json_parselex(void *);
65 int clixon_json_parseparse(void *);
66 void clixon_json_parseerror(void *, char*);
67 
68 #endif /* _CLIXON_JSON_PARSE_H_ */
char * jy_parse_string
Definition: clixon_json_parse.h:45
int clixon_json_parselex(void *)
int json_scan_exit(struct clicon_json_yacc_arg *jy)
Definition: clixon_json_parse.l:131
char * clixon_json_parsetext
Definition: clixon_json_parse.l:54
const char * jy_name
Definition: clixon_json_parse.h:43
Definition: clixon_json_parse.h:42
int json_parse_init(struct clicon_json_yacc_arg *jy)
Definition: clixon_json_parse.tab.c:203
cxobj * jy_current
Definition: clixon_json_parse.h:47
void * jy_lexbuf
Definition: clixon_json_parse.h:46
void clixon_json_parseerror(void *, char *)
Definition: clixon_json_parse.tab.c:192
int json_scan_init(struct clicon_json_yacc_arg *jy)
Definition: clixon_json_parse.l:114
int jy_linenum
Definition: clixon_json_parse.h:44
int json_parse_exit(struct clicon_json_yacc_arg *jy)
Definition: clixon_json_parse.tab.c:211
int clixon_json_parseparse(void *)