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 2.8 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. </head>
  8. <body>
  9. <h2>
  10. <a NAME="jjtree"></a>JJDoc</h2>
  11. <p><em>Since Ant 1.6</em></p>
  12. <h3>Description</h3>
  13. <p>Invokes the <a href="http://javacc.dev.java.net/">JJDoc</a> preprocessor
  14. for the JavaCC compiler compiler. It takes a JavaCC parser specification
  15. and produces documentation for the BNF grammar.
  16. It can operate in three modes, determined by command line options.
  17. <p>To use the jjdoc task, set the <i>target</i> attribute to the name
  18. of the JavaCC grammar file to process. You also need to specify the directory
  19. containing the JavaCC installation using the <i>javacchome</i> attribute,
  20. so that ant can find the JavaCC classes. Optionally, you can also set the
  21. <i>outputfile</i> to write the generated BNF documentation file to a specific (directory and) file.
  22. Otherwise jjdoc writes the generated BNF documentation file as the JavaCC
  23. grammar file with a suffix .txt or .html.</p>
  24. <p>This task only invokes JJDoc if the grammar file is newer than the
  25. generated BNF documentation file.</p>
  26. <h3>Parameters</h3>
  27. <table BORDER CELLSPACING=0 CELLPADDING=2 >
  28. <tr>
  29. <td VALIGN=TOP><b>Attribute</b></td>
  30. <td VALIGN=TOP><b>Description</b></td>
  31. <td ALIGN=CENTER VALIGN=TOP><b>Required</b></td>
  32. </tr>
  33. <tr>
  34. <td VALIGN=TOP>target</td>
  35. <td VALIGN=TOP>The javacc grammar file to process.</td>
  36. <td ALIGN=CENTER VALIGN=TOP>Yes</td>
  37. </tr>
  38. <tr>
  39. <td VALIGN=TOP>javacchome</td>
  40. <td VALIGN=TOP>The directory containing the JavaCC distribution.</td>
  41. <td ALIGN=CENTER VALIGN=TOP>Yes</td>
  42. </tr>
  43. <tr>
  44. <td VALIGN=TOP>outputfile</td>
  45. <td VALIGN=TOP>The file to write the generated BNF documentation file to. If not set,
  46. the file is written with the same name as the JavaCC grammar file but with a the suffix .html or .txt.&nbsp;</td>
  47. <td ALIGN=CENTER VALIGN=TOP>No</td>
  48. </tr>
  49. <tr>
  50. <td VALIGN=TOP>text</td>
  51. <td VALIGN=TOP>Sets the TEXT BNF documentation option. This is a boolean
  52. option.</td>
  53. <td ALIGN=CENTER VALIGN=TOP>No</td>
  54. </tr>
  55. <tr>
  56. <td VALIGN=TOP>onetable</td>
  57. <td VALIGN=TOP>Sets the ONE_TABLE BNF documentation option. This is a boolean option.</td>
  58. <td ALIGN=CENTER VALIGN=TOP>No</td>
  59. </tr>
  60. </table>
  61. <h3>
  62. Example</h3>
  63. <blockquote>
  64. <pre>&lt;jjdoc&nbsp;
  65. &nbsp;&nbsp;&nbsp; target="src/Parser.jj"&nbsp;
  66. &nbsp;&nbsp;&nbsp; outputfile="doc/ParserBNF.html"
  67. &nbsp;&nbsp;&nbsp; javacchome="c:/program files/JavaCC"&nbsp;
  68. /&gt;</pre>
  69. </blockquote>
  70. This invokes JJDoc on grammar file src/Parser.jj, writing the generated
  71. BNF documentation file, ParserBNF.html, file to doc.
  72. <br>
  73. <hr>
  74. <p align="center">Copyright &copy; 2003-2004 The Apache Software Foundation. All rights
  75. Reserved.</p>
  76. </body>
  77. </html>