Class TreeDumperGenerator

java.lang.Object
EDU.purdue.jtb.generate.TreeDumperGenerator

public class TreeDumperGenerator extends Object
Class TreeDumperGenerator 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. CODEJAVA

This visitor is supposed to be run once and not supposed to be run in parallel threads (on the same grammar).

  • Field Details

  • Constructor Details

    • TreeDumperGenerator

      public TreeDumperGenerator(JTBOptions aJopt, Messages aMess)
      Constructor. Will create the visitors directory if it does not exist.
      Parameters:
      aJopt - - the JTB options
      aMess - - the messages handler
  • Method Details

    • saveToFile

      public int saveToFile() throws IOException
      Saves the current buffer in the output file (global variable).
      Returns:
      OK_RC or FILE_EXISTS_RC
      Throws:
      IOException - if IO problem
    • generateTreeDumper

      public void generateTreeDumper()
      Generates the tree dumper visitor source in its file.