Added the name of the file to the error report.
[repair.git] / Repair / RepairCompiler / MCC / SDL.cup
index f8997e99e4efa38b12a377f7723d1e0a224a8ecf..ee5172cba3e07342d01cac27efd37297c0626fbd 100755 (executable)
@@ -56,13 +56,16 @@ action code {:
 init with {: :}
 
 parser code {:
+
+       public String filename;
        
        public void syntax_error (java_cup.runtime.Symbol current) {
 
                CUP$SDLParser$actions.errors = true;
                Symbol symbol = (Symbol) current;
-               report_error("SDL: Syntax error at line " + (symbol.line + 1)
+               report_error("TDL: Syntax error at line " + (symbol.line + 1)
                + ", column " + LineCount.getColumn(symbol.left) + ": " + current.value, current);
+               System.exit(0);
        }
 
        public void report_fatal_error (String message, Object info) {