convered maximal to use character lookahead
[sbp.git] / src / edu / berkeley / sbp / Walk.java
index cfd9c31..8b6eae6 100644 (file)
@@ -164,14 +164,11 @@ abstract class Walk<T> {
                 if (matched) walk(a);
             }
 
                 if (matched) walk(a);
             }
 
-            if (e instanceof Repeat.MaximalSequence || e instanceof Repeat.Maximal)
-                cs.remove(new Last<Tok>(cs.fresh(), c).walk(e));
-            /*
             if (e instanceof Sequence) {
                 Sequence s = (Sequence)e;
             if (e instanceof Sequence) {
                 Sequence s = (Sequence)e;
-                if (s.noFollow() != null) cs.remove(s.noFollow());
+                if (s.noFollow() != null) cs.remove(s.noFollow().dup());
             }
             }
-            */
+
             if (c != null && e==me) {
                 c.follow.put(e, cs.dup());
                 c.eof.put(e, eof);
             if (c != null && e==me) {
                 c.follow.put(e, cs.dup());
                 c.eof.put(e, eof);