Commits (8)
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Dynare-preprocessor
Upstream-Contact: Dynare Team, whose members in 2019 are:
Stéphane Adjemian <stephane.adjemian@univ-lemans.fr>
Houtan Bastani <houtan@dynare.org>
Michel Juillard <michel.juillard@mjui.fr>
Frédéric Karamé <frederic.karame@univ-lemans.fr>
Junior Maih <junior.maih@gmail.com>
Ferhat Mihoubi <fmihoubi@univ-evry.fr>
Johannes Pfeifer <jpfeifer@gmx.de>
Marco Ratto <marco.ratto@ec.europa.eu>
Sébastien Villemot <sebastien@dynare.org>
Upstream-Contact: Dynare Team, whose members in 2020 are:
- Stéphane Adjemian <stephane.adjemian@univ-lemans.fr>
- Houtan Bastani <houtan@dynare.org>
- Michel Juillard <michel.juillard@mjui.fr>
- Frédéric Karamé <frederic.karame@univ-lemans.fr>
- Dóra Kocsis <dora@dynare.org>
- Junior Maih <junior.maih@gmail.com>
- Ferhat Mihoubi <fmihoubi@univ-evry.fr>
- Willi Mutschler <willi@mutschler.eu>
- Johannes Pfeifer <jpfeifer@gmx.de>
- Marco Ratto <marco.ratto@ec.europa.eu>
- Sébastien Villemot <sebastien@dynare.org>
Former Dynare Team members include:
- Abdeljabar Benzougar
- Alejandro Buesa
- Fabrice Collard
- Assia Ezzeroug
- Stéphane Lhuissier
- George Perendia
Source: https://www.dynare.org
Files: *
Copyright: 1996-2019 Dynare Team
Copyright: 1996-2020 Dynare Team
License: GPL-3+
Files: m4/ax_boost_base.m4
......
/*
* Copyright © 2003-2019 Dynare Team
* Copyright © 2003-2020 Dynare Team
*
* This file is part of Dynare.
*
......@@ -646,8 +646,7 @@ StochSimulStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsoli
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -700,8 +699,7 @@ ForecastStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolida
{
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -991,8 +989,7 @@ RamseyPolicyStatement::checkPass(ModFileStructure &mod_file_struct, WarningConso
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -1096,8 +1093,7 @@ DiscretionaryPolicyStatement::checkPass(ModFileStructure &mod_file_struct, Warni
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -1218,8 +1214,7 @@ EstimationStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsoli
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -1328,9 +1323,7 @@ RplotStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidatio
{
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous,
SymbolType::exogenous};
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous, SymbolType::exogenous});
}
catch (SymbolList::SymbolListException &e)
{
......@@ -1910,8 +1903,7 @@ OsrParamsStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolid
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::parameter };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::parameter });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -2026,8 +2018,7 @@ OsrStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -2153,9 +2144,7 @@ DynaSaveStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolida
{
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous,
SymbolType::exogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous, SymbolType::exogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -2197,9 +2186,7 @@ DynaTypeStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolida
{
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous,
SymbolType::exogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous, SymbolType::exogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -2598,8 +2585,7 @@ MSSBVARIrfStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsoli
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -2876,8 +2862,7 @@ ShockDecompositionStatement::checkPass(ModFileStructure &mod_file_struct, Warnin
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -2927,8 +2912,7 @@ RealtimeShockDecompositionStatement::checkPass(ModFileStructure &mod_file_struct
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -2974,9 +2958,7 @@ PlotShockDecompositionStatement::checkPass(ModFileStructure &mod_file_struct, Wa
{
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous,
SymbolType::epilogue };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous, SymbolType::epilogue });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -3027,8 +3009,7 @@ InitialConditionDecompositionStatement::checkPass(ModFileStructure &mod_file_str
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -3074,8 +3055,7 @@ SqueezeShockDecompositionStatement::checkPass(ModFileStructure &mod_file_struct,
{
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -3154,8 +3134,7 @@ PlotConditionalForecastStatement::checkPass(ModFileStructure &mod_file_struct,
{
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -4729,8 +4708,7 @@ CalibSmootherStatement::checkPass(ModFileStructure &mod_file_struct, WarningCons
mod_file_struct.calib_smoother_present = true;
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -4862,8 +4840,7 @@ GMMEstimationStatement::checkPass(ModFileStructure &mod_file_struct, WarningCons
{
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......@@ -4910,8 +4887,7 @@ SMMEstimationStatement::checkPass(ModFileStructure &mod_file_struct, WarningCons
{
try
{
const vector<SymbolType> valid_symbol_list_types { SymbolType::endogenous };
symbol_list.checkPass(warnings, valid_symbol_list_types);
symbol_list.checkPass(warnings, { SymbolType::endogenous });
}
catch (SymbolList::SymbolListException &e)
{
......
......@@ -2992,6 +2992,8 @@ calib_smoother_option : o_filtered_vars
| o_diffuse_filter
| o_smoothed_state_uncertainty
| o_parameter_set
| o_xls_sheet
| o_xls_range
;
generate_irfs : GENERATE_IRFS ';' END ';'
......
/*
* Copyright © 2007-2019 Dynare Team
* Copyright © 2007-2020 Dynare Team
*
* This file is part of Dynare.
*
......@@ -976,7 +976,7 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
{
if (output_type == ExprNodeOutputType::latexDynamicSteadyStateOperator)
output << R"(\bar)";
output << "{" << datatree.symbol_table.getTeXName(symb_id);
output << "{" << datatree.symbol_table.getTeXName(symb_id) << "}";
if (output_type == ExprNodeOutputType::latexDynamicModel
&& (type == SymbolType::endogenous || type == SymbolType::exogenous || type == SymbolType::exogenousDet || type == SymbolType::modelLocalVariable || type == SymbolType::trend || type == SymbolType::logTrend))
{
......@@ -989,7 +989,6 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
}
output << "}";
}
output << "}";
return;
}
......
/*
* Copyright © 2003-2019 Dynare Team
* Copyright © 2003-2020 Dynare Team
*
* This file is part of Dynare.
*
......@@ -33,6 +33,8 @@
# include <mach-o/dyld.h>
#endif
#include <regex>
using namespace MFS;
void
......@@ -1852,6 +1854,20 @@ ModelTree::writeLatexModelFile(const string &mod_basename, const string &latex_b
content_output << "% Equation " << eq + 1 << endl;
if (write_equation_tags)
{
auto escape_special_latex_symbols
= [](string str)
{
const regex special_latex_chars (R"([&%$#_{}])");
const regex backslash (R"(\\)");
const regex tilde (R"(~)");
const regex carrot (R"(\^)");
const regex textbackslash (R"(\\textbackslash)");
str = regex_replace(str, backslash, R"(\textbackslash)");
str = regex_replace(str, special_latex_chars, R"(\$&)");
str = regex_replace(str, carrot, R"(\^{})");
str = regex_replace(str, tilde, R"(\textasciitilde{})");
return regex_replace(str, textbackslash, R"(\textbackslash{})");
};
bool wrote_eq_tag = false;
for (const auto & [tagged_eq, tag_pair] : equation_tags)
if (tagged_eq == eq)
......@@ -1861,16 +1877,16 @@ ModelTree::writeLatexModelFile(const string &mod_basename, const string &latex_b
else
content_output << ", ";
content_output << tag_pair.first;
content_output << escape_special_latex_symbols(tag_pair.first);
if (!(tag_pair.second.empty()))
content_output << "= `" << tag_pair.second << "'";
content_output << "= `" << escape_special_latex_symbols(tag_pair.second) << "'";
wrote_eq_tag = true;
}
if (wrote_eq_tag)
content_output << "]";
content_output << "]" << endl;
}
content_output << R"(\begin{dmath})" << endl;
......