bool close_input();
int yylex();
void yyerror(const char *s);
-
+bool busy_parsing();
int lookup_keyword(String s);
Identifier* lookup_identifier(String s);
#include "debug.hh"
- ostream &warnout (cerr);
- ostream *mlog(&cerr);
+#include "lexer.hh"
+
+ostream &warnout (cerr);
+ostream *mlog(&cerr);
void
error(String s)
{
- cerr << "\nerror: " << s << "\n";
+ if (busy_parsing())
+ yyerror(s);
+ else
+ cerr << "\nerror: " << s << "\n";
+
+ exit(1);
+}
+
+void
+error_t(String s, Real r)
+{
+ String e=s+ "(t = " + r + ")";
+ error(e);
exit(1);
}