X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FSequence.java;h=adf93fa64d35b8c645d7e3c72928f8585fdf2e03;hp=610af5879d4daa47b54bbf360def27de2d7ee97d;hb=c366dacc334fe2e35835164f5a37d3eebb2ca6d5;hpb=526da96dd06e152d194ec92c9ef9df6085a1251b diff --git a/src/edu/berkeley/sbp/Sequence.java b/src/edu/berkeley/sbp/Sequence.java index 610af58..adf93fa 100644 --- a/src/edu/berkeley/sbp/Sequence.java +++ b/src/edu/berkeley/sbp/Sequence.java @@ -170,7 +170,7 @@ public abstract class Sequence extends Element implements Iterable { private final Object result; public Constant(Element[] e, Object result, HashSet and, HashSet not) { super(e, and, not); this.result = result; } public Forest postReduce(Token.Location loc, Forest[] args) { - return (Forest)Forest.leaf(loc, result, this); + return (Forest)Forest.leaf(loc, result); } static class Drop extends Constant { public Drop(Element[] e, HashSet and, HashSet not, boolean lame) { @@ -185,7 +185,7 @@ public abstract class Sequence extends Element implements Iterable { private final int idx; public Singleton(Element e, HashSet and, HashSet not) { this(new Element[] { e }, 0, and, not); } public Singleton(Element[] e, int idx, HashSet and, HashSet not) { super(e, and, not); this.idx = idx; } - public Forest postReduce(Token.Location loc, Forest[] args) { return (Forest)Forest.singleton(loc, args[idx], this); } + public Forest postReduce(Token.Location loc, Forest[] args) { return (Forest)Forest.singleton(loc, args[idx]); } } public static class Unwrap extends Sequence { @@ -194,13 +194,13 @@ public abstract class Sequence extends Element implements Iterable { public Unwrap(Element[] e, boolean[] drops, HashSet and, HashSet not) { super(e, and, not); this.drops = drops; } public Forest postReduce(Token.Location loc, Forest[] args) { for(int i=0; i[] args2 = new Forest[count]; int j = 0; for(int i=0; i { int j = 0; for(int i=0; i