Package rife.bld.extension
Class Antlr4Operation
java.lang.Object
rife.bld.operations.AbstractOperation<Antlr4Operation>
rife.bld.extension.Antlr4Operation
Generates Java sources from ANTLR grammars.
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the list of arguments that will be used for the antlr operation.Provides additional arguments for the antlr operation.Provides additional arguments for the antlr operation.depend()
Generate file dependencies.void
execute()
Performs the antlr operation.grammarEncoding
(String encoding) Provides grammar file encoding; e.g., euc-jp.Retrieves the location of grammars and tokens files.libDirectory
(File directory) Provides the location of grammars and tokens files.libDirectory
(String directory) Provides the location of grammars and tokens files.libDirectory
(Path directory) Provides the location of grammars and tokens files.listener()
Generate parse tree listener (default).Show exception details when available for errors and warnings.Specify output style for messages in antlr, gnu, vs2005.Don't generate parse tree listener.Don't generate parse tree visitor (default).Retrieves the output directory where all output is generated.outputDirectory
(File directory) Provides the output directory where all output is generated.outputDirectory
(String directory) Provides the output directory where all output is generated.outputDirectory
(Path directory) Provides the output directory where all output is generated.Specify a package/namespace for the generated codeRetrieves the list of source directories that will be used for the antlr operation.sourceDirectories
(File... directories) Provides the source directories that will be used for the antlr operation.sourceDirectories
(String... directories) Provides the source directories that will be used for the antlr operation.sourceDirectories
(Path... directories) Provides the source directories that will be used for the antlr operation.sourceDirectories
(List<File> directories) Provides the source directories that will be used for the antlr operation.sourceDirectoriesPaths
(List<Path> directories) Provides the source directories that will be used for the antlr operation.sourceDirectoriesStrings
(List<String> directories) Provides the source directories that will be used for the antlr operation.Retrieves the list of source files that will be used for the antlr operation.sourceFiles
(File... files) Provides the source files that will be used for the antlr operation.sourceFiles
(String... files) Provides the source files that will be used for the antlr operation.sourceFiles
(Path... files) Provides the source files that will be used for the antlr operation.sourceFiles
(List<File> files) Provides the source files that will be used for the antlr operation.sourceFilesPaths
(List<Path> files) Provides the source files that will be used for the antlr operation.sourceFilesStrings
(List<String> files) Provides the source files that will be used for the antlr operation.visitor()
Generate parse tree visitor.Methods inherited from class rife.bld.operations.AbstractOperation
executeOnce, executeOnce, silent, silent
-
Constructor Details
-
Antlr4Operation
public Antlr4Operation()
-
-
Method Details
-
execute
Performs the antlr operation.- Specified by:
execute
in classrife.bld.operations.AbstractOperation<Antlr4Operation>
- Throws:
Exception
- Since:
- 1.0
-
arguments
Provides additional arguments for the antlr operation.The following additional arguments are supported:
-atn
generate rule augmented transition network diagrams -D<option>=value
set/override a grammar-level option -Werror
treat warnings as errors" -XdbgST
launch StringTemplate visualizer on generated code -XdbgSTWait
wait for STViz to close before continuing -Xforce-atn
use the ATN simulator for all predictions -Xlog
dump lots of logging info to antlr-timestamp.log -Xexact-output-dir
all output goes into -o dir regardless of paths/package - Parameters:
arguments
- the additional arguments- Returns:
- this operation instance
- Since:
- 1.0
-
arguments
Provides additional arguments for the antlr operation.See
arguments(String...)
for details.- Parameters:
arguments
- the additional arguments- Returns:
- this operation instance
- Since:
- 1.0
-
sourceDirectories
Provides the source directories that will be used for the antlr operation.- Parameters:
directories
- the source directories- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceDirectories
Provides the source directories that will be used for the antlr operation.- Parameters:
directories
- the source directories- Returns:
- this operation instance
- Since:
- 1.4
- See Also:
-
sourceDirectories
Provides the source directories that will be used for the antlr operation.- Parameters:
directories
- the source directories- Returns:
- this operation instance
- Since:
- 1.4
- See Also:
-
sourceDirectories
Provides the source directories that will be used for the antlr operation.- Parameters:
directories
- the source directories- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceDirectoriesPaths
Provides the source directories that will be used for the antlr operation.- Parameters:
directories
- the source directories- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceDirectoriesStrings
Provides the source directories that will be used for the antlr operation.- Parameters:
directories
- the source directories- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceFiles
Provides the source files that will be used for the antlr operation.- Parameters:
files
- the source files- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceFiles
Provides the source files that will be used for the antlr operation.- Parameters:
files
- the source files- Returns:
- this operation instance
- Since:
- 1.4
- See Also:
-
sourceFiles
Provides the source files that will be used for the antlr operation.- Parameters:
files
- the source files- Returns:
- this operation instance
- Since:
- 1.4
- See Also:
-
sourceFiles
Provides the source files that will be used for the antlr operation.- Parameters:
files
- the source files- Returns:
- this operation instance
- Since:
- 1.0
- See Also:
-
sourceFilesPaths
Provides the source files that will be used for the antlr operation.- Parameters:
files
- the source files- Returns:
- this operation instance
- Since:
- 1.4
- See Also:
-
sourceFilesStrings
Provides the source files that will be used for the antlr operation.- Parameters:
files
- the source files- Returns:
- this operation instance
- Since:
- 1.4
- See Also:
-
outputDirectory
Provides the output directory where all output is generated.- Parameters:
directory
- the output directory- Returns:
- this operation instance
- Since:
- 1.0
-
outputDirectory
Provides the output directory where all output is generated.- Parameters:
directory
- the output directory- Returns:
- this operation instance
- Since:
- 1.4
-
outputDirectory
Provides the output directory where all output is generated.- Parameters:
directory
- the output directory- Returns:
- this operation instance
- Since:
- 1.4
-
libDirectory
Provides the location of grammars and tokens files.- Parameters:
directory
- the lib directory- Returns:
- this operation instance
- Since:
- 1.0
-
libDirectory
Provides the location of grammars and tokens files.- Parameters:
directory
- the lib directory- Returns:
- this operation instance
- Since:
- 1.4
-
libDirectory
Provides the location of grammars and tokens files.- Parameters:
directory
- the lib directory- Returns:
- this operation instance
- Since:
- 1.4
-
grammarEncoding
Provides grammar file encoding; e.g., euc-jp.- Parameters:
encoding
- the encoding- Returns:
- this operation instance
- Since:
- 1.0
-
msgFormat
Specify output style for messages in antlr, gnu, vs2005.- Parameters:
format
- the output styke- Returns:
- this operation instance
- Since:
- 1.0
-
longMessages
Show exception details when available for errors and warnings.- Returns:
- this operation instance
- Since:
- 1.0
-
listener
Generate parse tree listener (default).- Returns:
- this operation instance
- Since:
- 1.0
-
noListener
Don't generate parse tree listener.- Returns:
- this operation instance
- Since:
- 1.0
-
visitor
Generate parse tree visitor.- Returns:
- this operation instance
- Since:
- 1.0
-
noVisitor
Don't generate parse tree visitor (default).- Returns:
- this operation instance
- Since:
- 1.0
-
pkg
Specify a package/namespace for the generated code- Parameters:
pkg
- the package name- Returns:
- this operation instance
- Since:
- 1.0
-
depend
Generate file dependencies.- Returns:
- this operation instance
- Since:
- 1.0
-
arguments
Retrieves the list of arguments that will be used for the antlr operation.This is a modifiable list that can be retrieved and changed.
- Returns:
- the arguments
- Since:
- 1.0
-
sourceDirectories
Retrieves the list of source directories that will be used for the antlr operation.This is a modifiable list that can be retrieved and changed.
- Returns:
- the source directories
- Since:
- 1.0
-
sourceFiles
Retrieves the list of source files that will be used for the antlr operation.This is a modifiable list that can be retrieved and changed.
- Returns:
- the source files
- Since:
- 1.0
-
outputDirectory
Retrieves the output directory where all output is generated.- Returns:
- the output directory; or
*
null
if the directory wasn't specified - Since:
- 1.0
-
libDirectory
Retrieves the location of grammars and tokens files.- Returns:
- the lib directory; or
null
if the directory wasn't specified - Since:
- 1.0
-