From 50f2d00ad827a42167f792b45e1609f596603d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Thu, 25 Apr 2013 18:07:32 +0200 Subject: [PATCH] Detect if an extended_path statement is present Unused for the time being --- preprocessor/ComputingTasks.cc | 2 ++ preprocessor/Statement.cc | 3 ++- preprocessor/Statement.hh | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc index 4ca31ed4c..e3d8db263 100644 --- a/preprocessor/ComputingTasks.cc +++ b/preprocessor/ComputingTasks.cc @@ -2421,6 +2421,8 @@ ExtendedPathStatement::ExtendedPathStatement(const OptionsList &options_list_arg void ExtendedPathStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) { + mod_file_struct.extended_path_present = true; + if (options_list.num_options.find("periods") == options_list.num_options.end()) { cerr << "ERROR: the 'periods' option of 'extended_path' is mandatory" << endl; diff --git a/preprocessor/Statement.cc b/preprocessor/Statement.cc index 48abb3a98..59021287b 100644 --- a/preprocessor/Statement.cc +++ b/preprocessor/Statement.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2012 Dynare Team + * Copyright (C) 2006-2013 Dynare Team * * This file is part of Dynare. * @@ -31,6 +31,7 @@ ModFileStructure::ModFileStructure() : ramsey_policy_present(false), discretionary_policy_present(false), planner_objective_present(false), + extended_path_present(false), order_option(0), bvar_present(false), svar_identification_present(false), diff --git a/preprocessor/Statement.hh b/preprocessor/Statement.hh index 1c5c00829..cd3fd5cf3 100644 --- a/preprocessor/Statement.hh +++ b/preprocessor/Statement.hh @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2012 Dynare Team + * Copyright (C) 2006-2013 Dynare Team * * This file is part of Dynare. * @@ -55,6 +55,8 @@ public: bool discretionary_policy_present; //! Whether a planner_objective statement is present bool planner_objective_present; + //! Whether an extended_path statement is present + bool extended_path_present; //! 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 */