]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.13
authorfred <fred>
Sun, 1 Dec 1996 21:46:55 +0000 (21:46 +0000)
committerfred <fred>
Sun, 1 Dec 1996 21:46:55 +0000 (21:46 +0000)
hdr/lexer.hh
src/warn.cc

index e2537da4104ca899c5f90d385665c067680a39f7..f1cddd1e27f1024b974e2279973c16dca137672a 100644 (file)
@@ -7,7 +7,7 @@ void new_input(String s);
 bool close_input();
 int yylex();
 void yyerror(const char *s);
-
+bool busy_parsing();
 int lookup_keyword(String s);
 
 Identifier* lookup_identifier(String s);
index 6d35d8cad6377d06a9ecf2b3c4ed61dc5e30c6a2..230e4bb976a11fe9b79228e460b86487912df35e 100644 (file)
@@ -1,6 +1,8 @@
 #include "debug.hh"
- ostream &warnout (cerr);
- ostream *mlog(&cerr);
+#include "lexer.hh"
+
+ostream &warnout (cerr);
+ostream *mlog(&cerr);
 
 
 
@@ -14,7 +16,19 @@ warning(String s)
 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);
 }