You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

jjdoc.html 3.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
  16. <html>
  17. <head>
  18. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  19. <meta http-equiv="Content-Language" content="en-us">
  20. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  21. <title>JJDoc Task</title>
  22. </head>
  23. <body>
  24. <h2>
  25. <a NAME="jjtree"></a>JJDoc</h2>
  26. <p><em>Since Ant 1.6</em></p>
  27. <h3>Description</h3>
  28. <p>Invokes the <a href="http://javacc.dev.java.net/">JJDoc</a> preprocessor
  29. for the JavaCC compiler compiler. It takes a JavaCC parser specification
  30. and produces documentation for the BNF grammar.
  31. It can operate in three modes, determined by command line options.
  32. <p>To use the jjdoc task, set the <i>target</i> attribute to the name
  33. of the JavaCC grammar file to process. You also need to specify the directory
  34. containing the JavaCC installation using the <i>javacchome</i> attribute,
  35. so that ant can find the JavaCC classes. Optionally, you can also set the
  36. <i>outputfile</i> to write the generated BNF documentation file to a specific (directory and) file.
  37. Otherwise jjdoc writes the generated BNF documentation file as the JavaCC
  38. grammar file with a suffix .txt or .html.</p>
  39. <p>This task only invokes JJDoc if the grammar file is newer than the
  40. generated BNF documentation file.</p>
  41. <h3>Parameters</h3>
  42. <table BORDER CELLSPACING=0 CELLPADDING=2 >
  43. <tr>
  44. <td VALIGN=TOP><b>Attribute</b></td>
  45. <td VALIGN=TOP><b>Description</b></td>
  46. <td ALIGN=CENTER VALIGN=TOP><b>Required</b></td>
  47. </tr>
  48. <tr>
  49. <td VALIGN=TOP>target</td>
  50. <td VALIGN=TOP>The javacc grammar file to process.</td>
  51. <td ALIGN=CENTER VALIGN=TOP>Yes</td>
  52. </tr>
  53. <tr>
  54. <td VALIGN=TOP>javacchome</td>
  55. <td VALIGN=TOP>The directory containing the JavaCC distribution.</td>
  56. <td ALIGN=CENTER VALIGN=TOP>Yes</td>
  57. </tr>
  58. <tr>
  59. <td VALIGN=TOP>outputfile</td>
  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.&nbsp;</td>
  62. <td ALIGN=CENTER VALIGN=TOP>No</td>
  63. </tr>
  64. <tr>
  65. <td VALIGN=TOP>text</td>
  66. <td VALIGN=TOP>Sets the TEXT BNF documentation option. This is a boolean
  67. option.</td>
  68. <td ALIGN=CENTER VALIGN=TOP>No</td>
  69. </tr>
  70. <tr>
  71. <td VALIGN=TOP>onetable</td>
  72. <td VALIGN=TOP>Sets the ONE_TABLE BNF documentation option. This is a boolean option.</td>
  73. <td ALIGN=CENTER VALIGN=TOP>No</td>
  74. </tr>
  75. </table>
  76. <h3>
  77. Example</h3>
  78. <blockquote>
  79. <pre>&lt;jjdoc&nbsp;
  80. &nbsp;&nbsp;&nbsp; target="src/Parser.jj"&nbsp;
  81. &nbsp;&nbsp;&nbsp; outputfile="doc/ParserBNF.html"
  82. &nbsp;&nbsp;&nbsp; javacchome="c:/program files/JavaCC"&nbsp;
  83. /&gt;</pre>
  84. </blockquote>
  85. This invokes JJDoc on grammar file src/Parser.jj, writing the generated
  86. BNF documentation file, ParserBNF.html, file to doc.
  87. <br>
  88. </body>
  89. </html>