X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FWalk.java;h=c6bb514e31f4a14bdb072de5e12cf5aa4af83153;hb=d28917b3c84c429e8fd6587717df9e90a894b18f;hp=496edd6488ec8492b3092fbea92fe9faec39bf0d;hpb=24112db237318c030b4d4f457d90c34fd69d652b;p=sbp.git diff --git a/src/edu/berkeley/sbp/Walk.java b/src/edu/berkeley/sbp/Walk.java index 496edd6..c6bb514 100644 --- a/src/edu/berkeley/sbp/Walk.java +++ b/src/edu/berkeley/sbp/Walk.java @@ -39,6 +39,7 @@ abstract class Walk { T ret = bottom(e); for(Sequence s : (Union)e) { ret = union((Union)e, ret, walk(s)); + // FIXME for(Sequence ss : s.needs()) ret = union((Union)e, ret, walk(ss)); for(Sequence ss : s.hates()) ret = union((Union)e, ret, walk(ss)); @@ -87,7 +88,7 @@ abstract class Walk { public WalkTokenSet(Topology cs) { this.cs = cs; } public WalkTokenSet(Topology cs, Cache c) { super(c); this.cs = cs; } public Topology bottom(Element e) { return cs; } - public Topology walkAtom(Atom r) { cs = cs.union(r); return cs; } + public Topology walkAtom(Atom r) { cs = cs.union(r.getTokenTopology()); return cs; } } static class First extends WalkTokenSet { @@ -154,7 +155,7 @@ abstract class Walk { if (e instanceof Sequence) { Sequence s = (Sequence)e; - if (s.follow() != null) cs = cs.intersect(s.follow()); + if (s.follow() != null) cs = cs.intersect(s.follow().getTokenTopology()); } if (c != null && e==me) {