Small changes to allow:
[repair.git] / Repair / RepairCompiler / MCC / SDL.cup
index ee5172cba3e07342d01cac27efd37297c0626fbd..454717108727fa5f02a0b5660169ea27667fd081 100755 (executable)
@@ -62,9 +62,12 @@ parser code {:
        public void syntax_error (java_cup.runtime.Symbol current) {
 
                CUP$SDLParser$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);
+               Symbol symbol = (Symbol) current;               
+
+               report_error(filename+":"+(symbol.line+1)+": Syntax error at column " 
+                + (LineCount.getColumn(symbol.left)+1) +": " + current.value, current);
+
+               System.out.println();
                System.exit(0);
        }
 
@@ -119,6 +122,7 @@ parser code {:
     terminal SUB; 
     terminal MULT; 
     terminal DIV;
+    terminal SUM;
 
     terminal NOT;
     terminal LT;
@@ -161,6 +165,7 @@ parser code {:
     terminal LABEL;
     terminal INT;
     terminal SUBTYPE;
+    terminal SUBCLASS;
     terminal OF;
 
     terminal SEMICOLON;