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
|
---|
17 | for the JavaCC compiler compiler. It takes a JavaCC parser specification
|
---|
18 | and produces documentation for the BNF grammar.
|
---|
19 | It 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
|
---|
21 | of the JavaCC grammar file to process. You also need to specify the directory
|
---|
22 | containing the JavaCC installation using the <i>javacchome</i> attribute,
|
---|
23 | so 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.
|
---|
25 | Otherwise jjdoc writes the generated BNF documentation file as the JavaCC
|
---|
26 | grammar file with a suffix .txt or .html.</p>
|
---|
27 | <p>This task only invokes JJDoc if the grammar file is newer than the
|
---|
28 | generated 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,
|
---|
61 | the file is written with the same name as the JavaCC grammar file but with a the suffix .html or .txt. </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
|
---|
70 | option.</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>
|
---|
85 | Example</h3>
|
---|
86 |
|
---|
87 | <blockquote>
|
---|
88 | <pre><jjdoc
|
---|
89 | target="src/Parser.jj"
|
---|
90 | outputfile="doc/ParserBNF.html"
|
---|
91 | javacchome="c:/program files/JavaCC"
|
---|
92 | /></pre>
|
---|
93 | </blockquote>
|
---|
94 | This invokes JJDoc on grammar file src/Parser.jj, writing the generated
|
---|
95 | BNF documentation file, ParserBNF.html, file to doc.
|
---|
96 | <br>
|
---|
97 | <hr>
|
---|
98 | <p align="center">Copyright © 2003-2004 The Apache Software Foundation. All rights
|
---|
99 | Reserved.</p>
|
---|
100 | </body>
|
---|
101 | </html>
|
---|
102 |
|
---|