com.go.tea.compiler
Class TreePrinter

java.lang.Object
  |
  +--com.go.tea.compiler.CodeGenerator
        |
        +--com.go.tea.compiler.TreePrinter

public class TreePrinter
extends CodeGenerator

A class that prints a parse tree. To print, call the writeTo method.

Version:
35 , 5/31/01
Author:
Brian S O'Neill

Constructor Summary
TreePrinter(Template tree)
           
TreePrinter(Template tree, boolean extraParens)
           
TreePrinter(Template tree, java.lang.String indentStr)
           
TreePrinter(Template tree, java.lang.String indentStr, boolean extraParens)
           
 
Method Summary
static java.lang.String toString(Node node)
          Converts any node to a String.
static java.lang.String toString(Node node, java.lang.String indentStr)
          Converts any node to a String.
 void writeTo(java.io.OutputStream out)
           
 
Methods inherited from class com.go.tea.compiler.CodeGenerator
getParseTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreePrinter

public TreePrinter(Template tree)

TreePrinter

public TreePrinter(Template tree,
                   java.lang.String indentStr)

TreePrinter

public TreePrinter(Template tree,
                   boolean extraParens)

TreePrinter

public TreePrinter(Template tree,
                   java.lang.String indentStr,
                   boolean extraParens)
Method Detail

writeTo

public void writeTo(java.io.OutputStream out)
             throws java.io.IOException
Overrides:
writeTo in class CodeGenerator

toString

public static java.lang.String toString(Node node)
Converts any node to a String.

toString

public static java.lang.String toString(Node node,
                                        java.lang.String indentStr)
Converts any node to a String.