Class ANTLR
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.optional.ANTLR
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddClasspathEntry(String resource) Search for the given resource and add the directory or archive that contains it to the classpath.Adds a classpath to be set because a directory might be given for Antlr debug.Adds a new JVM argument.voidexecute()Execute the task.voidinit()Adds the jars or directories containing Antlr this should make the forked JVM work without having to specify it directly.protected booleanis272()Whether the antlr version is 2.7.2 (or higher).voidsetDebug(boolean enable) Sets a flag to enable ParseView debuggingvoidsetDiagnostic(boolean enable) Sets a flag to emit diagnostic textvoidThe working directory of the processvoidsetFork(boolean s) voidSets an optional super grammar filevoidDeprecated.since ant 1.6voidsetHtml(boolean enable) If true, emit htmlvoidsetOutputdirectory(File outputDirectory) The directory to write the generated files to.voidThe grammar file to process.voidsetTrace(boolean enable) If true, enables all tracing.voidsetTraceLexer(boolean enable) If true, enables lexer tracing.voidsetTraceParser(boolean enable) If true, enables parser tracing.voidsetTraceTreeWalker(boolean enable) Sets a flag to allow the user to enable tree walker tracingMethods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
- 
Constructor Details- 
ANTLRpublic ANTLR()Constructor for ANTLR task.
 
- 
- 
Method Details- 
setTargetThe grammar file to process.- Parameters:
- target- the grammar file
 
- 
setOutputdirectoryThe directory to write the generated files to.- Parameters:
- outputDirectory- the output directory
 
- 
setGlibDeprecated.since ant 1.6Sets an optional super grammar file. Use setGlib(File superGrammar) instead.- Parameters:
- superGrammar- the super grammar filename
 
- 
setGlibSets an optional super grammar file- Parameters:
- superGrammar- the super grammar file
- Since:
- ant 1.6
 
- 
setDebugpublic void setDebug(boolean enable) Sets a flag to enable ParseView debugging- Parameters:
- enable- a- booleanvalue
 
- 
setHtmlpublic void setHtml(boolean enable) If true, emit html- Parameters:
- enable- a- booleanvalue
 
- 
setDiagnosticpublic void setDiagnostic(boolean enable) Sets a flag to emit diagnostic text- Parameters:
- enable- a- booleanvalue
 
- 
setTracepublic void setTrace(boolean enable) If true, enables all tracing.- Parameters:
- enable- a- booleanvalue
 
- 
setTraceParserpublic void setTraceParser(boolean enable) If true, enables parser tracing.- Parameters:
- enable- a- booleanvalue
 
- 
setTraceLexerpublic void setTraceLexer(boolean enable) If true, enables lexer tracing.- Parameters:
- enable- a- booleanvalue
 
- 
setTraceTreeWalkerpublic void setTraceTreeWalker(boolean enable) Sets a flag to allow the user to enable tree walker tracing- Parameters:
- enable- a- booleanvalue
 
- 
setForkpublic void setFork(boolean s) - Parameters:
- s- a- booleanvalue
 
- 
setDirThe working directory of the process- Parameters:
- d- the working directory
 
- 
createClasspathAdds a classpath to be set because a directory might be given for Antlr debug.- Returns:
- a path to be configured
 
- 
createJvmargAdds a new JVM argument.- Returns:
- create a new JVM argument so that any argument can be passed to the JVM.
- See Also:
 
- 
initAdds the jars or directories containing Antlr this should make the forked JVM work without having to specify it directly.- Overrides:
- initin class- Task
- Throws:
- BuildException- on error
 
- 
addClasspathEntrySearch for the given resource and add the directory or archive that contains it to the classpath.Doesn't work for archives in JDK 1.1 as the URL returned by getResource doesn't contain the name of the archive. - Parameters:
- resource- the resource name to search for
 
- 
executeExecute the task.- Overrides:
- executein class- Task
- Throws:
- BuildException- on error
 
- 
is272protected boolean is272()Whether the antlr version is 2.7.2 (or higher).- Returns:
- true if the version of Antlr present is 2.7.2 or later.
- Since:
- Ant 1.6
 
 
-