]> Dogcows Code - chaz/openbox/blob - openbox/parse.h
3ce5ebbdc3420b1c6cac2a394ba2611530d54418
[chaz/openbox] / openbox / parse.h
1 #ifndef __parse_h
2 #define __parse_h
3
4 #include <glib.h>
5 #ifndef NO_TAB_H
6 #include "parse.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_LIST,
16 TOKEN_LBRACE = '{',
17 TOKEN_RBRACE = '}',
18 TOKEN_COMMA = ',',
19 TOKEN_NEWLINE = '\n'
20 } ParseTokenType;
21
22 typedef struct {
23 ParseTokenType type;
24 union ParseTokenData data;
25 } ParseToken;
26
27 typedef void (*ParseFunc)(ParseToken *token);
28 typedef void (*AssignParseFunc)(char *name, ParseToken *value);
29
30 void parse_startup();
31 void parse_shutdown();
32
33 /* Parse the RC file
34 found in parse.yacc
35 */
36 void parse_rc();
37
38 void parse_reg_section(char *section, ParseFunc func, AssignParseFunc afunc);
39
40
41 /* Free a parsed token's allocated memory */
42 void parse_free_token(ParseToken *token);
43
44 /* Display an error message while parsing.
45 found in parse.yacc */
46 void yyerror(char *err);
47
48 #endif
This page took 0.03262 seconds and 3 git commands to generate.