source: release-kits/lirk3/bin/ant-installer/web/manual1.7.0/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: 3.5 KB
Line 
1<!--
2 Licensed to the Apache Software Foundation (ASF) under one or more
3 contributor license agreements. See the NOTICE file distributed with
4 this work for additional information regarding copyright ownership.
5 The ASF licenses this file to You under the Apache License, Version 2.0
6 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
18<html>
19<head>
20 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
21 <meta http-equiv="Content-Language" content="en-us">
22 <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
23<title>JJDoc Task</title>
24</head>
25<body>
26
27<h2>
28<a NAME="jjtree"></a>JJDoc</h2>
29<p><em>Since Ant 1.6</em></p>
30<h3>Description</h3>
31
32<p>Invokes the <a href="http://javacc.dev.java.net/">JJDoc</a> preprocessor
33for the JavaCC compiler compiler. It takes a JavaCC parser specification
34and produces documentation for the BNF grammar.
35It can operate in three modes, determined by command line options.
36<p>To use the jjdoc task, set the <i>target</i> attribute to the name
37of the JavaCC grammar file to process. You also need to specify the directory
38containing the JavaCC installation using the <i>javacchome</i> attribute,
39so that ant can find the JavaCC classes. Optionally, you can also set the
40<i>outputfile</i> to write the generated BNF documentation file to a specific (directory and) file.
41Otherwise jjdoc writes the generated BNF documentation file as the JavaCC
42grammar file with a suffix .txt or .html.</p>
43<p>This task only invokes JJDoc if the grammar file is newer than the
44generated BNF documentation file.</p>
45
46<h3>Parameters</h3>
47
48<table BORDER CELLSPACING=0 CELLPADDING=2 >
49<tr>
50<td VALIGN=TOP><b>Attribute</b></td>
51
52<td VALIGN=TOP><b>Description</b></td>
53
54<td ALIGN=CENTER VALIGN=TOP><b>Required</b></td>
55</tr>
56
57<tr>
58<td VALIGN=TOP>target</td>
59
60<td VALIGN=TOP>The javacc grammar file to process.</td>
61
62<td ALIGN=CENTER VALIGN=TOP>Yes</td>
63</tr>
64
65<tr>
66<td VALIGN=TOP>javacchome</td>
67
68<td VALIGN=TOP>The directory containing the JavaCC distribution.</td>
69
70<td ALIGN=CENTER VALIGN=TOP>Yes</td>
71</tr>
72
73<tr>
74<td VALIGN=TOP>outputfile</td>
75
76<td VALIGN=TOP>The file to write the generated BNF documentation file to. If not set,
77the file is written with the same name as the JavaCC grammar file but with a the suffix .html or .txt.&nbsp;</td>
78
79<td ALIGN=CENTER VALIGN=TOP>No</td>
80</tr>
81
82<tr>
83<td VALIGN=TOP>text</td>
84
85<td VALIGN=TOP>Sets the TEXT BNF documentation option. This is a boolean
86option.</td>
87
88<td ALIGN=CENTER VALIGN=TOP>No</td>
89</tr>
90
91<tr>
92<td VALIGN=TOP>onetable</td>
93
94<td VALIGN=TOP>Sets the ONE_TABLE BNF documentation option. This is a boolean option.</td>
95
96<td ALIGN=CENTER VALIGN=TOP>No</td>
97</tr>
98</table>
99
100<h3>
101Example</h3>
102
103<blockquote>
104<pre>&lt;jjdoc&nbsp;
105&nbsp;&nbsp;&nbsp; target="src/Parser.jj"&nbsp;
106&nbsp;&nbsp;&nbsp; outputfile="doc/ParserBNF.html"
107&nbsp;&nbsp;&nbsp; javacchome="c:/program files/JavaCC"&nbsp;
108/&gt;</pre>
109</blockquote>
110This invokes JJDoc on grammar file src/Parser.jj, writing the generated
111BNF documentation file, ParserBNF.html, file to doc.
112<br>
113
114</body>
115</html>
116
Note: See TracBrowser for help on using the repository browser.