# HG changeset patch # User Edouard Tisserant # Date 1392845110 -3600 # Node ID a7d9e0b8636bd9c10f12b82b2583b1963513a175 # Parent fa4569bf1538f2d2cab816953fb6cc4438daae71 Fix build on Ubuntu 13.10 diff -r fa4569bf1538 -r a7d9e0b8636b stage1_2/Makefile.am --- a/stage1_2/Makefile.am Fri Oct 11 12:38:36 2013 +0200 +++ b/stage1_2/Makefile.am Wed Feb 19 22:25:10 2014 +0100 @@ -5,12 +5,12 @@ # Make sure this header file is generated first (by bison), as it is included # by other C++ code that will also be compiled. -BUILT_SOURCES = iec_bison.h +BUILT_SOURCES = iec_bison.hh CLEANFILES = \ iec_flex.cc \ iec_bison.cc \ - iec_bison.h + iec_bison.hh lib_LIBRARIES = libstage1_2.a libstage1_2_a_SOURCES = \ @@ -19,5 +19,5 @@ create_enumtype_conversion_functions.cc \ stage1_2.cc -libstage1_2_a_CPPFLAGS = -DDEFAULT_LIBDIR='"lib"' -I../../absyntax -DYY_BUF_SIZE=65536 +libstage1_2_a_CPPFLAGS = -DDEFAULT_LIBDIR='"lib"' -I../../absyntax -DYY_BUF_SIZE=65536 -fpermissive diff -r fa4569bf1538 -r a7d9e0b8636b stage1_2/iec_bison.yy --- a/stage1_2/iec_bison.yy Fri Oct 11 12:38:36 2013 +0200 +++ b/stage1_2/iec_bison.yy Wed Feb 19 22:25:10 2014 +0100 @@ -96,7 +96,7 @@ #include "../absyntax/absyntax.hh" /* file with declaration of token constants. Generated by bison! */ -#include "iec_bison.h" +#include "iec_bison.hh" /* The interface through which bison and flex interact. */ #include "stage1_2_priv.hh" @@ -169,10 +169,10 @@ /* global variables... */ /*************************/ /* NOTE: For some strange reason bison ver 2.3 is including these declarations - * in the iec_bison.h file, which is in turn included by flex. + * in the iec_bison.hh file, which is in turn included by flex. * We cannot therefore define any variables over here, but merely declare * their existance (otherwise we get errors when linking the code, since we - * would get a new variable defined each time iec_bison.h is included!). + * would get a new variable defined each time iec_bison.hh is included!). * Even though the variables are declared 'extern' over here, they will in * fact be defined towards the end of this same file (i.e. in the prologue) */ @@ -250,14 +250,14 @@ /* The following definitions need to be inside a '%code requires' * so that they are also included in the header files. If this were not the case, * YYLTYPE would be delcared as something in the iec.cc file, and another thing - * (actually the default value of YYLTYPE) in the iec_bison.h heder file. + * (actually the default value of YYLTYPE) in the iec_bison.hh heder file. */ %code requires { /* define a new data type to store the locations, so we can also store * the filename in which the token is expressed. */ -/* NOTE: since this code will be placed in the iec_bison.h header file, - * as well as the iec.cc file that also includes the iec_bison.h header file, +/* NOTE: since this code will be placed in the iec_bison.hh header file, + * as well as the iec.cc file that also includes the iec_bison.hh header file, * declaring the typedef struct yyltype__local here would result in a * compilation error when compiling iec.cc, as this struct would be * declared twice. diff -r fa4569bf1538 -r a7d9e0b8636b stage1_2/iec_flex.ll --- a/stage1_2/iec_flex.ll Fri Oct 11 12:38:36 2013 +0200 +++ b/stage1_2/iec_flex.ll Wed Feb 19 22:25:10 2014 +0100 @@ -124,17 +124,17 @@ /* Required only for the declaration of abstract syntax classes * (class symbol_c; class token_c; class list_c;) * These will not be used in flex, but the token type union defined - * in iec_bison.h contains pointers to these classes, so we must include + * in iec_bison.hh contains pointers to these classes, so we must include * it here. */ #include "../absyntax/absyntax.hh" -/* iec_bison.h is generated by bison. +/* iec_bison.hh is generated by bison. * Contains the definition of the token constants, and the * token value type YYSTYPE (in our case, a 'const char *') */ -#include "iec_bison.h" +#include "iec_bison.hh" #include "stage1_2_priv.hh" diff -r fa4569bf1538 -r a7d9e0b8636b stage1_2/stage1_2.cc --- a/stage1_2/stage1_2.cc Fri Oct 11 12:38:36 2013 +0200 +++ b/stage1_2/stage1_2.cc Wed Feb 19 22:25:10 2014 +0100 @@ -44,7 +44,7 @@ #include "stage1_2.hh" -#include "iec_bison.h" +#include "iec_bison.hh" #include "stage1_2_priv.hh" #include "create_enumtype_conversion_functions.hh" @@ -122,14 +122,14 @@ /* NOTE: only accessed indirectly by the lexical parser (flex) * through the function get_identifier_token() */ -/* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec_bison.h. +/* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec_bison.hh. * We need this constant defined before we can declare the symbol tables. - * However, we cannot #include "iec_bison.h" in this file (stage1_2_priv.hh) directly + * However, we cannot #include "iec_bison.hh" in this file (stage1_2_priv.hh) directly * because of the way bison ver. 3.2 is copying all declarations in the prologue - * of iec.y to the iec_bison.h file (including an #include stage1_2_priv.hh). - * So, if we were to include "iec_bison.h" here, we would get a circular include. + * of iec.y to the iec_bison.hh file (including an #include stage1_2_priv.hh). + * So, if we were to include "iec_bison.hh" here, we would get a circular include. * All this means that whoever includes this file (stage1_2_priv.hh) will need - * to take care to first inlcude iec_bison.h !! + * to take care to first inlcude iec_bison.hh !! */ /* A symbol table to store all the library elements */ /* e.g.: diff -r fa4569bf1538 -r a7d9e0b8636b stage1_2/stage1_2_priv.hh --- a/stage1_2/stage1_2_priv.hh Fri Oct 11 12:38:36 2013 +0200 +++ b/stage1_2/stage1_2_priv.hh Wed Feb 19 22:25:10 2014 +0100 @@ -40,10 +40,10 @@ /* !!! WARNING !!! * * Whoever includes this file (stage1_2_priv.hh) will need - * to first inlcude iec_bison.h !! + * to first inlcude iec_bison.hh !! * * Read other comments further down to understand why we don't - * include iec_bison.h in this file. + * include iec_bison.hh in this file. */ @@ -184,14 +184,14 @@ * * In essence, they are a data passing mechanism between Bison and Flex. */ -/* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec_bison.h. +/* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec_bison.hh. * We need this constant defined before we can declare the symbol tables. - * However, we cannot #include "iec_bison.h" in this file (stage1_2_priv.hh) directly + * However, we cannot #include "iec_bison.hh" in this file (stage1_2_priv.hh) directly * because of the way bison ver. 2.3 is copying all declarations in the prologue - * of iec.y to the iec_bison.h file (including an #include stage1_2_priv.hh). - * So, if we were to include "iec_bison.h" here, we would get a circular include. + * of iec.y to the iec_bison.hh file (including an #include stage1_2_priv.hh). + * So, if we were to include "iec_bison.hh" here, we would get a circular include. * All this means that whoever includes this file (stage1_2_priv.hh) will need - * to take care to first inlcude iec_bison.h !! + * to take care to first inlcude iec_bison.hh !! */ /* A symbol table to store all the library elements */ /* e.g.: