test
authorbdemsky <bdemsky>
Tue, 9 May 2006 10:18:32 +0000 (10:18 +0000)
committerbdemsky <bdemsky>
Tue, 9 May 2006 10:18:32 +0000 (10:18 +0000)
Robust/src/IR/Tree/BuildIR.java
Robust/src/IR/Tree/FlagEffects.java
Robust/src/test [new file with mode: 0644]

index b4fe2a6554d7e93ab5133e32ac265dfe3c6c1e90..89868c2cf28a626c5997ef541b226084670b44cd 100644 (file)
@@ -47,7 +47,28 @@ public class BuildIR {
     }
 
     public FlagEffects parseFlagEffects(ParseNode pn) {
-       return null;
+        ParseNodeVector pnv=pn.getChildren();
+        FlagEffects fes=new FlagEffects();
+        for(int i=0;i<pnv.size();i++) {
+            ParseNode fn=pnv.elementAt(i);
+            Vector vfe=parseFlagEffect(fn);
+            for (int j=0;j<vfe.size();j++) {
+                FlagEffect fe=(FlagEffect)vfe.get(j);
+                fes.addEffect(fe);
+            }
+        }
+        return fes;
+    }
+
+    public Vector parseFlagEffect(ParseNode pn) {
+       
+       if (pn.isNode("flag_effect")) {
+           Vector v=new Vector();
+           String flagname=pn.getChild("name").getTerminal();
+           
+           
+           return v;
+       } else throw new Error();
     }
 
     public FlagExpressionNode parseFlagExpression(ParseNode pn) {
index bdc5ed02f7650875a0f454c106a48e373da8e591..d92246111f02cb8bf40f342c97f365c6c6895798 100644 (file)
@@ -8,8 +8,8 @@ public class FlagEffects {
     String name;
 
     public FlagEffects(String name) {
-       this.name=name;
        effects=new Vector();
+       this.name=name;
     }
 
     public void addEffect(FlagEffect fe) {
diff --git a/Robust/src/test b/Robust/src/test
new file mode 100644 (file)
index 0000000..9daeafb
--- /dev/null
@@ -0,0 +1 @@
+test