javacc:jtb
Full name:
org.codehaus.mojo:javacc-maven-plugin:3.1.1:jtb
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 thread-safe and supports parallel builds.
- Since version:
2.2
. - Binds by default to the lifecycle phase:
generate-sources
.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<descriptiveFieldNames> |
Boolean |
- |
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: javacc.descriptiveFieldNames |
<excludes> |
String[] |
- |
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[] |
- |
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 |
- |
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: javacc.javadocFriendlyComments |
<nodePackageName> |
String |
- |
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: javacc.nodePackageName |
<nodeParentClass> |
String |
- |
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: javacc.nodeParentClass |
<outputDirectory> |
File |
- |
The directory where the output Java files will be located. Default: ${project.build.directory}/generated-sources/jtb User Property: javacc.outputDirectory |
<packageName> |
String |
- |
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: javacc.packageName |
<parentPointers> |
Boolean |
- |
If true , all nodes will contain fields for its parent node. Default value is false .User Property: javacc.parentPointers |
<printer> |
Boolean |
- |
If true , JTB will generate a syntax tree dumping visitor. Default value is false .User Property: javacc.printer |
<scheme> |
Boolean |
- |
If true , JTB will generate the following files to support the Schema programming language:
false .User Property: javacc.scheme |
<sourceDirectory> |
File |
- |
The directory where the JavaCC grammar files (*.jtb ) are located. It will be recursively scanned for input files to pass to JTB.Default: ${basedir}/src/main/jtb User Property: javacc.sourceDirectory |
<specialTokens> |
Boolean |
- |
If true , JTB will include JavaCC "special tokens" in the AST. Default value is false .User Property: javacc.specialTokens |
<staleMillis> |
int |
- |
The granularity in milliseconds of the last modification date for testing whether a source needs recompilation. Default: 0 User Property: javacc.lastModGranularityMs |
<supressErrorChecking> |
Boolean |
- |
If true , JTB will suppress its semantic error checking. Default value is false .User Property: javacc.supressErrorChecking |
<timestampDirectory> |
File |
- |
The directory to store the processed input files for later detection of stale sources. Default: ${project.build.directory}/generated-sources/jtb-timestamp User Property: javacc.timestampDirectory |
<visitorPackageName> |
String |
- |
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: 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
- 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[]
- 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[]
- 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
- 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
- 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
- Required:
No
- User Property:
javacc.nodeParentClass
<outputDirectory>
The directory where the output Java files will be located.
- Type:
java.io.File
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Required:
No
- User Property:
javacc.visitorPackageName