checkpoint
[sbp.git] / src / edu / berkeley / sbp / meta / MetaGrammar.java
index 78c4b72..a55481b 100644 (file)
@@ -57,14 +57,12 @@ public class MetaGrammar {
    
     public static class Production {
         public String tag;
-        public String nonTerminal;
         public boolean[] drops;
         public Element[] elements;
         public int count = 0;
-        public Production(String tag, String nonTerminal, Element[] elements, boolean[] drops) {
+        public Production(String tag, Element[] elements, boolean[] drops) {
             this.tag = tag;
             this.elements = elements;
-            this.nonTerminal = nonTerminal;
             this.drops = drops;
             for(int i=0; i<drops.length; i++)
                 if (!drops[i])
@@ -113,12 +111,12 @@ public class MetaGrammar {
                 return buildSequence(p)!=null;
 
             if (t != null &&
-                (t.value().equals(p.nonTerminal)))
+                (t.value().equals(p.tag)))
                 return buildSequence(p)!=null;
             if (t != null &&
-                ((t.value().equals("") && getName().equals(p.nonTerminal))))
+                ((t.value().equals("") && getName().equals(p.tag))))
                 return buildSequence(p)!=null;
-            if (b != null && getName().equals(p.nonTerminal))
+            if (b != null && getName().equals(p.tag))
                 return buildSequence(p)!=null;
 
             return false;