javacc:jtb
Full name:
org.codehaus.mojo:javacc-maven-plugin:3.0.1:jtb
This plugin goal has been deprecated:
As of version 2.4, use the
jtb-javacc
goal instead.Description:
Parses a JTB file and transforms it into source files for an AST
and a JavaCC grammar file which automatically builds the
AST.Note: JTB requires Java 1.5
or higher. This goal will not work with earlier versions of the
JRE.
Attributes:
- Requires a Maven project to be executed.
- The goal is not marked as thread-safe and thus does not support parallel builds.
- Since version:
2.2
. - Binds by default to the lifecycle phase:
generate-sources
.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<descriptiveFieldNames> |
Boolean |
2.2 |
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. Default
value is false .User property is: javacc.descriptiveFieldNames . |
<excludes> |
String[] |
2.2 |
A set of Ant-like exclusion patterns used to prevent certain files
from being processed. By default, this set is empty such that no
files are excluded. |
<includes> |
String[] |
2.2 |
A set of Ant-like inclusion patterns used to select files from the
source directory for processing. By default, the patterns
**/*.jtb and **/*.JTB are used to select
grammar files. |
<javadocFriendlyComments> |
Boolean |
2.2 |
If true , all generated comments will be wrapped in
<pre> tags so that they are formatted correctly
in API docs. Default value is false .User property is: javacc.javadocFriendlyComments . |
<nodePackageName> |
String |
2.2 |
This option specifies the package for the generated AST nodes. This
value may use a leading asterisk to reference the package of the
corresponding parser. For example, if the parser package is
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 .User property is: javacc.nodePackageName . |
<nodeParentClass> |
String |
2.2 |
The qualified name of a user-defined class from which all AST nodes
will inherit. By default, AST nodes will inherit from the generated
class Node .User property is: javacc.nodeParentClass . |
<outputDirectory> |
File |
2.2 |
The directory where the output Java files will be located. Default value is: ${project.build.directory}/generated-sources/jtb .User property is: javacc.outputDirectory . |
<packageName> |
String |
2.2 |
This option is short for nodePackageName =
<packageName>.syntaxtree and
visitorPackageName =
<packageName>.visitor . Note that this option
takes precedence over nodePackageName and
visitorPackageName if specified.User property is: javacc.packageName . |
<parentPointers> |
Boolean |
2.2 |
If true , all nodes will contain fields for its parent
node. Default value is false .User property is: javacc.parentPointers . |
<printer> |
Boolean |
2.2 |
If true , JTB will generate a syntax tree dumping
visitor. Default value is false .User property is: javacc.printer . |
<scheme> |
Boolean |
2.2 |
If true , JTB will generate the following files to
support the Schema programming language:
false .User property is: javacc.scheme . |
<sourceDirectory> |
File |
2.2 |
The directory where the JavaCC grammar files (*.jtb )
are located. It will be recursively scanned for input files to pass
to JTB.Default value is: ${basedir}/src/main/jtb .User property is: javacc.sourceDirectory . |
<specialTokens> |
Boolean |
2.2 |
If true , JTB will include JavaCC "special tokens" in
the AST. Default value is false .User property is: javacc.specialTokens . |
<staleMillis> |
int |
2.2 |
The granularity in milliseconds of the last modification date for
testing whether a source needs recompilation. Default value is: 0 .User property is: javacc.lastModGranularityMs . |
<supressErrorChecking> |
Boolean |
2.2 |
If true , JTB will suppress its semantic error
checking. Default value is false .User property is: javacc.supressErrorChecking . |
<timestampDirectory> |
File |
2.2 |
The directory to store the processed input files for later
detection of stale sources. Default value is: ${project.build.directory}/generated-sources/jtb-timestamp .User property is: javacc.timestampDirectory . |
<visitorPackageName> |
String |
2.2 |
This option specifies the package for the generated visitors. This
value may use a leading asterisk to reference the package of the
corresponding parser. For example, if the parser package is
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 .User property is: javacc.visitorPackageName . |
Parameter Details
<descriptiveFieldNames>
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. Default
value is false
.- Type:
java.lang.Boolean
- Since:
2.2
- Required:
No
- User Property:
javacc.descriptiveFieldNames
<excludes>
A set of Ant-like exclusion patterns used to prevent certain files
from being processed. By default, this set is empty such that no
files are excluded.
- Type:
java.lang.String[]
- Since:
2.2
- Required:
No
<includes>
A set of Ant-like inclusion patterns used to select files from the
source directory for processing. By default, the patterns
**/*.jtb
and **/*.JTB
are used to select
grammar files.- Type:
java.lang.String[]
- Since:
2.2
- Required:
No
<javadocFriendlyComments>
If
true
, all generated comments will be wrapped in
<pre>
tags so that they are formatted correctly
in API docs. Default value is false
.- Type:
java.lang.Boolean
- Since:
2.2
- Required:
No
- User Property:
javacc.javadocFriendlyComments
<nodePackageName>
This option specifies the package for the generated AST nodes. This
value may use a leading asterisk to reference the package of the
corresponding parser. For example, if the parser package is
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
.- Type:
java.lang.String
- Since:
2.2
- Required:
No
- User Property:
javacc.nodePackageName
<nodeParentClass>
The qualified name of a user-defined class from which all AST nodes
will inherit. By default, AST nodes will inherit from the generated
class
Node
.- Type:
java.lang.String
- Since:
2.2
- Required:
No
- User Property:
javacc.nodeParentClass
<outputDirectory>
The directory where the output Java files will be located.
- Type:
java.io.File
- Since:
2.2
- Required:
No
- User Property:
javacc.outputDirectory
- Default:
${project.build.directory}/generated-sources/jtb
<packageName>
This option is short for
nodePackageName
=
<packageName>.syntaxtree
and
visitorPackageName
=
<packageName>.visitor
. Note that this option
takes precedence over nodePackageName
and
visitorPackageName
if specified.- Type:
java.lang.String
- Since:
2.2
- Required:
No
- User Property:
javacc.packageName
<parentPointers>
If
true
, all nodes will contain fields for its parent
node. Default value is false
.- Type:
java.lang.Boolean
- Since:
2.2
- Required:
No
- User Property:
javacc.parentPointers
<printer>
If
true
, JTB will generate a syntax tree dumping
visitor. Default value is false
.- Type:
java.lang.Boolean
- Since:
2.2
- Required:
No
- User Property:
javacc.printer
<scheme>
If
true
, JTB will generate the following files to
support the Schema programming language:
- Scheme records representing the grammar.
- A Scheme tree building visitor.
false
.- Type:
java.lang.Boolean
- Since:
2.2
- Required:
No
- User Property:
javacc.scheme
<sourceDirectory>
The directory where the JavaCC grammar files (
*.jtb
)
are located. It will be recursively scanned for input files to pass
to JTB.- Type:
java.io.File
- Since:
2.2
- Required:
No
- User Property:
javacc.sourceDirectory
- Default:
${basedir}/src/main/jtb
<specialTokens>
If
true
, JTB will include JavaCC "special tokens" in
the AST. Default value is false
.- Type:
java.lang.Boolean
- Since:
2.2
- Required:
No
- User Property:
javacc.specialTokens
<staleMillis>
The granularity in milliseconds of the last modification date for
testing whether a source needs recompilation.
- Type:
int
- Since:
2.2
- Required:
No
- User Property:
javacc.lastModGranularityMs
- Default:
0
<supressErrorChecking>
If
true
, JTB will suppress its semantic error
checking. Default value is false
.- Type:
java.lang.Boolean
- Since:
2.2
- Required:
No
- User Property:
javacc.supressErrorChecking
<timestampDirectory>
The directory to store the processed input files for later
detection of stale sources.
- Type:
java.io.File
- Since:
2.2
- Required:
No
- User Property:
javacc.timestampDirectory
- Default:
${project.build.directory}/generated-sources/jtb-timestamp
<visitorPackageName>
This option specifies the package for the generated visitors. This
value may use a leading asterisk to reference the package of the
corresponding parser. For example, if the parser package is
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
.- Type:
java.lang.String
- Since:
2.2
- Required:
No
- User Property:
javacc.visitorPackageName