preprocessor: instead of declaring unknown symbols as exogenous in the histval and shocks blocks, ignore the declaration (as done in initval and endval).
parent
710819348b
commit
8754e5df26
|
@ -596,7 +596,11 @@ ParsingDriver::hist_val(string *name, string *lag, expr_t rhs)
|
||||||
{
|
{
|
||||||
if (nostrict)
|
if (nostrict)
|
||||||
if (!mod_file->symbol_table.exists(*name))
|
if (!mod_file->symbol_table.exists(*name))
|
||||||
declare_exogenous(new string(*name));
|
{
|
||||||
|
warning("discarding '" + *name + "' as it was not recognized in the histavl block");
|
||||||
|
delete name;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
check_symbol_existence(*name);
|
check_symbol_existence(*name);
|
||||||
int symb_id = mod_file->symbol_table.getID(*name);
|
int symb_id = mod_file->symbol_table.getID(*name);
|
||||||
|
@ -838,7 +842,11 @@ ParsingDriver::add_stderr_shock(string *var, expr_t value)
|
||||||
{
|
{
|
||||||
if (nostrict)
|
if (nostrict)
|
||||||
if (!mod_file->symbol_table.exists(*var))
|
if (!mod_file->symbol_table.exists(*var))
|
||||||
declare_exogenous(new string(*var));
|
{
|
||||||
|
warning("discarding shocks block declaration of the standard error of '" + *var + "' as it was not declared");
|
||||||
|
delete var;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
check_symbol_existence(*var);
|
check_symbol_existence(*var);
|
||||||
int symb_id = mod_file->symbol_table.getID(*var);
|
int symb_id = mod_file->symbol_table.getID(*var);
|
||||||
|
@ -857,7 +865,11 @@ ParsingDriver::add_var_shock(string *var, expr_t value)
|
||||||
{
|
{
|
||||||
if (nostrict)
|
if (nostrict)
|
||||||
if (!mod_file->symbol_table.exists(*var))
|
if (!mod_file->symbol_table.exists(*var))
|
||||||
declare_exogenous(new string(*var));
|
{
|
||||||
|
warning("discarding shocks block declaration of the variance of '" + *var + "' as it was not declared");
|
||||||
|
delete var;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
check_symbol_existence(*var);
|
check_symbol_existence(*var);
|
||||||
int symb_id = mod_file->symbol_table.getID(*var);
|
int symb_id = mod_file->symbol_table.getID(*var);
|
||||||
|
@ -875,11 +887,12 @@ void
|
||||||
ParsingDriver::add_covar_shock(string *var1, string *var2, expr_t value)
|
ParsingDriver::add_covar_shock(string *var1, string *var2, expr_t value)
|
||||||
{
|
{
|
||||||
if (nostrict)
|
if (nostrict)
|
||||||
|
if (!mod_file->symbol_table.exists(*var1) || !mod_file->symbol_table.exists(*var2))
|
||||||
{
|
{
|
||||||
if (!mod_file->symbol_table.exists(*var1))
|
warning("discarding shocks block declaration of the covariance of '" + *var1 + "' and '" + *var2 + "' as at least one was not declared");
|
||||||
declare_exogenous(new string(*var1));
|
delete var1;
|
||||||
if (!mod_file->symbol_table.exists(*var2))
|
delete var2;
|
||||||
declare_exogenous(new string(*var2));
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
check_symbol_existence(*var1);
|
check_symbol_existence(*var1);
|
||||||
|
@ -906,11 +919,12 @@ void
|
||||||
ParsingDriver::add_correl_shock(string *var1, string *var2, expr_t value)
|
ParsingDriver::add_correl_shock(string *var1, string *var2, expr_t value)
|
||||||
{
|
{
|
||||||
if (nostrict)
|
if (nostrict)
|
||||||
|
if (!mod_file->symbol_table.exists(*var1) || !mod_file->symbol_table.exists(*var2))
|
||||||
{
|
{
|
||||||
if (!mod_file->symbol_table.exists(*var1))
|
warning("discarding shocks block declaration of the correlation of '" + *var1 + "' and '" + *var2 + "' as at least one was not declared");
|
||||||
declare_exogenous(new string(*var1));
|
delete var1;
|
||||||
if (!mod_file->symbol_table.exists(*var2))
|
delete var2;
|
||||||
declare_exogenous(new string(*var2));
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
check_symbol_existence(*var1);
|
check_symbol_existence(*var1);
|
||||||
|
|
Loading…
Reference in New Issue