From 7aa156bd270e1b300b716fde30ad25d8aa5e1a0d Mon Sep 17 00:00:00 2001 From: adam Date: Sun, 22 Jan 2006 04:21:33 -0500 Subject: [PATCH] checkpoint darcs-hash:20060122092133-5007d-703adb8f3ae1e46db68a22df6feb05f452b0954c.gz --- src/edu/berkeley/sbp/Forest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/edu/berkeley/sbp/Forest.java b/src/edu/berkeley/sbp/Forest.java index df7a3ea..933515b 100644 --- a/src/edu/berkeley/sbp/Forest.java +++ b/src/edu/berkeley/sbp/Forest.java @@ -14,7 +14,11 @@ public abstract class Forest /*extends PrintableTree>*/ implem public ArrayList> toks = new ArrayList>(); public void invoke(Forest.Body bod, Boolean toss, Integer i) { if (i==null) { - addAll(bod.expand(toss, 0, new TreeMaker())); + ArrayList> toks = this.toks; + this.toks = new ArrayList>(); + //addAll(bod.expand(toss, 0, new TreeMaker())); + bod.expand(toss, 0, this); + this.toks = toks; } else { bod.expand(toss, i, this); } @@ -54,7 +58,6 @@ public abstract class Forest /*extends PrintableTree>*/ implem public void invoke(Invokable,B,C> ivbc, B b, C c) { ivbc.invoke(this, b, c); } - public Iterator> iterator() { return new SingletonIterator>(this); } private final Input.Location location; private final T tag; -- 1.7.10.4