]> icculus.org git repositories - mikachu/openbox.git/blob - openbox/parse.h
don't include the y.tab.h inside the yacc file
[mikachu/openbox.git] / openbox / parse.h
1 #ifndef __parse_h
2 #define __parse_h
3
4 #include <glib.h>
5 #ifndef NO_Y_H
6 #  include "y.tab.h"
7 #endif
8
9 typedef enum {
10     TOKEN_REAL       = REAL,
11     TOKEN_INTEGER    = INTEGER,
12     TOKEN_STRING     = STRING,
13     TOKEN_IDENTIFIER = IDENTIFIER,
14     TOKEN_BOOL       = BOOL,
15     TOKEN_LBRACKET   = '(',
16     TOKEN_RBRACKET   = ')',
17     TOKEN_LBRACE     = '{',
18     TOKEN_RBRACE     = '}',
19     TOKEN_EQUALS     = '=',
20     TOKEN_COMMA      = ',',
21     TOKEN_NEWLINE    = '\n'
22 } ParseTokenType;
23
24 typedef void (*ParseFunc)(ParseTokenType type, union ParseToken token);
25
26 void parse_startup();
27 void parse_shutdown();
28
29 /* Parse the RC file
30    found in parse.yacc
31 */
32 void parse_rc();
33
34 void parse_reg_section(char *section, ParseFunc func);
35
36
37 /* Free a parsed token's allocated memory */
38 void parse_free_token(ParseTokenType type, union ParseToken token);
39
40 /* Display an error message while parsing.
41    found in parse.yacc */
42 void yyerror(char *err);
43
44 #endif