jtb-javacc
goal instead.public class JTBMojo extends AbstractPreprocessorMojo
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
descriptiveFieldNames
Deprecated.
Setting this option to
true causes JTB to generate field names that reflect the structure of the
tree instead of generic names like f0 , f1 etc. |
private java.lang.String[] |
excludes
Deprecated.
A set of Ant-like exclusion patterns used to prevent certain files from being processed.
|
private java.lang.String[] |
includes
Deprecated.
A set of Ant-like inclusion patterns used to select files from the source directory for processing.
|
private java.lang.Boolean |
javadocFriendlyComments
Deprecated.
If
true , all generated comments will be wrapped in <pre> tags so that they
are formatted correctly in API docs. |
private java.lang.String |
nodePackageName
Deprecated.
This option specifies the package for the generated AST nodes.
|
private java.lang.String |
nodeParentClass
Deprecated.
The qualified name of a user-defined class from which all AST nodes will inherit.
|
private java.io.File |
outputDirectory
Deprecated.
The directory where the output Java files will be located.
|
private java.lang.String |
packageName
Deprecated.
This option is short for
nodePackageName = <packageName>.syntaxtree and
visitorPackageName = <packageName>.visitor . |
private java.lang.Boolean |
parentPointers
Deprecated.
If
true , all nodes will contain fields for its parent node. |
private java.lang.Boolean |
printer
Deprecated.
If
true , JTB will generate a syntax tree dumping visitor. |
private java.lang.Boolean |
scheme
Deprecated.
If
true , JTB will generate the following files to support the Schema programming language:
Scheme records representing the grammar.
A Scheme tree building visitor.
Default value is false . |
private java.io.File |
sourceDirectory
Deprecated.
The directory where the JavaCC grammar files (
*.jtb ) are located. |
private java.lang.Boolean |
specialTokens
Deprecated.
If
true , JTB will include JavaCC "special tokens" in the AST. |
private int |
staleMillis
Deprecated.
The granularity in milliseconds of the last modification date for testing whether a source needs recompilation.
|
private java.lang.Boolean |
supressErrorChecking
Deprecated.
If
true , JTB will suppress its semantic error checking. |
private java.io.File |
timestampDirectory
Deprecated.
The directory to store the processed input files for later detection of stale sources.
|
private java.lang.String |
visitorPackageName
Deprecated.
This option specifies the package for the generated visitors.
|
Constructor and Description |
---|
JTBMojo()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
getExcludes()
Deprecated.
Gets a set of Ant-like exclusion patterns used to unselect files from the source directory for processing.
|
protected java.lang.String[] |
getIncludes()
Deprecated.
Gets a set of Ant-like inclusion patterns used to select files from the source directory for processing.
|
private java.lang.String |
getNodePackageName()
Deprecated.
Gets the effective package name for the AST node files.
|
protected java.io.File |
getOutputDirectory()
Deprecated.
Gets the absolute path to the directory where the generated Java files for the parser will be stored.
|
protected java.io.File |
getSourceDirectory()
Deprecated.
Gets the absolute path to the directory where the grammar files are located.
|
protected int |
getStaleMillis()
Deprecated.
Gets the granularity in milliseconds of the last modification date for testing whether a source needs
recompilation.
|
protected java.io.File |
getTimestampDirectory()
Deprecated.
Gets the absolute path to the directory where the processed input files will be stored for later detection of
stale sources.
|
private java.lang.String |
getVisitorPackageName()
Deprecated.
Gets the effective package name for the visitor files.
|
private JTB |
newJTB()
Deprecated.
Creates a new facade to invoke JTB.
|
protected void |
processGrammar(GrammarInfo grammarInfo)
Deprecated.
Passes the specified grammar file through the tool.
|
addCompileSourceRoot, createTimestamp, execute
private java.lang.String packageName
nodePackageName
= <packageName>.syntaxtree
and
visitorPackageName
= <packageName>.visitor
. Note that this option takes
precedence over nodePackageName
and visitorPackageName
if specified.private java.lang.String nodePackageName
org.apache
and this
parameter is set to *.demo
, the tree node classes will be located in the package
org.apache.demo
. Default value is *.syntaxtree
.private java.lang.String visitorPackageName
org.apache
and this
parameter is set to *.demo
, the visitor classes will be located in the package
org.apache.demo
. Default value is *.visitor
.private java.lang.Boolean supressErrorChecking
true
, JTB will suppress its semantic error checking. Default value is false
.private java.lang.Boolean javadocFriendlyComments
true
, all generated comments will be wrapped in <pre>
tags so that they
are formatted correctly in API docs. Default value is false
.private java.lang.Boolean descriptiveFieldNames
true
causes JTB to generate field names that reflect the structure of the
tree instead of generic names like f0
, f1
etc. Default value is false
.private java.lang.String nodeParentClass
Node
.private java.lang.Boolean parentPointers
true
, all nodes will contain fields for its parent node. Default value is false
.private java.lang.Boolean specialTokens
true
, JTB will include JavaCC "special tokens" in the AST. Default value is false
.private java.lang.Boolean scheme
true
, JTB will generate the following files to support the Schema programming language:
false
.private java.lang.Boolean printer
true
, JTB will generate a syntax tree dumping visitor. Default value is false
.private java.io.File sourceDirectory
*.jtb
) are located. It will be recursively scanned
for input files to pass to JTB.private java.io.File outputDirectory
private java.io.File timestampDirectory
private int staleMillis
private java.lang.String[] includes
**/*.jtb
and **/*.JTB
are used to select grammar files.private java.lang.String[] excludes
protected java.io.File getSourceDirectory()
getSourceDirectory
in class AbstractPreprocessorMojo
null
.protected java.lang.String[] getIncludes()
getIncludes
in class AbstractPreprocessorMojo
null
if all files should be included.protected java.lang.String[] getExcludes()
getExcludes
in class AbstractPreprocessorMojo
null
if no files should be excluded.protected java.io.File getOutputDirectory()
getOutputDirectory
in class AbstractPreprocessorMojo
null
.protected java.io.File getTimestampDirectory()
getTimestampDirectory
in class AbstractPreprocessorMojo
null
.protected int getStaleMillis()
getStaleMillis
in class AbstractPreprocessorMojo
protected void processGrammar(GrammarInfo grammarInfo) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
processGrammar
in class AbstractPreprocessorMojo
grammarInfo
- The grammar info describing the grammar file to process, must not be null
.org.apache.maven.plugin.MojoExecutionException
- If the invocation of the tool failed.org.apache.maven.plugin.MojoFailureException
- If the tool reported a non-zero exit code.private java.lang.String getNodePackageName()
null
.private java.lang.String getVisitorPackageName()
null
.private JTB newJTB()
null
.