source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/OptionalTasks/jjdoc.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 2.8 KB
Line 
1<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2<html>
3<head>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5 <meta http-equiv="Content-Language" content="en-us">
6 <title>JJDoc Task</title>
7<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
8</head>
9<body>
10
11<h2>
12<a NAME="jjtree"></a>JJDoc</h2>
13<p><em>Since Ant 1.6</em></p>
14<h3>Description</h3>
15
16<p>Invokes the <a href="http://javacc.dev.java.net/">JJDoc</a> preprocessor
17for the JavaCC compiler compiler. It takes a JavaCC parser specification
18and produces documentation for the BNF grammar.
19It can operate in three modes, determined by command line options.
20<p>To use the jjdoc task, set the <i>target</i> attribute to the name
21of the JavaCC grammar file to process. You also need to specify the directory
22containing the JavaCC installation using the <i>javacchome</i> attribute,
23so that ant can find the JavaCC classes. Optionally, you can also set the
24<i>outputfile</i> to write the generated BNF documentation file to a specific (directory and) file.
25Otherwise jjdoc writes the generated BNF documentation file as the JavaCC
26grammar file with a suffix .txt or .html.</p>
27<p>This task only invokes JJDoc if the grammar file is newer than the
28generated BNF documentation file.</p>
29
30<h3>Parameters</h3>
31
32<table BORDER CELLSPACING=0 CELLPADDING=2 >
33<tr>
34<td VALIGN=TOP><b>Attribute</b></td>
35
36<td VALIGN=TOP><b>Description</b></td>
37
38<td ALIGN=CENTER VALIGN=TOP><b>Required</b></td>
39</tr>
40
41<tr>
42<td VALIGN=TOP>target</td>
43
44<td VALIGN=TOP>The javacc grammar file to process.</td>
45
46<td ALIGN=CENTER VALIGN=TOP>Yes</td>
47</tr>
48
49<tr>
50<td VALIGN=TOP>javacchome</td>
51
52<td VALIGN=TOP>The directory containing the JavaCC distribution.</td>
53
54<td ALIGN=CENTER VALIGN=TOP>Yes</td>
55</tr>
56
57<tr>
58<td VALIGN=TOP>outputfile</td>
59
60<td VALIGN=TOP>The file to write the generated BNF documentation file to. If not set,
61the file is written with the same name as the JavaCC grammar file but with a the suffix .html or .txt.&nbsp;</td>
62
63<td ALIGN=CENTER VALIGN=TOP>No</td>
64</tr>
65
66<tr>
67<td VALIGN=TOP>text</td>
68
69<td VALIGN=TOP>Sets the TEXT BNF documentation option. This is a boolean
70option.</td>
71
72<td ALIGN=CENTER VALIGN=TOP>No</td>
73</tr>
74
75<tr>
76<td VALIGN=TOP>onetable</td>
77
78<td VALIGN=TOP>Sets the ONE_TABLE BNF documentation option. This is a boolean option.</td>
79
80<td ALIGN=CENTER VALIGN=TOP>No</td>
81</tr>
82</table>
83
84<h3>
85Example</h3>
86
87<blockquote>
88<pre>&lt;jjdoc&nbsp;
89&nbsp;&nbsp;&nbsp; target="src/Parser.jj"&nbsp;
90&nbsp;&nbsp;&nbsp; outputfile="doc/ParserBNF.html"
91&nbsp;&nbsp;&nbsp; javacchome="c:/program files/JavaCC"&nbsp;
92/&gt;</pre>
93</blockquote>
94This invokes JJDoc on grammar file src/Parser.jj, writing the generated
95BNF documentation file, ParserBNF.html, file to doc.
96<br>
97<hr>
98<p align="center">Copyright &copy; 2003-2004 The Apache Software Foundation. All rights
99Reserved.</p>
100</body>
101</html>
102
Note: See TracBrowser for help on using the repository browser.