diff --git a/lib/config/CMakeLists.txt b/lib/config/CMakeLists.txt index e40f35e05..c878275bb 100644 --- a/lib/config/CMakeLists.txt +++ b/lib/config/CMakeLists.txt @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software Foundation # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -find_package(BISON 2.4.1 REQUIRED) +find_package(BISON 2.3.0 REQUIRED) find_package(FLEX 2.5.37 REQUIRED) bison_target(config_parser config_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/config_parser.cc) diff --git a/lib/config/config_lexer.ll b/lib/config/config_lexer.ll index 99adf95fc..4fa767f63 100644 --- a/lib/config/config_lexer.ll +++ b/lib/config/config_lexer.ll @@ -22,10 +22,13 @@ #include "config/expression.h" #include "config/typerule.h" #include "config/configcompilercontext.h" + +using namespace icinga; + #include "config/config_parser.hh" #include -using namespace icinga; +#define YYLTYPE icinga::DebugInfo #define YY_EXTRA_TYPE ConfigCompiler * #define YY_USER_ACTION \ diff --git a/lib/config/config_parser.yy b/lib/config/config_parser.yy index 584dd5ecb..f007a6e80 100644 --- a/lib/config/config_parser.yy +++ b/lib/config/config_parser.yy @@ -1,4 +1,4 @@ -%code requires { +%{ /****************************************************************************** * Icinga 2 * * Copyright (C) 2012-2013 Icinga Development Team (http://www.icinga.org/) * @@ -37,11 +37,11 @@ #include #include -using namespace icinga; - #define YYLTYPE icinga::DebugInfo -} +using namespace icinga; + +%} %pure-parser diff --git a/tools/mkclass/CMakeLists.txt b/tools/mkclass/CMakeLists.txt index 14423a74d..126a6f1bf 100644 --- a/tools/mkclass/CMakeLists.txt +++ b/tools/mkclass/CMakeLists.txt @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software Foundation # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -find_package(BISON 2.4.1 REQUIRED) +find_package(BISON 2.3.0 REQUIRED) find_package(FLEX 2.5.37 REQUIRED) bison_target(class_parser class_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/class_parser.cc) diff --git a/tools/mkclass/class_lexer.ll b/tools/mkclass/class_lexer.ll index a6e38f121..11fcbe2d2 100644 --- a/tools/mkclass/class_lexer.ll +++ b/tools/mkclass/class_lexer.ll @@ -19,10 +19,13 @@ ******************************************************************************/ #include "classcompiler.h" -#include "class_parser.hh" using namespace icinga; +#define YYLTYPE icinga::ClassDebugInfo + +#include "class_parser.hh" + #define YY_EXTRA_TYPE ClassCompiler * #define YY_USER_ACTION \ do { \ diff --git a/tools/mkclass/class_parser.yy b/tools/mkclass/class_parser.yy index fb020352f..dbdeb536f 100644 --- a/tools/mkclass/class_parser.yy +++ b/tools/mkclass/class_parser.yy @@ -1,4 +1,4 @@ -%code requires { +%{ /****************************************************************************** * Icinga 2 * * Copyright (C) 2012-2013 Icinga Development Team (http://www.icinga.org/) * @@ -26,7 +26,7 @@ using namespace icinga; #define YYLTYPE icinga::ClassDebugInfo -} +%} %pure-parser diff --git a/tools/mkclass/classcompiler.h b/tools/mkclass/classcompiler.h index acfba9718..5ee35379e 100644 --- a/tools/mkclass/classcompiler.h +++ b/tools/mkclass/classcompiler.h @@ -25,8 +25,6 @@ #include #include -struct YYLTYPE; - namespace icinga {