diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-04-02 07:46:46 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-04-02 07:46:46 +0000 |
| commit | 71c8b0b7b2cf2fa79ac4c81b7756f2b230f2de7a (patch) | |
| tree | 7294b08a6708be789f5f674418c7dc80809d78b4 /openbox/parse.h | |
| parent | 4875ff5f8ed227a989c699fe6d8390396e485815 (diff) | |
create a generic tokenizer/sectionizer for the config file. pass off the token to functions registered for each section to parse them further. some fixes for the engine irt font shadows, and fixed a bug with rendering the iconify button when it was not in the layout
Diffstat (limited to 'openbox/parse.h')
| -rw-r--r-- | openbox/parse.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/openbox/parse.h b/openbox/parse.h new file mode 100644 index 00000000..3c649db1 --- /dev/null +++ b/openbox/parse.h @@ -0,0 +1,42 @@ +#ifndef __parse_h +#define __parse_h + +#include <glib.h> +#include "y.tab.h" + +typedef enum { + TOKEN_REAL = REAL, + TOKEN_INTEGER = INTEGER, + TOKEN_STRING = STRING, + TOKEN_IDENTIFIER = IDENTIFIER, + TOKEN_BOOL = BOOL, + TOKEN_LBRACKET = '(', + TOKEN_RBRACKET = ')', + TOKEN_LBRACE = '{', + TOKEN_RBRACE = '}', + TOKEN_EQUALS = '=', + TOKEN_COMMA = ',', + TOKEN_NEWLINE = '\n' +} ParseTokenType; + +typedef void (*ParseFunc)(ParseTokenType type, union ParseToken token); + +void parse_startup(); +void parse_shutdown(); + +/* Parse the RC file + found in parse.yacc +*/ +void parse_rc(); + +void parse_reg_section(char *section, ParseFunc func); + + +/* Free a parsed token's allocated memory */ +void parse_free_token(ParseTokenType type, union ParseToken token); + +/* Display an error message while parsing. + found in parse.yacc */ +void yyerror(char *err); + +#endif |
