Small changes to allow:
[repair.git] / Repair / RepairCompiler / MCC / MDL.cup
index c7b00d00a93d4b00ed9974f6b85fffef505c6713..0ba43a71ad934cfe86fac970311e46cbc02a20f9 100755 (executable)
@@ -139,6 +139,7 @@ parser code {:
     terminal SUB; 
     terminal MULT; 
     terminal DIV;
+    terminal SUM;
 
     terminal NOT;
     terminal LT;
@@ -181,6 +182,7 @@ parser code {:
     terminal LABEL;
     terminal INT;
     terminal SUBTYPE;
+    terminal SUBCLASS;
     terminal OF;
 
     terminal SEMICOLON;
@@ -653,6 +655,12 @@ literal ::=
        debugMessage(PRODSTRING);
        RESULT = (new ParseNode("literal", parser.curLine(1))).addChild("decimal").addChild(dec).getRoot();
        :}
+
+       | SUB DECIMAL:dec
+       {:
+       debugMessage(PRODSTRING);
+       RESULT = (new ParseNode("literal", parser.curLine(1))).addChild("decimal").addChild("-"+dec).getRoot();
+       :}
         
        | STRING:str
        {: