checkpoint
[sbp.git] / src / edu / berkeley / sbp / misc / MetaGrammar.java
index b1a3e8c..24d3a46 100644 (file)
@@ -271,12 +271,10 @@ public class MetaGrammar extends StringWalker {
                     if (!drops[i])
                         if (idx==-1) idx = i;
                         else throw new Error("multiple non-dropped elements in sequence: " + Sequence.drop(expansion,false));
-                if (idx != -1) ret = Sequence.singleton(expansion, idx, and, not);
-                else           {
-                    ret = Sequence.drop(expansion, false);
-                    for(Sequence s : and) ret = ret.and(s);
-                    for(Sequence s : not) ret = ret.not(s);
-                }
+                if (idx != -1) ret = Sequence.singleton(expansion, idx);
+                else           ret = Sequence.drop(expansion, false);
+                for(Sequence s : and) ret = ret.and(s);
+                for(Sequence s : not) ret = ret.not(s);
             }
             set.add(ret);
             if (this.noFollow != null) ret.noFollow = new Atom.Invert(new Atom.Infer(this.noFollow));