Added the name of the file to the error report.
[repair.git] / Repair / RepairCompiler / MCC / TDL.cup
index c616b94395dd1c9df0cc43928f80ce0af3fad521..db35ad5cc0af5510ec2bceabb34eab2a5f15378c 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$TDLParser$actions.errors = true;
                Symbol symbol = (Symbol) current;
-               report_error("TDL: 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) {