Small changes to allow:
[repair.git] / Repair / RepairCompiler / MCC / TDL.cup
index ee4ba5988cbd1e63976490ff6ee408c027b786c4..6436236423a89f9b77e46b6021cc4c1314fcdbc4 100755 (executable)
@@ -120,6 +120,7 @@ parser code {:
     terminal SUB; 
     terminal MULT; 
     terminal DIV;
+    terminal SUM;
 
     terminal NOT;
     terminal LT;
@@ -246,6 +247,17 @@ structure ::=
        structure.addChild(lf);
        RESULT = structure;
        :}
+       |
+       STRUCTURE ID:typename optsubtype:subtype OPENBRACE CLOSEBRACE
+       {:
+       debugMessage(PRODSTRING);
+       ParseNode structure = new ParseNode("structure", parser.curLine(6));
+       structure.addChild("name", parser.curLine(5)).addChild(typename);
+       if (subtype != null) {
+        structure.addChild(subtype);
+       }
+       RESULT = structure;
+       :}
 
        | ID:type MULT ID:name SEMICOLON
        {: