From 2761b4c0160340c0bcc441959a175997c1ae3c8c Mon Sep 17 00:00:00 2001 From: sebastien Date: Tue, 20 Oct 2009 16:17:27 +0000 Subject: [PATCH] preprocessor: remove unnecessary stuff ("forecast" has not the same rank than "stoch_simul/estimation/osr/ramsey_policy") git-svn-id: https://www.dynare.org/svn/dynare/trunk@3062 ac1d8469-bf42-47a9-8791-bf33cf982152 --- ComputingTasks.cc | 11 ----------- ComputingTasks.hh | 1 - ModFile.cc | 8 +++----- Statement.cc | 1 - Statement.hh | 4 +--- 5 files changed, 4 insertions(+), 21 deletions(-) diff --git a/ComputingTasks.cc b/ComputingTasks.cc index d00e9a69..b1c90edb 100644 --- a/ComputingTasks.cc +++ b/ComputingTasks.cc @@ -138,17 +138,6 @@ ForecastStatement::ForecastStatement(const SymbolList &symbol_list_arg, { } -void -ForecastStatement::checkPass(ModFileStructure &mod_file_struct) -{ - mod_file_struct.forecast_present = true; - - // Fill in option_order of mod_file_struct - OptionsList::num_options_type::const_iterator it = options_list.num_options.find("order"); - if (it != options_list.num_options.end()) - mod_file_struct.order_option = max(mod_file_struct.order_option,atoi(it->second.c_str())); -} - void ForecastStatement::writeOutput(ostream &output, const string &basename) const { diff --git a/ComputingTasks.hh b/ComputingTasks.hh index 194be9b8..1ba0f707 100644 --- a/ComputingTasks.hh +++ b/ComputingTasks.hh @@ -88,7 +88,6 @@ private: public: ForecastStatement(const SymbolList &symbol_list_arg, const OptionsList &options_list_arg); - virtual void checkPass(ModFileStructure &mod_file_struct); virtual void writeOutput(ostream &output, const string &basename) const; }; diff --git a/ModFile.cc b/ModFile.cc index 4bf811cd..fb92b523 100644 --- a/ModFile.cc +++ b/ModFile.cc @@ -98,7 +98,6 @@ ModFile::checkPass() bool stochastic_statement_present = mod_file_struct.stoch_simul_present || mod_file_struct.estimation_present - || mod_file_struct.forecast_present || mod_file_struct.osr_present || mod_file_struct.ramsey_policy_present; @@ -114,7 +113,7 @@ ModFile::checkPass() if (mod_file_struct.simul_present && stochastic_statement_present) { - cerr << "ERROR: A .mod file cannot contain both a simul command and one of {stoch_simul, estimation, forecast, osr, ramsey_policy}" << endl; + cerr << "ERROR: A .mod file cannot contain both a simul command and one of {stoch_simul, estimation, osr, ramsey_policy}" << endl; exit(EXIT_FAILURE); } @@ -137,7 +136,6 @@ ModFile::transformPass() // In stochastic models, create auxiliary vars for leads and lags greater than 2 if (mod_file_struct.stoch_simul_present || mod_file_struct.estimation_present - || mod_file_struct.forecast_present || mod_file_struct.osr_present || mod_file_struct.ramsey_policy_present) { @@ -172,7 +170,7 @@ ModFile::computingPass(bool no_tmp_terms) { // Mod file may have no equation (for example in a standalone BVAR estimation) bool dynamic_model_needed = mod_file_struct.simul_present || mod_file_struct.check_present || mod_file_struct.stoch_simul_present - || mod_file_struct.estimation_present|| mod_file_struct.forecast_present || mod_file_struct.osr_present + || mod_file_struct.estimation_present|| mod_file_struct.osr_present || mod_file_struct.ramsey_policy_present || mod_file_struct.identification_present; if (dynamic_model.equation_number() > 0) { @@ -219,7 +217,7 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all) const { ofstream mOutputFile; bool dynamic_model_needed = mod_file_struct.simul_present || mod_file_struct.check_present || mod_file_struct.stoch_simul_present - || mod_file_struct.estimation_present|| mod_file_struct.forecast_present || mod_file_struct.osr_present + || mod_file_struct.estimation_present|| mod_file_struct.osr_present || mod_file_struct.ramsey_policy_present || mod_file_struct.identification_present; if (basename.size()) diff --git a/Statement.cc b/Statement.cc index 35df9360..4fcf431e 100644 --- a/Statement.cc +++ b/Statement.cc @@ -24,7 +24,6 @@ ModFileStructure::ModFileStructure() : simul_present(false), stoch_simul_present(false), estimation_present(false), - forecast_present(false), osr_present(false), ramsey_policy_present(false), order_option(0), diff --git a/Statement.hh b/Statement.hh index b5f2d521..a89ed779 100644 --- a/Statement.hh +++ b/Statement.hh @@ -40,13 +40,11 @@ public: bool stoch_simul_present; //! Whether an estimation statement is present bool estimation_present; - //! Whether a forecast statement is present - bool forecast_present; //! Whether an osr statement is present bool osr_present; //! Whether a ramsey_policy statement is present bool ramsey_policy_present; - //! The value of the "order" option of stoch_simul, estimation, forecast, osr, ramsey_policy + //! The value of the "order" option of stoch_simul, estimation, osr, ramsey_policy //! Derivation order /*! First initialized to zero. If user sets order option somewhere in the MOD file, it will be equal to the maximum of order options. Otherwise will default to 2 */ int order_option;