diff --git a/preprocessor/DynareBison.yy b/preprocessor/DynareBison.yy index d1a2092ee9f90b84ae047fdfa904a23e92dff248..b9c68306d3264af2fa1d0f0b811167da38838ac0 100644 --- a/preprocessor/DynareBison.yy +++ b/preprocessor/DynareBison.yy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2008 Dynare Team + * Copyright (C) 2003-2009 Dynare Team * * This file is part of Dynare. * @@ -21,6 +21,12 @@ %require "2.3" %defines +/* Prologue: + In Bison <= 2.3, it is inserted in both the .cc and .hh files. + In Bison >= 2.3a, it is inserted only in the .cc file. + Since Bison 2.4, the new %code directives provide a cleaner way of dealing + with the prologue. +*/ %{ using namespace std; @@ -1346,8 +1352,8 @@ o_method : METHOD EQUAL INT_NUMBER { driver.option_num("simulation_method",$3);} | METHOD EQUAL BICGSTAB { driver.option_num("simulation_method", "3"); }; o_markowitz : MARKOWITZ EQUAL number { driver.option_num("markowitz", $3); }; o_simul : SIMUL { driver.option_num("simul", "1"); }; -o_simul_seed : SIMUL_SEED EQUAL INT_NUMBER { driver.option_num("simul_seed", $3)} ; -o_qz_criterium : QZ_CRITERIUM EQUAL number { driver.option_num("qz_criterium", $3) }; +o_simul_seed : SIMUL_SEED EQUAL INT_NUMBER { driver.option_num("simul_seed", $3); } ; +o_qz_criterium : QZ_CRITERIUM EQUAL number { driver.option_num("qz_criterium", $3); }; o_datafile : DATAFILE EQUAL NAME { driver.option_str("datafile", $3); }; o_nobs : NOBS EQUAL vec_int { driver.option_num("nobs", $3); } diff --git a/preprocessor/DynareFlex.ll b/preprocessor/DynareFlex.ll index c22bc08388cff6d8c716aae8b59a4e88c1be9055..39cdf3b7afa6d4f308833a5c3a6ecf4e5624a0c3 100644 --- a/preprocessor/DynareFlex.ll +++ b/preprocessor/DynareFlex.ll @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2008 Dynare Team + * Copyright (C) 2003-2009 Dynare Team * * This file is part of Dynare. * @@ -21,7 +21,6 @@ using namespace std; #include "ParsingDriver.hh" -#include "DynareBison.hh" // Announce to Flex the prototype we want for lexing function #define YY_DECL \ diff --git a/preprocessor/include/ParsingDriver.hh b/preprocessor/include/ParsingDriver.hh index df1bfb0fadac4e73aad6a5163461177d7381ce78..88b9bf8b865304e4a9b3961fe8cc45d4f6263545 100644 --- a/preprocessor/include/ParsingDriver.hh +++ b/preprocessor/include/ParsingDriver.hh @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2008 Dynare Team + * Copyright (C) 2003-2009 Dynare Team * * This file is part of Dynare. * @@ -30,7 +30,11 @@ #include "ModFile.hh" #include "SymbolList.hh" + +class ParsingDriver; +#include "ExprNode.hh" #include "DynareBison.hh" + #include "ComputingTasks.hh" #include "Shocks.hh" #include "SigmaeInitialization.hh" diff --git a/preprocessor/macro/MacroBison.yy b/preprocessor/macro/MacroBison.yy index e44f5bfc4d779702bb7ad33d295e898f27f73219..13b985a6cf7121c582c1f72222b654bfaba22475 100644 --- a/preprocessor/macro/MacroBison.yy +++ b/preprocessor/macro/MacroBison.yy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Dynare Team + * Copyright (C) 2008-2009 Dynare Team * * This file is part of Dynare. * @@ -21,6 +21,12 @@ %require "2.3" %defines +/* Prologue: + In Bison <= 2.3, it is inserted in both the .cc and .hh files. + In Bison >= 2.3a, it is inserted only in the .cc file. + Since Bison 2.4, the new %code directives provide a cleaner way of dealing + with the prologue. +*/ %{ using namespace std; diff --git a/preprocessor/macro/MacroDriver.hh b/preprocessor/macro/MacroDriver.hh index a482e10b6bab9631a436a270d018ec127f88b0a3..4cb893ca5b6abb09057129d9dfd9c8ff00da9e35 100644 --- a/preprocessor/macro/MacroDriver.hh +++ b/preprocessor/macro/MacroDriver.hh @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Dynare Team + * Copyright (C) 2008-2009 Dynare Team * * This file is part of Dynare. * @@ -30,8 +30,8 @@ #include <map> #include <set> -#include "MacroBison.hh" #include "MacroValue.hh" +#include "MacroBison.hh" using namespace std; diff --git a/preprocessor/macro/MacroFlex.ll b/preprocessor/macro/MacroFlex.ll index 748b0d373001a5791e568157060714148058038e..1098522f9b582e132d8f459b59891930f9756ed4 100644 --- a/preprocessor/macro/MacroFlex.ll +++ b/preprocessor/macro/MacroFlex.ll @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Dynare Team + * Copyright (C) 2008-2009 Dynare Team * * This file is part of Dynare. * @@ -23,7 +23,6 @@ using namespace std; #include <fstream> #include "MacroDriver.hh" -#include "MacroBison.hh" // Announce to Flex the prototype we want for lexing function #define YY_DECL \