openbox/openbox/parse.h
Dana Jansens f26f23de50 all my changes while i was offline.
better alt-tabbing. better transient handling. i dont even know. lots of fucking cool shit so WATCH the FUCK OUT.
2003-05-09 16:57:17 +00:00

48 lines
1,004 B
C

#ifndef __parse_h
#define __parse_h
#include <glib.h>
#ifndef NO_TAB_H
#include "parse.tab.h"
#endif
typedef enum {
TOKEN_REAL = REAL,
TOKEN_INTEGER = INTEGER,
TOKEN_STRING = STRING,
TOKEN_IDENTIFIER = IDENTIFIER,
TOKEN_BOOL = BOOLEAN,
TOKEN_LIST,
TOKEN_LBRACE = '{',
TOKEN_RBRACE = '}',
TOKEN_COMMA = ',',
TOKEN_NEWLINE = '\n'
} ParseTokenType;
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();
/* Parse the RC file
found in parse.yacc
*/
void parse_rc();
void parse_reg_section(char *section, ParseFunc func, AssignParseFunc afunc);
/* Free a parsed token's allocated memory */
void parse_free_token(ParseToken *token);
/* Display an error message while parsing.
found in parse.yacc */
void yyerror(char *err);
#endif