blob: a940e89dbd5b257cbbb0f5d70291458916c57818 (
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
|
#ifndef __obcl_h
#define __obcl_h
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
typedef enum CLNodeType {
CL_ID,
CL_NUM,
CL_STR,
CL_LIST,
CL_BLOCK,
CL_LISTBLOCK
} CLNodeType;
typedef struct CLNode {
CLNodeType type;
union {
struct {
gchar *id;
GList *list;
GList *block;
} lb;
double num;
gchar *str;
} u;
} CLNode;
void free_cl_tree(GList *tree);
GList *cl_parse(gchar *file);
GList *cl_parse_fh(FILE *file);
void cl_print_tree(GList *tree, int depth);
GList *parse_file(FILE *fh);
#endif /* __obcl_h */
|