v4 parser: cosmetic changes

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1302 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
sebastien 2007-06-06 10:17:27 +00:00
parent 6eec6211fe
commit 95a3c08799
4 changed files with 29 additions and 29 deletions

View File

@ -340,11 +340,9 @@ VariableNode::eval(const eval_context_type &eval_context) const throw (EvalExcep
eval_context_type::const_iterator it = eval_context.find(make_pair(symb_id, type));
if (it == eval_context.end())
{
if (eval_context.size()>0)
{
cout << "Error: the variable or parameter (" << datatree.symbol_table.getNameByID( type, symb_id) << ") has not been initialized (in derivatives evaluation)\n";
cout.flush();
}
if (eval_context.size() > 0)
cerr << "Error: the variable or parameter (" << datatree.symbol_table.getNameByID(type, symb_id) << ") has not been initialized (in derivatives evaluation)" << endl;
throw EvalException();
}
return it->second;

View File

@ -4,42 +4,42 @@
namespace interfaces
{
std::string comment()
string comment()
{
return "% ";
}
std::string delete_file(std::string s)
string delete_file(string s)
{
return "delete " + s;
}
std::string file_exist(std::string s)
string file_exist(string s)
{
return "exist('" + s + "')";
}
std::string compile(std::string s)
string compile(string s)
{
return "mex -O " + s + "\n";
}
std::string function_close()
string function_close()
{
return "";
}
std::string function_file_extension()
string function_file_extension()
{
return ".m";
}
std::string strvcat(std::string s1, std::string s2)
string strvcat(string s1, string s2)
{
return "strvcat(" + s1 + "," + s2 + ")";
}
std::string load_model_function_files(std::string filename)
string load_model_function_files(string filename)
{
return "";
}

View File

@ -4,42 +4,42 @@
namespace interfaces
{
std::string comment()
string comment()
{
return "// ";
}
std::string delete_file(std::string s)
string delete_file(string s)
{
return "mdelete " + s;
}
std::string file_exist(std::string s)
string file_exist(string s)
{
return "file_exist(" + s + ")";
}
std::string compile(std::string s)
string compile(string s)
{
return "";
}
std::string function_close()
string function_close()
{
return "endfunction\n";
}
std::string function_file_extension()
string function_file_extension()
{
return ".sci";
}
std::string strvcat(std::string s1, std::string s2)
string strvcat(string s1, string s2)
{
return "[" + s1 + ";" + s2 + "]";
}
std::string load_model_function_files(std::string filename)
string load_model_function_files(string filename)
{
return "getf('" + filename + "_static.sci');\ngetf('" + filename + "_dynamic.sci');\n";
}

View File

@ -1,15 +1,17 @@
#ifndef _INTERFACE_HH
#define _INTERFACE_HH
using namespace std;
namespace interfaces
{
std::string comment();
std::string delete_file(std::string s);
std::string file_exist(std::string s);
std::string compile(std::string s);
std::string function_close();
std::string function_file_extension();
std::string strvcat(std::string s1, std::string s2);
std::string load_model_function_files(std::string filename);
string comment();
string delete_file(string s);
string file_exist(string s);
string compile(string s);
string function_close();
string function_file_extension();
string strvcat(string s1, string s2);
string load_model_function_files(string filename);
}
#endif