.TH JTB 1 "Jun 2010" .SH NAME jtb \- syntax tree builder for JavaCC .SH SYNOPSIS .B jtb .RI [ options ] " inputfile" .SH DESCRIPTION This manual page documents briefly the \fBjtb\fR command. .PP JTB (Java Tree Builder) is a syntax tree builder and visitors generator to be used in front of JavaCC (Java Compiler Compiler). It takes a JavaCC grammar file as input (usually a ".jtb" file) and automatically generates the following: .RS .PP \- a set of syntax tree classes based on the productions in the grammar, utilizing the Visitor design pattern; .PP \- four interfaces: IVoidVisitor, IVoidArguVisitor, IRetVisitor, IRetArguVisitor; .PP \- four depth-first visitors: DepthFirstVoidVisitor, DepthFirstVoidArguVisitor, DepthFirstRetVisitor, DepthFirstREtArguVisitor, whose default methods simply visit the children of the current node; a JavaCC grammar ".jj" file (jtb.out.jj by default), with the proper annotations to build the syntax tree during parsing (which then must be compiled with JavaCC). .RE .PP New visitors, which subclass any generated one, can then override the default methods and perform various operations on and manipulate the generated syntax tree. .SH OPTIONS .TP \fB\-cl\fR Print a list of the classes generated to standard out. .TP \fB\-d \fIdir\fR "\fB\-d \fIdir\fR" is short for (and overwrites) "\fB\-nd \fIdir\fR/syntaxtree \fB\-vd \fIdir\fR/visitor". .TP \fB\-dl\fR Generate depth level info. .TP \fB\-e\fR Suppress JTB semantic error checking. .TP \fB\-f\fR Use descriptive node class field names. .TP \fB\-h\fR Display this help message and quit. .TP \fB\-ia\fR Inline visitors accept methods on base classes. .TP \fB\-jd\fR Generate JavaDoc\-friendly comments in the nodes and visitor. .TP \fB\-nd \fINAME\fR Use \fINAME\fR as the package for the syntax tree nodes. .TP \fB\-np \fINAME\fR Use \fINAME\fR as the package for the syntax tree nodes. .TP \fB\-ns \fINAME\fR Use \fINAME\fR as the class which all node classes will extend. .TP \fB\-o \fINAME\fR Use \fINAME\fR as the filename for the annotated output grammar. .TP \fB\-p \fINAME\fR "\fB\-p \fIpkg\fR" is short for (and overwrites) "\fB\-np \fIpkg\fR.syntaxtree \fB\-vp \fIpkg\fR.visitor". .TP \fB\-pp\fR Generate parent pointers in all node classes. .TP \fB\-printer\fR Generate a syntax tree dumping visitor. .TP \fB\-si\fR Read from standard input rather than a file. .TP \fB\-scheme\fR Generate Scheme records representing the grammar and a Scheme tree building visitor. .TP \fB\-tk\fR Generate special tokens into the tree. .TP \fB\-vd \fINAME\fR Use \fINAME\fR as the package for the default visitor classes. .TP \fB\-vp \fINAME\fR Use \fINAME\fR as the package for the default visitor classes. .TP \fB\-w\fR Do not overwrite existing files. .SH SEE ALSO .BR javacc (1) .SH AUTHOR \fBjtb\fR was written by the UCLA Compilers Group. .PP This manual page was written by David Paleino , for the Debian project (and may be used by others). .PP This manual page was updated by Ludovico Cavedon .