2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2003-07-23 14:12:12 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
2005-04-29 18:58:16 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
2005-03-07 18:11:14 +00:00
|
|
|
<title>JJDoc Task</title>
|
2003-07-23 14:12:12 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
2018-01-22 23:52:21 +01:00
|
|
|
<h2 id="jjtree">JJDoc</h2>
|
2010-11-11 17:04:16 +00:00
|
|
|
<p><em>Since Apache Ant 1.6</em></p>
|
2003-07-23 14:12:12 +00:00
|
|
|
<h3>Description</h3>
|
|
|
|
|
2018-03-08 07:43:53 +01:00
|
|
|
<p>Invokes the <a href="https://javacc.org/" target="_top">JJDoc</a> preprocessor for the JavaCC
|
|
|
|
compiler compiler. It takes a JavaCC parser specification and produces documentation for the BNF
|
|
|
|
grammar. It can operate in three modes, determined by command line options.
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>To use the <code>jjdoc</code> task, set the <var>target</var> attribute to the name of the JavaCC
|
|
|
|
grammar file to process. You also need to specify the directory containing the JavaCC installation
|
|
|
|
using the <var>javacchome</var> attribute, so that Ant can find the JavaCC classes. Optionally, you
|
|
|
|
can also set the <var>outputfile</var> to write the generated BNF documentation file to a specific
|
|
|
|
(directory and) file. Otherwise <code>jjdoc</code> writes the generated BNF documentation file as
|
|
|
|
the JavaCC grammar file with a suffix <samp>.txt</samp> or <samp>.html</samp>.</p>
|
|
|
|
<p>This task only invokes <code>JJDoc</code> if the grammar file is newer than the generated BNF
|
|
|
|
documentation file.</p>
|
2003-07-23 14:12:12 +00:00
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2003-07-23 14:12:12 +00:00
|
|
|
<tr>
|
2018-05-15 10:29:27 +02:00
|
|
|
<th scope="col">Attribute</th>
|
|
|
|
<th scope="col">Description</th>
|
|
|
|
<th scope="col">Required</th>
|
2003-07-23 14:12:12 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>target</td>
|
|
|
|
<td>The JavaCC grammar file to process.</td>
|
|
|
|
<td>Yes</td>
|
2003-07-23 14:12:12 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>javacchome</td>
|
|
|
|
<td>The directory containing the JavaCC distribution.</td>
|
|
|
|
<td>Yes</td>
|
2003-07-23 14:12:12 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>outputfile</td>
|
|
|
|
<td>The file to write the generated BNF documentation file to. If not set, the file is written
|
|
|
|
with the same name as the JavaCC grammar file but with a the suffix <samp>.html</samp>
|
|
|
|
or <samp>.txt</samp></td>
|
|
|
|
<td>No</td>
|
2003-07-23 14:12:12 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>text</td>
|
|
|
|
<td>Sets the TEXT BNF documentation option. This is a boolean option.</td>
|
|
|
|
<td>No</td>
|
2003-07-23 14:12:12 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>onetable</td>
|
|
|
|
<td>Sets the ONE_TABLE BNF documentation option. This is a boolean option.</td>
|
|
|
|
<td>No</td>
|
2003-07-23 14:12:12 +00:00
|
|
|
</tr>
|
2018-02-09 06:54:03 +01:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>maxmemory</td>
|
|
|
|
<td>Max amount of memory to allocate to the forked JVM. <em>since Ant 1.8.3</em></td>
|
|
|
|
<td>No</td>
|
2011-01-05 11:18:26 +00:00
|
|
|
</tr>
|
2003-07-23 14:12:12 +00:00
|
|
|
</table>
|
|
|
|
|
2018-02-09 06:54:03 +01:00
|
|
|
<h3>Example</h3>
|
2003-07-23 14:12:12 +00:00
|
|
|
|
2018-05-15 09:51:58 +02:00
|
|
|
<p>Invoke JJDoc on grammar file <samp>src/Parser.jj</samp>, writing the generated BNF documentation
|
|
|
|
file, <samp>ParserBNF.html</samp>, to <samp>doc</samp>.</p>
|
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<pre>
|
|
|
|
<jjdoc target="src/Parser.jj"
|
|
|
|
outputfile="doc/ParserBNF.html"
|
|
|
|
javacchome="c:/program files/JavaCC"/></pre>
|
2018-02-09 06:54:03 +01:00
|
|
|
|
2003-07-23 14:12:12 +00:00
|
|
|
</body>
|
|
|
|
</html>
|