questionable commit that eradicates the lame thing
[sbp.git] / src / edu / berkeley / sbp / Sequence.java
index 28f6564..44b30c5 100644 (file)
@@ -18,7 +18,6 @@ public abstract class Sequence extends Element implements Iterable<Element> {
         for(Sequence s : needs) { ret.needs.add(s); s.needed.add(ret); }
         for(Sequence s : hates) { ret.hates.add(s); s.hated.add(ret); }
         ret.follow = follow;
-        ret.lame = lame;
         return ret;
     }
 
@@ -26,7 +25,7 @@ public abstract class Sequence extends Element implements Iterable<Element> {
     public static final Sequence empty = new Sequence.Constant.Empty();
 
     /** after matching the sequence, do not add anything to the output tree */
-    public static Sequence drop(Element[] e, boolean lame) { return new Constant.Drop(e, lame); }
+    public static Sequence drop(Element[] e) { return new Constant.Drop(e); }
 
     /** after matching the sequence, insert a constant into the output tree */
     public static Sequence constant(Element[] e, Object o) { return new Constant(e, o); }
@@ -65,7 +64,6 @@ public abstract class Sequence extends Element implements Iterable<Element> {
     final HashSet<Sequence> hated  = new HashSet<Sequence>();
     final HashSet<Sequence> needs  = new HashSet<Sequence>();
     final HashSet<Sequence> hates  = new HashSet<Sequence>();
-    public boolean           lame  = false;
 
     final Position          firstp;
     Position firstp() { return firstp; }
@@ -184,15 +182,12 @@ public abstract class Sequence extends Element implements Iterable<Element> {
             return (Forest<T>)Forest.create(loc, result, null, false);
         }
         static class Drop extends Constant {
-            Sequence _clone() { return new Drop(elements, lame); }
-            public Drop(Element[] e, boolean lame) {
-                super(e, null);
-                this.lame = lame;
-            }
+            Sequence _clone() { return new Drop(elements); }
+            public Drop(Element[] e) { super(e, null); }
         }
         static class Empty extends Sequence.Constant.Drop {
             Sequence _clone() { return new Empty(); }
-            public Empty() { super(new Element[] { }, false); } }
+            public Empty() { super(new Element[] { }); } }
     }
 
     static class Singleton extends Sequence {