Package EDU.purdue.jtb.generate
-
Class Summary Class Description AcceptInliner TheAcceptInliner
visitor (an extension ofvisitor
) is called byVisitorsGenerator
(which callsAcceptInliner.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.BaseNodesGenerator ClassBaseNodesGenerator
contains methods to generate the base nodes interfaces and classes.CommonCodeGenerator ClassCommonCodeGenerator
contains methods to generate common pieces of code (fields and methods).JJFileAnnotator TheJJFileAnnotator
visitor generates the (jtb) annotated .jj file containing the tree-building code.TreeDumperGenerator 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.TreeFormatterGenerator ClassTreeFormatterGenerator
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.UserFilesGenerator ClassUserFilesGenerator
contains methods to generate: CODEJAVA the (grammar) user nodes classes (genUserXxx, usingUserClassInfo
), the hook interface and empty class files (genXxxEnterExitHook).VisitorsGenerator ClassVisitorsGenerator
contains methods to generate: CODEJAVA the different IXxxVisitor interfaces and DepthFirstXxxVisitor classes files, the signature files.