]> granicus.if.org Git - icinga2/commitdiff
Updated the lexer/parser.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 31 May 2012 06:59:40 +0000 (08:59 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 31 May 2012 06:59:40 +0000 (08:59 +0200)
components/configfile/.gitignore [new file with mode: 0644]
components/configfile/icinga_lexer.ll
components/configfile/icinga_parser.yy

diff --git a/components/configfile/.gitignore b/components/configfile/.gitignore
new file mode 100644 (file)
index 0000000..f76429b
--- /dev/null
@@ -0,0 +1,3 @@
+icinga_lexer.cc
+icinga_parser.cc
+icinga_parser.h
index e15183bfb00c991665ac98c8bf0154ddfa693535..36af88fc6cd55d34163e8e9369698c1d0a1a769b 100644 (file)
@@ -1,7 +1,7 @@
 %{
 #include <iostream>
 #include "configcontext.h"
-#include "icinga.tab.h"
+#include "icinga_parser.h"
 
 #define YY_EXTRA_TYPE ConfigContext *
 #define YY_USER_ACTION yylloc->first_line = yylineno;
@@ -14,7 +14,6 @@ do {                                          \
 %}
 
 %option reentrant noyywrap yylineno
-%option prefix="icinga"
 %option bison-bridge bison-locations
 
 %x IN_C_COMMENT
index fc6adb1a6da519653bfce57d46c4df6a27f5c904..744172ec9b4f4262fa55eece3a9b508de68981fa 100644 (file)
@@ -1,5 +1,4 @@
 %pure-parser
-%name-prefix="icinga"
 
 %locations
 %defines
@@ -32,9 +31,9 @@
 #include <iostream>
 #include "configcontext.h"
 
-int icingalex(YYSTYPE *lvalp, YYLTYPE *llocp, void *scanner);
+int yylex(YYSTYPE *lvalp, YYLTYPE *llocp, void *scanner);
 
-void icingaerror(YYLTYPE *locp, ConfigContext *context, const char *err)
+void yyerror(YYLTYPE *locp, ConfigContext *context, const char *err)
 {
        std::cout << locp->first_line << ":" << locp->first_column
            << "-"