diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc index f97251802d4c02e6620de3a839b249c8adb008eb..f7107855bd7dcc9eeea2dac2d44510bda8d52585 100644 --- a/src/ComputingTasks.cc +++ b/src/ComputingTasks.cc @@ -1216,24 +1216,6 @@ UnitRootVarsStatement::writeJsonOutput(ostream &output) const << R"("steady_state.nocheck": 1})"; } -PeriodsStatement::PeriodsStatement(int periods_arg) : periods{periods_arg} -{ -} - -void -PeriodsStatement::writeOutput(ostream &output, [[maybe_unused]] const string &basename, - [[maybe_unused]] bool minimal_workspace) const -{ - output << "options_.periods = " << periods << ";" << endl; -} - -void -PeriodsStatement::writeJsonOutput(ostream &output) const -{ - output << R"({"statementName": "periods", )" - << R"("periods": )" << periods << "}"; -} - DsampleStatement::DsampleStatement(int val1_arg) : val1{val1_arg}, val2{-1} { } diff --git a/src/ComputingTasks.hh b/src/ComputingTasks.hh index 23d6600e548dcf169a46be0dca90aba9a59cbb9c..1c8f65fa838ce61d2c7bdc9f43ecfceb4d78b764 100644 --- a/src/ComputingTasks.hh +++ b/src/ComputingTasks.hh @@ -1,5 +1,5 @@ /* - * Copyright © 2003-2022 Dynare Team + * Copyright © 2003-2023 Dynare Team * * This file is part of Dynare. * @@ -285,16 +285,6 @@ public: void writeJsonOutput(ostream &output) const override; }; -class PeriodsStatement : public Statement -{ -private: - const int periods; -public: - explicit PeriodsStatement(int periods_arg); - void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override; - void writeJsonOutput(ostream &output) const override; -}; - class DsampleStatement : public Statement { private: diff --git a/src/DynareBison.yy b/src/DynareBison.yy index dc8d066b0a955be80c0b3ca985448e4ff33cdddd..29913ab7c861ffb2889b95889876f690fc4927ce 100644 --- a/src/DynareBison.yy +++ b/src/DynareBison.yy @@ -1,6 +1,6 @@ // -*- C++ -*- /* - * Copyright © 2003-2022 Dynare Team + * Copyright © 2003-2023 Dynare Team * * This file is part of Dynare. * @@ -236,7 +236,6 @@ statement : parameters | predetermined_variables | model_local_variable | change_type - | periods | model | initval | initval_file @@ -611,12 +610,6 @@ change_type_arg : PARAMETERS { $$ = SymbolType::exogenousDet; } ; -periods : PERIODS INT_NUMBER ';' - { driver.periods($2); } - | PERIODS EQUAL INT_NUMBER ';' - { driver.periods($3); } - ; - init_param : symbol EQUAL expression ';' { driver.init_param($1, $3); }; expression : '(' expression ')' diff --git a/src/DynareFlex.ll b/src/DynareFlex.ll index f8aeb5b00303800550ff2703ef5a889817590f4b..ed3825268d75fc0bc7cf6cb644df246aa1c0e688 100644 --- a/src/DynareFlex.ll +++ b/src/DynareFlex.ll @@ -1,6 +1,6 @@ /* -*- C++ -*- */ /* - * Copyright © 2003-2022 Dynare Team + * Copyright © 2003-2023 Dynare Team * * This file is part of Dynare. * @@ -112,7 +112,6 @@ DATE -?[0-9]+([ya]|m([1-9]|1[0-2])|q[1-4]) <INITIAL>predetermined_variables {BEGIN DYNARE_STATEMENT; return token::PREDETERMINED_VARIABLES;} <INITIAL>parameters {BEGIN DYNARE_STATEMENT; return token::PARAMETERS;} <INITIAL>model_local_variable {BEGIN DYNARE_STATEMENT; return token::MODEL_LOCAL_VARIABLE;} -<INITIAL>periods {BEGIN DYNARE_STATEMENT; return token::PERIODS;} <INITIAL>model_info {BEGIN DYNARE_STATEMENT; return token::MODEL_INFO;} <INITIAL>estimation {BEGIN DYNARE_STATEMENT; return token::ESTIMATION;} <INITIAL>set_time {BEGIN DYNARE_STATEMENT; return token::SET_TIME;} diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc index b82fe92e8f7ed8aa4159407aab92b21e467460dc..2d00e83cb0163cd1b70e11c2c69ed4bf325e1b94 100644 --- a/src/ParsingDriver.cc +++ b/src/ParsingDriver.cc @@ -1,5 +1,5 @@ /* - * Copyright © 2003-2022 Dynare Team + * Copyright © 2003-2023 Dynare Team * * This file is part of Dynare. * @@ -501,15 +501,6 @@ ParsingDriver::end_nonstationary_var(bool log_deflator, expr_t deflator, const v reset_data_tree(); } -void -ParsingDriver::periods(const string &periods) -{ - warning("periods: this command is now deprecated and may be removed in a future version of Dynare. Please use the ''periods'' option of the ''simul'' command instead."); - - int periods_val = stoi(periods); - mod_file->addStatement(make_unique<PeriodsStatement>(periods_val)); -} - void ParsingDriver::dsample(const string &arg1) { diff --git a/src/ParsingDriver.hh b/src/ParsingDriver.hh index 53b2f4b3424c9eb5392e34fd5d22f2df6afd9b58..896c15f137361ae5e194af4cc9076de541474325 100644 --- a/src/ParsingDriver.hh +++ b/src/ParsingDriver.hh @@ -1,5 +1,5 @@ /* - * Copyright © 2003-2022 Dynare Team + * Copyright © 2003-2023 Dynare Team * * This file is part of Dynare. * @@ -408,8 +408,6 @@ public: expr_t declare_or_change_type(SymbolType new_type, const string &name); //! Adds an Expression's variable expr_t add_expression_variable(const string &name); - //! Adds a "periods" statement - void periods(const string &periods); //! Adds a "dsample" statement void dsample(const string &arg1); //! Adds a "dsample" statement