]> granicus.if.org Git - icinga2/commitdiff
Improve compatibility with ancient versions of Bison.
authorGunnar Beutner <gunnar@beutner.name>
Sun, 3 Nov 2013 11:40:39 +0000 (12:40 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Sun, 3 Nov 2013 12:45:26 +0000 (13:45 +0100)
Refs #4962

lib/config/CMakeLists.txt
lib/config/config_lexer.ll
lib/config/config_parser.yy
tools/mkclass/CMakeLists.txt
tools/mkclass/class_lexer.ll
tools/mkclass/class_parser.yy
tools/mkclass/classcompiler.h

index e40f35e05bd01c13931f6f929b9fa3e41f0a156c..c878275bb0cf4e132b974e1a175c305f6c16b0a1 100644 (file)
@@ -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)
index 99adf95fc9af7c2d8074b0ab2d20bf93faa6a27c..4fa767f63b1bde2605f5e9d3f0d850e8a198adcf 100644 (file)
 #include "config/expression.h"
 #include "config/typerule.h"
 #include "config/configcompilercontext.h"
+
+using namespace icinga;
+
 #include "config/config_parser.hh"
 #include <sstream>
 
-using namespace icinga;
+#define YYLTYPE icinga::DebugInfo
 
 #define YY_EXTRA_TYPE ConfigCompiler *
 #define YY_USER_ACTION                                         \
index 584dd5ecb75da9382589732cc8a3288090990f22..f007a6e808ae3f3f52966a4237b4db324f79c315 100644 (file)
@@ -1,4 +1,4 @@
-%code requires {
+%{
 /******************************************************************************
  * Icinga 2                                                                   *
  * Copyright (C) 2012-2013 Icinga Development Team (http://www.icinga.org/)   *
 #include <boost/exception/diagnostic_information.hpp>
 #include <boost/foreach.hpp>
 
-using namespace icinga;
-
 #define YYLTYPE icinga::DebugInfo
 
-}
+using namespace icinga;
+
+%}
 
 %pure-parser
 
index 14423a74dfc92b3f0dee54fd38bc11cd8300c08d..126a6f1bfc12f788bf4d25e71fee153ffe23cb7d 100644 (file)
@@ -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)
index a6e38f12112350ea958229caa9daa72a5f1ad654..11fcbe2d2a6f505bb8e381320c806315ed97f40c 100644 (file)
  ******************************************************************************/
 
 #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 {                                                                                   \
index fb020352f920e258f5b2d37876294354a17026f4..dbdeb536fd2cb8d697ee691d6dab95199f13a6f6 100644 (file)
@@ -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
 
index acfba9718f95176d0131752f090c6c591a4c9195..5ee35379ecf9311a1a56d34d7f3694f003d6106f 100644 (file)
@@ -25,8 +25,6 @@
 #include <vector>
 #include <algorithm>
 
-struct YYLTYPE;
-
 namespace icinga
 {