Package EDU.purdue.jtb.generate
Class TreeDumperGenerator
- java.lang.Object
-
- EDU.purdue.jtb.generate.TreeDumperGenerator
-
public class TreeDumperGenerator extends java.lang.Object
ClassTreeDumperGenerator
generates the TreeDumper visitor which simply prints all the tokens in the tree at the locations given in their beginLine and beginColumn member variables.
Similar to UserFilesGenerator class. CODEJAVAThis visitor is supposed to be run once and not supposed to be run in parallel threads (on the same grammar).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
outFilename
The visitor source file name
-
Constructor Summary
Constructors Constructor Description TreeDumperGenerator(JTBOptions aJopt, Messages aMess)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generateTreeDumper()
Generates the tree dumper visitor source in its file.int
saveToFile()
Saves the current buffer in the output file (global variable).
-
-
-
Field Detail
-
outFilename
public static final java.lang.String outFilename
The visitor source file name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TreeDumperGenerator
public TreeDumperGenerator(JTBOptions aJopt, Messages aMess)
Constructor. Will create the visitors directory if it does not exist.- Parameters:
aJopt
- - the JTB optionsaMess
- - the messages handler
-
-
Method Detail
-
saveToFile
public int saveToFile() throws java.io.IOException
Saves the current buffer in the output file (global variable).- Returns:
- OK_RC or FILE_EXISTS_RC
- Throws:
java.io.IOException
- if IO problem
-
generateTreeDumper
public void generateTreeDumper()
Generates the tree dumper visitor source in its file.
-
-