blob: 1002964d76a75e5235ea17e58971b97ed415817f (
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
39
|
#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;
GList *cl_parse(gchar *file);
GList *cl_parse_fh(FILE *file);
void cl_tree_free(GList *tree);
void cl_tree_print(GList *tree, int depth);
void cl_tree_process(GList *tree);
#endif /* __obcl_h */
|