public class ANTLR extends Task
description, location, project| Constructor and Description |
|---|
ANTLR()
Constructor for ANTLR task.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addClasspathEntry(java.lang.String resource)
Search for the given resource and add the directory or archive
that contains it to the classpath.
|
Path |
createClasspath()
Adds a classpath to be set
because a directory might be given for Antlr debug.
|
Commandline.Argument |
createJvmarg()
Adds a new JVM argument.
|
void |
execute()
Execute the task.
|
void |
init()
Adds the jars or directories containing Antlr
this should make the forked JVM work without having to
specify it directly.
|
protected boolean |
is272()
Whether the antlr version is 2.7.2 (or higher).
|
void |
setDebug(boolean enable)
Sets a flag to enable ParseView debugging
|
void |
setDiagnostic(boolean enable)
Sets a flag to emit diagnostic text
|
void |
setDir(java.io.File d)
The working directory of the process
|
void |
setFork(boolean s) |
void |
setGlib(java.io.File superGrammar)
Sets an optional super grammar file
|
void |
setGlib(java.lang.String superGrammar)
Deprecated.
since ant 1.6
|
void |
setHtml(boolean enable)
If true, emit html
|
void |
setOutputdirectory(java.io.File outputDirectory)
The directory to write the generated files to.
|
void |
setTarget(java.io.File target)
The grammar file to process.
|
void |
setTrace(boolean enable)
If true, enables all tracing.
|
void |
setTraceLexer(boolean enable)
If true, enables lexer tracing.
|
void |
setTraceParser(boolean enable)
If true, enables parser tracing.
|
void |
setTraceTreeWalker(boolean enable)
Sets a flag to allow the user to enable tree walker tracing
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeclone, getDescription, getLocation, getProject, setDescription, setLocation, setProjectpublic void setTarget(java.io.File target)
target - the gramer filepublic void setOutputdirectory(java.io.File outputDirectory)
outputDirectory - the output directorypublic void setGlib(java.lang.String superGrammar)
superGrammar - the super grammar filenamepublic void setGlib(java.io.File superGrammar)
superGrammar - the super grammar filepublic void setDebug(boolean enable)
enable - a boolean valuepublic void setHtml(boolean enable)
enable - a boolean valuepublic void setDiagnostic(boolean enable)
enable - a boolean valuepublic void setTrace(boolean enable)
enable - a boolean valuepublic void setTraceParser(boolean enable)
enable - a boolean valuepublic void setTraceLexer(boolean enable)
enable - a boolean valuepublic void setTraceTreeWalker(boolean enable)
enable - a boolean valuepublic void setFork(boolean s)
s - a boolean valuepublic void setDir(java.io.File d)
d - the working directorypublic Path createClasspath()
public Commandline.Argument createJvmarg()
setFork(boolean)public void init()
throws BuildException
init in class TaskBuildException - on errorprotected void addClasspathEntry(java.lang.String resource)
Doesn't work for archives in JDK 1.1 as the URL returned by getResource doesn't contain the name of the archive.
resource - the resource name to search forpublic void execute()
throws BuildException
execute in class TaskBuildException - on errorprotected boolean is272()