checkpoint
[sbp.git] / src / edu / berkeley / sbp / meta / Production.java
diff --git a/src/edu/berkeley/sbp/meta/Production.java b/src/edu/berkeley/sbp/meta/Production.java
new file mode 100644 (file)
index 0000000..0abb996
--- /dev/null
@@ -0,0 +1,28 @@
+package edu.berkeley.sbp.meta;
+import edu.berkeley.sbp.util.*;
+import edu.berkeley.sbp.*;
+import edu.berkeley.sbp.chr.*;
+import edu.berkeley.sbp.misc.*;
+import edu.berkeley.sbp.bind.*;
+import java.util.*;
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.io.*;
+
+public  class Production {
+    public String tag;
+    public boolean[] drops;
+    public Element[] elements;
+    public String nonTerminal;
+    public int count = 0;
+    public Production(String tag, Element[] elements, boolean[] drops) { this(tag, tag, elements, drops); }
+    public Production(String tag, String nonTerminal, Element[] elements, boolean[] drops) {
+        this.tag = tag;
+        this.elements = elements;
+        this.drops = drops;
+        this.nonTerminal = nonTerminal;
+        for(int i=0; i<drops.length; i++)
+            if (!drops[i])
+                count++;
+    }
+}