]> Dogcows Code - chaz/openbox/blobdiff - openbox/parse.h
all my changes while i was offline.
[chaz/openbox] / openbox / parse.h
index 9f9eda6d8855edeeba531c7ca8cdaba0a3fa39cc..abd5bb2d7ef718c41ba9c1a72f6e05b639ed9e83 100644 (file)
@@ -2,8 +2,8 @@
 #define __parse_h
 
 #include <glib.h>
-#ifndef NO_Y_H
-#  include "y.tab.h"
+#ifndef NO_TAB_H
+#include "parse.tab.h"
 #endif
 
 typedef enum {
@@ -11,17 +11,21 @@ typedef enum {
     TOKEN_INTEGER    = INTEGER,
     TOKEN_STRING     = STRING,
     TOKEN_IDENTIFIER = IDENTIFIER,
-    TOKEN_BOOL       = BOOL,
-    TOKEN_LBRACKET   = '(',
-    TOKEN_RBRACKET   = ')',
+    TOKEN_BOOL       = BOOLEAN,
+    TOKEN_LIST,
     TOKEN_LBRACE     = '{',
     TOKEN_RBRACE     = '}',
-    TOKEN_EQUALS     = '=',
     TOKEN_COMMA      = ',',
     TOKEN_NEWLINE    = '\n'
 } ParseTokenType;
 
-typedef void (*ParseFunc)(ParseTokenType type, union ParseToken token);
+typedef struct {
+    ParseTokenType type;
+    union ParseTokenData data;
+} ParseToken;
+
+typedef void (*ParseFunc)(ParseToken *token);
+typedef void (*AssignParseFunc)(char *name, ParseToken *value);
 
 void parse_startup();
 void parse_shutdown();
@@ -31,11 +35,11 @@ void parse_shutdown();
 */
 void parse_rc();
 
-void parse_reg_section(char *section, ParseFunc func);
+void parse_reg_section(char *section, ParseFunc func, AssignParseFunc afunc);
 
 
 /* Free a parsed token's allocated memory */
-void parse_free_token(ParseTokenType type, union ParseToken token);
+void parse_free_token(ParseToken *token);
 
 /* Display an error message while parsing.
    found in parse.yacc */
This page took 0.021161 seconds and 4 git commands to generate.