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
|
---|
33 | for the JavaCC compiler compiler. It takes a JavaCC parser specification
|
---|
34 | and produces documentation for the BNF grammar.
|
---|
35 | It 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
|
---|
37 | of the JavaCC grammar file to process. You also need to specify the directory
|
---|
38 | containing the JavaCC installation using the <i>javacchome</i> attribute,
|
---|
39 | so 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.
|
---|
41 | Otherwise jjdoc writes the generated BNF documentation file as the JavaCC
|
---|
42 | grammar file with a suffix .txt or .html.</p>
|
---|
43 | <p>This task only invokes JJDoc if the grammar file is newer than the
|
---|
44 | generated 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,
|
---|
77 | the file is written with the same name as the JavaCC grammar file but with a the suffix .html or .txt. </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
|
---|
86 | option.</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>
|
---|
101 | Example</h3>
|
---|
102 |
|
---|
103 | <blockquote>
|
---|
104 | <pre><jjdoc
|
---|
105 | target="src/Parser.jj"
|
---|
106 | outputfile="doc/ParserBNF.html"
|
---|
107 | javacchome="c:/program files/JavaCC"
|
---|
108 | /></pre>
|
---|
109 | </blockquote>
|
---|
110 | This invokes JJDoc on grammar file src/Parser.jj, writing the generated
|
---|
111 | BNF documentation file, ParserBNF.html, file to doc.
|
---|
112 | <br>
|
---|
113 |
|
---|
114 | </body>
|
---|
115 | </html>
|
---|
116 |
|
---|