From 54365b16edd6482c15569365a96a6efc3c68bae8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Mon, 22 Feb 2021 15:53:09 +0100
Subject: [PATCH] =?UTF-8?q?Remove=20unfinished=20=E2=80=9Coccbin=E2=80=9D?=
 =?UTF-8?q?=20option=20to=20perfect=5Fforesight=5Fsolver=20and=20extended?=
 =?UTF-8?q?=5Fpath?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Partially reverts f914837aff2a3051b397adf2a3df02ddec8258a9 and
567156aad40b9bf07abc9346ef5ff365765ab881.
---
 src/ComputingTasks.cc | 7 -------
 src/DynareBison.yy    | 5 +----
 src/DynareFlex.ll     | 1 -
 src/ModFile.cc        | 1 -
 src/Statement.hh      | 4 +---
 5 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc
index f0f010d5..00f31006 100644
--- a/src/ComputingTasks.cc
+++ b/src/ComputingTasks.cc
@@ -211,9 +211,6 @@ void
 PerfectForesightSolverStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings)
 {
   mod_file_struct.perfect_foresight_solver_present = true;
-  // Fill in option_occbin of mod_file_struct
-  if (options_list.num_options.find("occbin") != options_list.num_options.end())
-    mod_file_struct.occbin_option = true;
 }
 
 void
@@ -4638,10 +4635,6 @@ ExtendedPathStatement::checkPass(ModFileStructure &mod_file_struct, WarningConso
       cerr << "ERROR: the 'periods' option of 'extended_path' is mandatory" << endl;
       exit(EXIT_FAILURE);
     }
-
-  // Fill in option_occbin of mod_file_struct
-  if (options_list.num_options.find("occbin") != options_list.string_options.end())
-    mod_file_struct.occbin_option = true;
 }
 
 void
diff --git a/src/DynareBison.yy b/src/DynareBison.yy
index 646313ae..1a9c213e 100644
--- a/src/DynareBison.yy
+++ b/src/DynareBison.yy
@@ -122,7 +122,7 @@ class ParsingDriver;
 %token UNIFORM_PDF UNIT_ROOT_VARS USE_DLL USEAUTOCORR GSA_SAMPLE_FILE USE_UNIVARIATE_FILTERS_IF_SINGULARITY_IS_DETECTED
 %token VALUES VAR VAREXO VAREXO_DET VARIABLE VAROBS VAREXOBS PREDETERMINED_VARIABLES VAR_EXPECTATION VAR_EXPECTATION_MODEL PLOT_SHOCK_DECOMPOSITION MODEL_LOCAL_VARIABLE
 %token WRITE_LATEX_DYNAMIC_MODEL WRITE_LATEX_STATIC_MODEL WRITE_LATEX_ORIGINAL_MODEL WRITE_LATEX_STEADY_STATE_MODEL
-%token XLS_SHEET XLS_RANGE LMMCP OCCBIN BANDPASS_FILTER COLORMAP VAR_MODEL PAC_MODEL QOQ YOY AOA PAC_EXPECTATION TREND_COMPONENT_MODEL
+%token XLS_SHEET XLS_RANGE LMMCP BANDPASS_FILTER COLORMAP VAR_MODEL PAC_MODEL QOQ YOY AOA PAC_EXPECTATION TREND_COMPONENT_MODEL
 %left EQUAL_EQUAL EXCLAMATION_EQUAL
 %left LESS GREATER LESS_EQUAL GREATER_EQUAL
 %left PLUS MINUS
@@ -1261,7 +1261,6 @@ perfect_foresight_solver_options : o_stack_solve_algo
                                  | o_solve_algo
                                  | o_robust_lin_solve
                                  | o_lmmcp
-                                 | o_occbin
                                  | o_pf_tolf
                                  | o_pf_tolx
                                  | o_noprint
@@ -2975,7 +2974,6 @@ extended_path_option : o_periods
                      | o_extended_path_order
                      | o_hybrid
 		     | o_lmmcp
-		     | o_occbin
                      ;
 
 model_diagnostics : MODEL_DIAGNOSTICS ';'
@@ -3698,7 +3696,6 @@ o_period : PERIOD EQUAL INT_NUMBER { driver.option_num("period", $3); };
 o_outfile : OUTFILE EQUAL filename { driver.option_str("outfile", $3); };
 o_outvars : OUTVARS EQUAL '(' symbol_list ')' { driver.option_symbol_list("outvars"); };
 o_lmmcp : LMMCP {driver.option_num("lmmcp.status", "true"); };
-o_occbin : OCCBIN {driver.option_num("occbin", "true"); };
 o_function : FUNCTION EQUAL filename { driver.option_str("function", $3); };
 o_sampling_draws : SAMPLING_DRAWS EQUAL INT_NUMBER { driver.option_num("sampling_draws",$3); };
 o_use_shock_groups : USE_SHOCK_GROUPS { driver.option_str("plot_shock_decomp.use_shock_groups","default"); }
diff --git a/src/DynareFlex.ll b/src/DynareFlex.ll
index 24f959be..dda43195 100644
--- a/src/DynareFlex.ll
+++ b/src/DynareFlex.ll
@@ -666,7 +666,6 @@ DATE -?[0-9]+([ya]|m([1-9]|1[0-2])|q[1-4])
 <DYNARE_STATEMENT>posterior_sampler_options {return token::POSTERIOR_SAMPLER_OPTIONS;}
 <DYNARE_STATEMENT>silent_optimizer {return token::SILENT_OPTIMIZER;}
 <DYNARE_STATEMENT>lmmcp {return token::LMMCP;}
-<DYNARE_STATEMENT>occbin {return token::OCCBIN;}
 <DYNARE_STATEMENT>additional_optimizer_steps	{return token::ADDITIONAL_OPTIMIZER_STEPS;}
 <DYNARE_STATEMENT>bartlett_kernel_lag {return token::BARTLETT_KERNEL_LAG; }
 <DYNARE_STATEMENT>optimal {
diff --git a/src/ModFile.cc b/src/ModFile.cc
index 65e8f69c..40a7b25f 100644
--- a/src/ModFile.cc
+++ b/src/ModFile.cc
@@ -655,7 +655,6 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, bool
   */
   if (!(mod_file_struct.ramsey_model_present || mod_file_struct.discretionary_policy_present)
       && !(mod_file_struct.bvar_present && dynamic_model.equation_number() == 0)
-      && !(mod_file_struct.occbin_option)
       && (dynamic_model.equation_number() != symbol_table.endo_nbr()))
     {
       cerr << "ERROR: There are " << dynamic_model.equation_number() << " equations but " << symbol_table.endo_nbr() << " endogenous variables!" << endl;
diff --git a/src/Statement.hh b/src/Statement.hh
index 4c143dad..fd8b80ae 100644
--- a/src/Statement.hh
+++ b/src/Statement.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2006-2020 Dynare Team
+ * Copyright © 2006-2021 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -127,8 +127,6 @@ public:
   bool corr_options_statement_present{false};
   //! Whether a Markov Switching DSGE is present
   bool ms_dsge_present{false};
-  //! Whether occbin is present
-  bool occbin_option{false};
   //! Stores the original number of equations in the model_block
   int orig_eq_nbr{0};
   //! Stores the number of equations added to the Ramsey model
-- 
GitLab