Package EDU.purdue.jtb.generate
package EDU.purdue.jtb.generate
-
ClassesClassDescriptionThe
AcceptInlinervisitor (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.ClassBaseNodesGeneratorcontains methods to generate the base nodes interfaces and classes.ClassCommonCodeGeneratorcontains methods to generate common pieces of code (fields and methods).TheJJFileAnnotatorvisitor generates the (jtb) annotated .jj file containing the tree-building code.ClassTreeDumperGeneratorgenerates the TreeDumper visitor which simply prints all the tokens in the tree at the locations given in their beginLine and beginColumn member variables.ClassTreeFormatterGeneratorgenerates 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.ClassUserFilesGeneratorcontains methods to generate: CODEJAVA the (grammar) user nodes classes (genUserXxx, usingUserClassInfo), the hook interface and empty class files (genXxxEnterExitHook).ClassVisitorsGeneratorcontains methods to generate: CODEJAVA the different IXxxVisitor interfaces and DepthFirstXxxVisitor classes files, the signature files.