Package EDU.purdue.jtb.generate


package EDU.purdue.jtb.generate
  • Classes
    Class
    Description
    The AcceptInliner visitor (an extension of visitor) is called by VisitorsGenerator (which calls AcceptInliner.genAcceptMethods(StringBuilder, Spacing, UserClassInfo, VisitorInfo) to "inline" the accept methods on the user classes nodes.
    This facilitates the user customization work by preparing all the lines of code the user wants to keep or to modify.
    Class BaseNodesGenerator contains methods to generate the base nodes interfaces and classes.
    Class CommonCodeGenerator contains methods to generate common pieces of code (fields and methods).
    The JJFileAnnotator visitor generates the (jtb) annotated .jj file containing the tree-building code.
    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.
    Class TreeFormatterGenerator generates the TreeFormatter visitor which is a skeleton pretty-printer.
    Using some pre-defined methods, users can quickly and easily create a formatter for their grammar.
    The formatter will then take a tree, insert token location information into the Tokens 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 "-w" command-line parameter is used.
    Class UserFilesGenerator contains methods to generate: CODEJAVA the (grammar) user nodes classes (genUserXxx, using UserClassInfo), the hook interface and empty class files (genXxxEnterExitHook).
    Class VisitorsGenerator contains methods to generate: CODEJAVA the different IXxxVisitor interfaces and DepthFirstXxxVisitor classes files, the signature files.