make ANSI.clreol()
[sbp.git] / src / edu / berkeley / sbp / util / TreeBuilder.java
1 // Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
2
3 package edu.berkeley.sbp.util;
4 import edu.berkeley.sbp.*;
5 import java.util.*;
6
7 public abstract class TreeBuilder<T> /*implements Invokable<Forest.Body<T>,Boolean,Integer>*/ {
8     /*
9     public ArrayList<Tree<T>> toks = new ArrayList<Tree<T>>();
10     public boolean toss;
11     protected T head;
12     public TreeBuilder(boolean toss) { this.toss = toss; }
13     public abstract void start(T head, Input.Region loc);
14     public abstract void finish(T head, Input.Region loc);
15     public abstract void addTree(Tree<T> t);
16     public void invoke(Forest.Body<T> bod, Boolean o, Integer i) {
17         if (i==null) {
18             ArrayList<Tree<T>> toks = this.toks;
19             this.toks = new ArrayList<Tree<T>>();
20             bod.expand(0, this);
21             this.toks = toks;
22         } else {
23             bod.expand(i, this);
24         }
25     }
26     */
27 }