javacc:jjtree
Full name:
org.codehaus.mojo:javacc-maven-plugin:3.1.1:jjtree
Deprecated:
As of version 2.4, use the jjtree-javacc
goal instead.
Description:
Parses a JJTree grammar file (*.jjt
) and transforms it to Java source files and a JavaCC grammar file. Please see the JJTree Reference Documentation for more information.
Attributes:
- Requires a Maven project to be executed.
- The goal is thread-safe and supports parallel builds.
- Since version:
2.0
. - Binds by default to the lifecycle phase:
generate-sources
.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<buildNodeFiles> |
Boolean |
- |
A flag whether to generate sample implementations for SimpleNode and any other nodes used in the grammar. Default value is true .User Property: javacc.buildNodeFiles |
<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 **/*.jjt and **/*.JJT are used to select grammar files. |
<isStatic> |
Boolean |
- |
A flag whether to generate code for a static parser. Note that this setting must match the corresponding option for the javacc mojo. Default value is true .User Property: javacc.isStatic Alias: javacc.staticOption |
<jdkVersion> |
String |
2.4 |
The Java version for which to generate source code. Default value is 1.4 .User Property: javacc.jdkVersion |
<multi> |
Boolean |
- |
A flag whether to generate a multi mode parse tree or a single mode parse tree. Default value is false .User Property: javacc.multi |
<nodeClass> |
String |
2.5 |
The name of a custom class that extends SimpleNode and will be used as the super class for the generated tree node classes. By default, the tree node classes will directly extend the class SimpleNode .User Property: javacc.nodeClass |
<nodeDefaultVoid> |
Boolean |
- |
A flag whether to make each non-decorated production void instead of an indefinite node. Default value is false .User Property: javacc.nodeDefaultVoid |
<nodeFactory> |
String |
- |
The name of a custom factory class used to create Node objects. This class must have a method with the signature public static Node jjtCreate(int id) . By default, the class SimpleNode will be used as the factory class.User Property: javacc.nodeFactory |
<nodePackage> |
String |
- |
The package to generate the AST node classes into. 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 . By default, the package of the corresponding parser is used.User Property: javacc.nodePackage |
<nodePrefix> |
String |
- |
The prefix used to construct node class names from node identifiers in multi mode. Default value is AST .User Property: javacc.nodePrefix |
<nodeScopeHook> |
Boolean |
- |
A flag whether user-defined parser methods should be called on entry and exit of every node scope. Default value is false .User Property: javacc.nodeScopeHook |
<nodeUsesParser> |
Boolean |
- |
A flag whether the node construction routines need an additional method parameter to receive the parser object. Default value is false .User Property: javacc.nodeUsesParser |
<outputDirectory> |
File |
- |
Directory where the output Java files for the node classes and the JavaCC grammar file will be located. Default: ${project.build.directory}/generated-sources/jjtree User Property: javacc.outputDirectory |
<sourceDirectory> |
File |
- |
Directory where the input JJTree files (*.jjt ) are located.Default: ${basedir}/src/main/jjtree User Property: javacc.sourceDirectory |
<staleMillis> |
int |
- |
The granularity in milliseconds of the last modification date for testing whether a source needs recompilation. Default: 0 User Property: javacc.lastModGranularityMs |
<timestampDirectory> |
File |
- |
The directory to store the processed input files for later detection of stale sources. Default: ${project.build.directory}/generated-sources/jjtree-timestamp User Property: javacc.timestampDirectory |
<trackTokens> |
Boolean |
2.5 |
A flag whether to insert the methods jjtGetFirstToken() , jjtSetFirstToken() , getLastToken() and jjtSetLastToken() into the class SimpleNode . Default value is false .User Property: javacc.trackTokens |
<visitor> |
Boolean |
- |
A flag whether to insert a jjtAccept() method in the node classes and to generate a visitor implementation with an entry for every node type used in the grammar. Default value is false .User Property: javacc.visitor |
<visitorDataType> |
String |
2.5 |
The name of a class to use for the data argument of the jjtAccept() and visit() methods. Default value is java.lang.Object .User Property: javacc.visitorDataType |
<visitorException> |
String |
- |
The name of an exception class to include in the signature of the generated jjtAccept() and visit() methods. By default, the throws clause of the generated methods is empty such that only unchecked exceptions can be thrown.User Property: javacc.visitorException |
<visitorReturnType> |
String |
2.5 |
The name of a class to use as the return type of the jjtAccept() and visit() methods. Default value is java.lang.Object .User Property: javacc.visitorReturnType |
Parameter Details
<buildNodeFiles>
A flag whether to generate sample implementations for
SimpleNode
and any other nodes used in the grammar. Default value is true
.- Type:
java.lang.Boolean
- Required:
No
- User Property:
javacc.buildNodeFiles
<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
**/*.jjt
and **/*.JJT
are used to select grammar files.- Type:
java.lang.String[]
- Required:
No
<isStatic>
A flag whether to generate code for a static parser. Note that this setting must match the corresponding option for the
javacc
mojo. Default value is true
.- Type:
java.lang.Boolean
- Required:
No
- User Property:
javacc.isStatic
- Alias:
javacc.staticOption
<jdkVersion>
The Java version for which to generate source code. Default value is
1.4
.- Type:
java.lang.String
- Since:
2.4
- Required:
No
- User Property:
javacc.jdkVersion
<multi>
A flag whether to generate a multi mode parse tree or a single mode parse tree. Default value is
false
.- Type:
java.lang.Boolean
- Required:
No
- User Property:
javacc.multi
<nodeClass>
The name of a custom class that extends
SimpleNode
and will be used as the super class for the generated tree node classes. By default, the tree node classes will directly extend the class SimpleNode
.- Type:
java.lang.String
- Since:
2.5
- Required:
No
- User Property:
javacc.nodeClass
<nodeDefaultVoid>
A flag whether to make each non-decorated production void instead of an indefinite node. Default value is
false
.- Type:
java.lang.Boolean
- Required:
No
- User Property:
javacc.nodeDefaultVoid
<nodeFactory>
The name of a custom factory class used to create
Node
objects. This class must have a method with the signature public static Node jjtCreate(int id)
. By default, the class SimpleNode
will be used as the factory class.- Type:
java.lang.String
- Required:
No
- User Property:
javacc.nodeFactory
<nodePackage>
The package to generate the AST node classes into. 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
. By default, the package of the corresponding parser is used.- Type:
java.lang.String
- Required:
No
- User Property:
javacc.nodePackage
<nodePrefix>
The prefix used to construct node class names from node identifiers in multi mode. Default value is
AST
.- Type:
java.lang.String
- Required:
No
- User Property:
javacc.nodePrefix
<nodeScopeHook>
A flag whether user-defined parser methods should be called on entry and exit of every node scope. Default value is
false
.- Type:
java.lang.Boolean
- Required:
No
- User Property:
javacc.nodeScopeHook
<nodeUsesParser>
A flag whether the node construction routines need an additional method parameter to receive the parser object. Default value is
false
.- Type:
java.lang.Boolean
- Required:
No
- User Property:
javacc.nodeUsesParser
<outputDirectory>
Directory where the output Java files for the node classes and the JavaCC grammar file will be located.
- Type:
java.io.File
- Required:
No
- User Property:
javacc.outputDirectory
- Default:
${project.build.directory}/generated-sources/jjtree
<sourceDirectory>
Directory where the input JJTree files (
*.jjt
) are located.- Type:
java.io.File
- Required:
No
- User Property:
javacc.sourceDirectory
- Default:
${basedir}/src/main/jjtree
<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
<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/jjtree-timestamp
<trackTokens>
A flag whether to insert the methods
jjtGetFirstToken()
, jjtSetFirstToken()
, getLastToken()
and jjtSetLastToken()
into the class SimpleNode
. Default value is false
.- Type:
java.lang.Boolean
- Since:
2.5
- Required:
No
- User Property:
javacc.trackTokens
<visitor>
A flag whether to insert a
jjtAccept()
method in the node classes and to generate a visitor implementation with an entry for every node type used in the grammar. Default value is false
.- Type:
java.lang.Boolean
- Required:
No
- User Property:
javacc.visitor
<visitorDataType>
The name of a class to use for the data argument of the
jjtAccept()
and visit()
methods. Default value is java.lang.Object
.- Type:
java.lang.String
- Since:
2.5
- Required:
No
- User Property:
javacc.visitorDataType
<visitorException>
The name of an exception class to include in the signature of the generated
jjtAccept()
and visit()
methods. By default, the throws
clause of the generated methods is empty such that only unchecked exceptions can be thrown.- Type:
java.lang.String
- Required:
No
- User Property:
javacc.visitorException
<visitorReturnType>
The name of a class to use as the return type of the
jjtAccept()
and visit()
methods. Default value is java.lang.Object
.- Type:
java.lang.String
- Since:
2.5
- Required:
No
- User Property:
javacc.visitorReturnType