jjtree-javacc
goal instead.public class JJTreeMojo extends AbstractPreprocessorMojo
*.jjt
) and transforms it to Java source files and a JavaCC grammar
file. Please see the JJTree Reference Documentation for
more information.Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
buildNodeFiles
Deprecated.
A flag whether to generate sample implementations for
SimpleNode and any other nodes used in the
grammar. |
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 |
isStatic
Deprecated.
A flag whether to generate code for a static parser.
|
private java.lang.String |
jdkVersion
Deprecated.
The Java version for which to generate source code.
|
private java.lang.Boolean |
multi
Deprecated.
A flag whether to generate a multi mode parse tree or a single mode parse tree.
|
private java.lang.String |
nodeClass
Deprecated.
The name of a custom class that extends
SimpleNode and will be used as the super class for the
generated tree node classes. |
private java.lang.Boolean |
nodeDefaultVoid
Deprecated.
A flag whether to make each non-decorated production void instead of an indefinite node.
|
private java.lang.String |
nodeFactory
Deprecated.
The name of a custom factory class used to create
Node objects. |
private java.lang.String |
nodePackage
Deprecated.
The package to generate the AST node classes into.
|
private java.lang.String |
nodePrefix
Deprecated.
The prefix used to construct node class names from node identifiers in multi mode.
|
private java.lang.Boolean |
nodeScopeHook
Deprecated.
A flag whether user-defined parser methods should be called on entry and exit of every node scope.
|
private java.lang.Boolean |
nodeUsesParser
Deprecated.
A flag whether the node construction routines need an additional method parameter to receive the parser object.
|
private java.io.File |
outputDirectory
Deprecated.
Directory where the output Java files for the node classes and the JavaCC grammar file will be located.
|
private java.io.File |
sourceDirectory
Deprecated.
Directory where the input JJTree files (
*.jjt ) are located. |
private int |
staleMillis
Deprecated.
The granularity in milliseconds of the last modification date for testing whether a source needs recompilation.
|
private java.io.File |
timestampDirectory
Deprecated.
The directory to store the processed input files for later detection of stale sources.
|
private java.lang.Boolean |
trackTokens
Deprecated.
A flag whether to insert the methods
jjtGetFirstToken() , jjtSetFirstToken() ,
getLastToken() and jjtSetLastToken() into the class SimpleNode . |
private java.lang.Boolean |
visitor
Deprecated.
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. |
private java.lang.String |
visitorDataType
Deprecated.
The name of a class to use for the data argument of the
jjtAccept() and visit()
methods. |
private java.lang.String |
visitorException
Deprecated.
The name of an exception class to include in the signature of the generated
jjtAccept()
and visit() methods. |
private java.lang.String |
visitorReturnType
Deprecated.
The name of a class to use as the return type of the
jjtAccept() and visit() methods. |
Constructor and Description |
---|
JJTreeMojo()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCompileSourceRoot()
Deprecated.
Prevents registration of our output or a following invocation of the javacc mojo will cause duplicate sources
which in turn will make compilation fail.
|
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.
|
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.
|
protected JJTree |
newJJTree()
Deprecated.
Creates a new facade to invoke JJTree.
|
protected void |
processGrammar(GrammarInfo grammarInfo)
Deprecated.
Passes the specified grammar file through the tool.
|
createTimestamp, execute
private java.lang.String jdkVersion
1.4
.private java.lang.Boolean buildNodeFiles
SimpleNode
and any other nodes used in the
grammar. Default value is true
.private java.lang.Boolean multi
false
.private java.lang.Boolean nodeDefaultVoid
false
.private java.lang.String nodeClass
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
.private java.lang.String nodeFactory
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.private java.lang.String nodePackage
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.private java.lang.String nodePrefix
AST
.private java.lang.Boolean nodeScopeHook
false
.private java.lang.Boolean nodeUsesParser
false
.private java.lang.Boolean isStatic
javacc
mojo. Default value is true
.private java.lang.Boolean trackTokens
jjtGetFirstToken()
, jjtSetFirstToken()
,
getLastToken()
and jjtSetLastToken()
into the class SimpleNode
. Default
value is false
.private java.lang.Boolean visitor
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
.private java.lang.String visitorDataType
jjtAccept()
and visit()
methods. Default value is java.lang.Object
.private java.lang.String visitorReturnType
jjtAccept()
and visit()
methods.
Default value is java.lang.Object
.private java.lang.String visitorException
jjtAccept()
and visit()
methods. By default, the throws
clause of the generated methods is
empty such that only unchecked exceptions can be thrown.private java.io.File sourceDirectory
*.jjt
) are located.private java.io.File outputDirectory
private java.io.File timestampDirectory
private int staleMillis
private java.lang.String[] includes
**/*.jjt
and **/*.JJT
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.protected JJTree newJJTree()
null
.protected void addCompileSourceRoot()
addCompileSourceRoot
in class AbstractPreprocessorMojo