Package EDU.purdue.jtb.generate
package EDU.purdue.jtb.generate
-
ClassesClassDescriptionThe
AcceptInliner
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.ClassBaseNodesGenerator
contains methods to generate the base nodes interfaces and classes.ClassCommonCodeGenerator
contains methods to generate common pieces of code (fields and methods).TheJJFileAnnotator
visitor generates the (jtb) annotated .jj file containing the tree-building code.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.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.ClassUserFilesGenerator
contains methods to generate: CODEJAVA the (grammar) user nodes classes (genUserXxx, usingUserClassInfo
), the hook interface and empty class files (genXxxEnterExitHook).ClassVisitorsGenerator
contains methods to generate: CODEJAVA the different IXxxVisitor interfaces and DepthFirstXxxVisitor classes files, the signature files.