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.

antlr.html 2.0 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>ANTLR Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="antlr">ANTLR</a></h2>
  8. <h3>Description</h3>
  9. <p>
  10. Invokes the <a HREF="http://www.antlr.org/" target="_top">ANTLR</a> Translator generator
  11. on a grammar file.
  12. </p>
  13. <p>
  14. To use the ANTLR task, set the <i>target</i> attribute to the name of the
  15. grammar file to process. Optionally, you can also set the
  16. <i>outputdirectory</i> to write the generated file to a specific directory.
  17. Otherwise ANTLR writes the generated files to the directory containing
  18. the grammar file.
  19. </p>
  20. <p>
  21. This task only invokes ANTLR if the grammar file is newer than the generated
  22. files.
  23. </p>
  24. <h3>Parameters</h3>
  25. <table border="1" cellpadding="2" cellspacing="0">
  26. <tr>
  27. <td valign="top"><b>Attribute</b></td>
  28. <td valign="top"><b>Description</b></td>
  29. <td align="center" valign="top"><b>Required</b></td>
  30. </tr>
  31. <tr>
  32. <td valign="top">target</td>
  33. <td valign="top">The grammar file to process.</td>
  34. <td valign="top" align="center">Yes</td>
  35. </tr>
  36. <tr>
  37. <td valign="top">outputdirectory</td>
  38. <td valign="top">
  39. The directory to write the generated files to. If not set, the files
  40. are written to the directory containing the grammar file.
  41. </td>
  42. <td valign="top" align="center">No</td>
  43. </tr>
  44. <tr>
  45. <td valign="top">fork</td>
  46. <td valign="top">Run ANTLR in a separate VM.</td>
  47. <td align="center" valign="top">No, default is &quot;off&quot;</td>
  48. </tr>
  49. <tr>
  50. <td valign="top">dir</td>
  51. <td valign="top">The directory to invoke the VM in. (ignored if
  52. fork is disabled)</td>
  53. <td align="center" valign="top">No</td>
  54. </tr>
  55. </table>
  56. <h3>Example</h3>
  57. <blockquote><pre>
  58. &lt;antlr
  59. target=&quot;etc/java.g&quot;
  60. outputdirectory=&quot;build/src&quot;
  61. /&gt;
  62. </pre></blockquote>
  63. <p>
  64. This invokes ANTLR on grammar file etc/java.g, writing the generated
  65. files to build/src.
  66. </p>
  67. <hr>
  68. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  69. Reserved.</p>
  70. </body>
  71. </html>