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