+ public abstract <B,C> void visit(Invokable<Forest.Body<T>,B,C> ivbc, B b, C c);
+ private static abstract class TreeMaker<T> implements Invokable<Forest.Body<T>,Boolean,Integer> {
+ public ArrayList<Tree<T>> toks = new ArrayList<Tree<T>>();
+ private boolean toss;
+ protected T head;
+ public TreeMaker(boolean toss) { this.toss = toss; }
+ public abstract void start(T head, Input.Location loc);
+ public abstract void finish(T head, Input.Location loc);
+ public abstract void child(Tree<T> t);
+ public void invoke(Forest.Body<T> bod, Boolean o, Integer i) {
+ if (i==null) {
+ ArrayList<Tree<T>> toks = this.toks;
+ this.toks = new ArrayList<Tree<T>>();
+ bod.expand(0, this);
+ this.toks = toks;
+ } else {
+ bod.expand(i, this);
+ }
+ }
+ }