Drop the “periods” statement
parent
93b9ed6957
commit
a7b0a324c9
|
@ -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}
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 ')'
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue