EDU.purdue.jtb.misc.toolkit
Class TreeFormatterBuilder

java.lang.Object
  extended by EDU.purdue.jtb.misc.toolkit.TreeFormatterBuilder

public class TreeFormatterBuilder
extends java.lang.Object

Class TreeFormatterBuilder generates the TreeFormatter visitor which is a skeleton pretty-printer. Using some pre-defined methods, a user can quickly and easily create a formatter for their grammar. The formatter will then take a tree, insert token location information into the NodeTokens of the tree. TreeDumper can then be used to output the result. Note that unlike the other automatically generated file, since this one must be edited to be useful, JTB will not overwrite this file automatically. JTB will take this precaution for the other files only if the "-ow" command-line parameter is used.


Field Summary
static java.lang.String outFilename
           
static java.lang.String visitorName
           
 
Constructor Summary
TreeFormatterBuilder(java.util.Vector classes)
           
 
Method Summary
 void generateTreeFormatter()
          Generates the tree formatter template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

visitorName

public static final java.lang.String visitorName
See Also:
Constant Field Values

outFilename

public static final java.lang.String outFilename
See Also:
Constant Field Values
Constructor Detail

TreeFormatterBuilder

public TreeFormatterBuilder(java.util.Vector classes)
Method Detail

generateTreeFormatter

public void generateTreeFormatter()
                           throws FileExistsException
Generates the tree formatter template. Since the user is expected to edit and customize this file, this method will never overwrite the file if it exists, regardless of the Globals.noOverwrite flag.

Throws:
FileExistsException