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)); eval_context_type::const_iterator it = eval_context.find(make_pair(symb_id, type));
if (it == eval_context.end()) if (it == eval_context.end())
{ {
if (eval_context.size()>0) 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;
cout << "Error: the variable or parameter (" << datatree.symbol_table.getNameByID( type, symb_id) << ") has not been initialized (in derivatives evaluation)\n";
cout.flush();
}
throw EvalException(); throw EvalException();
} }
return it->second; return it->second;

View File

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

View File

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

View File

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