public class Antlr3Mojo
extends org.apache.maven.plugin.AbstractMojo
*.g
and transforms them into Java source
files.Modifier and Type | Field | Description |
---|---|---|
protected boolean |
debug |
If set to true, then the code generated by the ANTLR code generator will
be set to debug mode.
|
protected boolean |
dfa |
If set to true, then the ANTLR tool will generate a description of the
DFA for each decision in the grammar in
Dot format.
|
protected Set<String> |
excludes |
A set of Ant-like exclusion patterns used to prevent certain files from
being processed.
|
protected Set<String> |
includes |
Provides an explicit list of all the grammars that should be included in
the generate phase of the plugin.
|
protected String |
messageFormat |
If this parameter is set, it indicates that any warning or error messages
returned by ANLTR, should be formatted in the specified way.
|
protected boolean |
nfa |
If set to true, then the ANTLR tool will generate a description of the
NFA for each rule in Dot format
|
protected boolean |
printGrammar |
If set to true, then the ANTLR tool will print a version of the input
grammar(s) which are stripped of any embedded actions.
|
protected boolean |
profile |
If set to true, then the generated parser will compute and report profile
information at runtime.
|
protected org.apache.maven.project.MavenProject |
project |
The current Maven project.
|
protected boolean |
report |
If set to true, then after the tool has processed an input grammar file
it will report various statistics about the parser, such as information
on cyclic DFAs, which rules may use backtracking, and so on.
|
protected Tool |
tool |
An instance of the ANTLR tool build.
|
protected boolean |
trace |
If set to true, the generated parser code will log rule entry and exit
points to stdout (
System.out for the Java target) as an aid to
debugging. |
protected boolean |
verbose |
If set to true, then ANTLR will report verbose messages during the code
generation process.
|
Constructor | Description |
---|---|
Antlr3Mojo() |
Modifier and Type | Method | Description |
---|---|---|
void |
execute() |
The main entry point for this Mojo, it is responsible for converting
ANTLR 3.x grammars into the target language specified by the grammar.
|
Set<String> |
getIncludesPatterns() |
|
File |
getLibDirectory() |
|
File |
getOutputDirectory() |
|
File |
getSourceDirectory() |
protected boolean report
protected boolean printGrammar
protected boolean debug
protected boolean profile
protected boolean nfa
protected boolean dfa
protected boolean trace
System.out
for the Java target) as an aid to
debugging.protected String messageFormat
antlr
, gnu
and
vs2005
.protected boolean verbose
protected Set<String> includes
A set of Ant-like inclusion patterns used to select files from the source
directory for processing. By default, the pattern **/*.g
is used to select grammar files.
protected Set<String> excludes
protected org.apache.maven.project.MavenProject project
protected Tool tool
public File getSourceDirectory()
public File getOutputDirectory()
public File getLibDirectory()
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
- if a configuration or grammar error causes
the code generation process to failorg.apache.maven.plugin.MojoFailureException
- if an instance of the ANTLR 3 Tool
cannot be createdCopyright © 1992–2019 ANTLR. All rights reserved.