2000-11-14 09:30:38 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
|
|
|
<title>ANTLR Task</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h2><a name="antlr">ANTLR</a></h2>
|
|
|
|
<h3>Description</h3>
|
|
|
|
<p>
|
2001-02-13 12:32:01 +00:00
|
|
|
Invokes the <a HREF="http://www.antlr.org/" target="_top">ANTLR</a> Translator generator
|
2000-11-14 09:30:38 +00:00
|
|
|
on a grammar file.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
To use the ANTLR task, set the <i>target</i> attribute to the name of the
|
|
|
|
grammar file to process. Optionally, you can also set the
|
|
|
|
<i>outputdirectory</i> to write the generated file to a specific directory.
|
|
|
|
Otherwise ANTLR writes the generated files to the directory containing
|
|
|
|
the grammar file.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
This task only invokes ANTLR if the grammar file is newer than the generated
|
|
|
|
files.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
|
|
<table border="1" cellpadding="2" cellspacing="0">
|
|
|
|
<tr>
|
|
|
|
<td valign="top"><b>Attribute</b></td>
|
|
|
|
<td valign="top"><b>Description</b></td>
|
|
|
|
<td align="center" valign="top"><b>Required</b></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">target</td>
|
|
|
|
<td valign="top">The grammar file to process.</td>
|
|
|
|
<td valign="top" align="center">Yes</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">outputdirectory</td>
|
|
|
|
<td valign="top">
|
|
|
|
The directory to write the generated files to. If not set, the files
|
|
|
|
are written to the directory containing the grammar file.
|
|
|
|
</td>
|
|
|
|
<td valign="top" align="center">No</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">fork</td>
|
|
|
|
<td valign="top">Run ANTLR in a separate VM.</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
<td align="center" valign="top">No, default is "off"</td>
|
2000-11-14 09:30:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">dir</td>
|
|
|
|
<td valign="top">The directory to invoke the VM in. (ignored if
|
|
|
|
fork is disabled)</td>
|
|
|
|
<td align="center" valign="top">No</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<h3>Example</h3>
|
|
|
|
<blockquote><pre>
|
|
|
|
<antlr
|
|
|
|
target="etc/java.g"
|
|
|
|
outputdirectory="build/src"
|
|
|
|
/>
|
|
|
|
</pre></blockquote>
|
|
|
|
<p>
|
|
|
|
This invokes ANTLR on grammar file etc/java.g, writing the generated
|
|
|
|
files to build/src.
|
|
|
|
</p>
|
|
|
|
<hr>
|
|
|
|
|
2001-02-13 12:32:01 +00:00
|
|
|
<p align="center">Copyright © 2000,2001 Apache Software Foundation. All rights
|
|
|
|
Reserved.</p>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|