summaryrefslogtreecommitdiffstats
path: root/mmss/config.y
diff options
context:
space:
mode:
Diffstat (limited to 'mmss/config.y')
-rw-r--r--mmss/config.y15
1 files changed, 8 insertions, 7 deletions
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 <mmss.hpp>
#include <cstdio>
+ #include <string>
}
%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);
}