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