v4 parser: 'check' is also a computing task
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1123 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
f3c3e6d71d
commit
d035175627
|
@ -36,6 +36,12 @@ CheckStatement::writeOutput(ostream &output) const
|
|||
output << "check;\n";
|
||||
}
|
||||
|
||||
void
|
||||
CheckStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||
{
|
||||
mod_file_struct.check_present = true;
|
||||
}
|
||||
|
||||
SimulStatement::SimulStatement(const OptionsList &options_list_arg) :
|
||||
options_list(options_list_arg)
|
||||
{
|
||||
|
|
|
@ -29,12 +29,12 @@ ModFile::checkPass()
|
|||
it != statements.end(); it++)
|
||||
(*it)->checkPass(mod_file_struct);
|
||||
|
||||
if (!mod_file_struct.simul_present
|
||||
&& !mod_file_struct.stoch_simul_or_similar_present)
|
||||
{
|
||||
cerr << "Error: nothing to compute! you must use one of {simul, stoch_simul, estimation, olr, osr}" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
// if (!mod_file_struct.simul_present
|
||||
// && !mod_file_struct.stoch_simul_or_similar_present)
|
||||
// {
|
||||
// cerr << "Error: nothing to compute! you must use one of {simul, stoch_simul, estimation, olr, osr}" << endl;
|
||||
// exit(-1);
|
||||
// }
|
||||
|
||||
if (mod_file_struct.simul_present
|
||||
&& mod_file_struct.stoch_simul_or_similar_present)
|
||||
|
|
|
@ -154,7 +154,7 @@ ParsingDriver::add_model_variable(string *name, string *olag)
|
|||
ExpObj *
|
||||
ParsingDriver::add_expression_variable(string *name)
|
||||
{
|
||||
check_symbol_existence(*name);
|
||||
// check_symbol_existence(*name);
|
||||
int id = mod_file->symbol_table.getID(*name);
|
||||
Type type = mod_file->symbol_table.getType(*name);
|
||||
delete name;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "Statement.hh"
|
||||
|
||||
ModFileStructure::ModFileStructure() :
|
||||
check_present(false),
|
||||
simul_present(false),
|
||||
stoch_simul_or_similar_present(false)
|
||||
{
|
||||
|
|
|
@ -22,6 +22,7 @@ private:
|
|||
const OptionsList options_list;
|
||||
public:
|
||||
CheckStatement(const OptionsList &options_list_arg);
|
||||
virtual void checkPass(ModFileStructure &mod_file_struct);
|
||||
virtual void writeOutput(ostream &output) const;
|
||||
};
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ class ModFileStructure
|
|||
{
|
||||
public:
|
||||
ModFileStructure();
|
||||
//! Wheter check is present
|
||||
bool check_present;
|
||||
//! Whether a simul statement is present
|
||||
bool simul_present;
|
||||
//! Whether a stoch_simul, estimation, olr, osr statement is present
|
||||
|
|
Loading…
Reference in New Issue