Fixed errors
authorbdemsky <bdemsky>
Wed, 29 Mar 2006 00:34:52 +0000 (00:34 +0000)
committerbdemsky <bdemsky>
Wed, 29 Mar 2006 00:34:52 +0000 (00:34 +0000)
Robust/src/IR/Flat/BuildCode.java
Robust/src/IR/Flat/FlatMethod.java
Robust/src/Parse/java14.cup
Robust/src/t.test

index 6c44f7bef074334bd5109b3bdb2da1e280f4984b..c778b1d69af3443467c8d06bb40b48e63dba27a0 100644 (file)
@@ -225,7 +225,7 @@ public class BuildCode {
                    //1) Edge >1 of node
                    nodetolabel.put(nn,new Integer(labelindex++));
                }
-               if (!visited.contains(nn)) {
+               if (!visited.contains(nn)&&!tovisit.contains(nn)) {
                    tovisit.add(nn);
                } else {
                    //2) Join point
index 4f8916da3b226bdedb9f79db8c4105595e5cfbaf..70d115126a7bb96261f6c2a599a62b8b0cc6ac73 100644 (file)
@@ -75,7 +75,7 @@ public class FlatMethod extends FlatNode {
                    //1) Edge >1 of node
                    nodetolabel.put(nn,new Integer(labelindex++));
                }
-               if (!visited.contains(nn)) {
+               if (!visited.contains(nn)&&!tovisit.contains(nn)) {
                    tovisit.add(nn);
                } else {
                    //2) Join point
index 60abe1e942d93094bda42ccaa0f544dec5d2a91c..7bb3ffefaf2ebc71f1f33d1d61398cb7dc78eeda 100644 (file)
@@ -784,7 +784,7 @@ statement_without_trailing_substatement ::=
 //     |       assert_statement
        ;
 empty_statement ::=
-               SEMICOLON {: RESULT=(new ParseNode("statement")).addChild("nop").getRoot(); :}
+               SEMICOLON {: RESULT=new ParseNode("nop"); :}
        ;
 //labeled_statement ::=
 //             IDENTIFIER COLON statement
index a5ba1dd688e05dba03cd611e0550ff15897a35f7..c8244f4959ca3cb0398b0c6bd714b8ec92cca37e 100644 (file)
@@ -137,9 +137,8 @@ public class ParseNode extends Object {
     }
 
     public String doIndent(int indent) {
-
        String output = null;
-        for(int i=0;i<indent;i++) output += " ";
+        for(int i=0;i<indent;i++) ;
        return output;
     }