]> Dogcows Code - chaz/openbox/blobdiff - obcl/obcl.h
beginning of obcl. the parser works with semicolons after statements
[chaz/openbox] / obcl / obcl.h
diff --git a/obcl/obcl.h b/obcl/obcl.h
new file mode 100644 (file)
index 0000000..a940e89
--- /dev/null
@@ -0,0 +1,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 */
This page took 0.02232 seconds and 4 git commands to generate.