From 1f67abe0f324a226de619ba9de44dbd5eb54ecaa Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 26 Jul 2013 17:45:15 +0200 Subject: Clean up queue implementation, fix namespaces --- mmss/config.y | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'mmss/config.y') diff --git a/mmss/config.y b/mmss/config.y index 722ce25..6761d7c 100644 --- a/mmss/config.y +++ b/mmss/config.y @@ -28,8 +28,8 @@ %define api.push-pull push %name-prefix "mmss_config_" %locations -%parse-param {mmss_t *mmss} -%parse-param {mmss_config_t *conf} +%parse-param {MMSS::context_t *mmss} +%parse-param {MMSS::config_t *conf} %parse-param {const char *filename} @@ -37,12 +37,13 @@ #include #include + #include } %union { int num; - mmss_string_stack_t *str; bool boolean; + char *str; const char *error; } @@ -56,7 +57,7 @@ %code { - void mmss_config_error(YYLTYPE *loc, mmss_t *mmss, mmss_config_t *conf, const char *filename, const char *s); + void mmss_config_error(YYLTYPE *loc, MMSS::context_t *mmss, MMSS::config_t *conf, const char *filename, const char *s); } @@ -75,7 +76,7 @@ statement: TOK_NETWORK network '{' network_config '}' ; network: TOK_STRING { - mmss_config_add_network(mmss, conf, $1->str); + MMSS::Config::add_network(mmss, conf, $1); } ; @@ -88,6 +89,6 @@ boolean: TOK_YES { $$ = true; } %% -void mmss_config_error(YYLTYPE *loc, mmss_t *mmss, mmss_config_t *conf, const char *filename, const char *s) { - mmss_logf(mmss, LOG_ERR, "config error: %s at %s:%i:%i", s, filename, loc->first_line, loc->first_column); +void mmss_config_error(YYLTYPE *loc, MMSS::context_t *mmss, MMSS::config_t *conf, const char *filename, const char *s) { + MMSS::logf(mmss, LOG_ERR, "config error: %s at %s:%i:%i", s, filename, loc->first_line, loc->first_column); } -- cgit v1.2.3