~ubuntu-branches/ubuntu/jaunty/ant/jaunty-proposed

« back to all changes in this revision

Viewing changes to docs/manual/OptionalTasks/javacc.html

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Gybas
  • Date: 2002-02-14 14:28:48 UTC
  • Revision ID: james.westby@ubuntu.com-20020214142848-2ww7ynmqkj31vlmn
Tags: upstream-1.4.1
ImportĀ upstreamĀ versionĀ 1.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
 
 
3
<head>
 
4
<meta http-equiv="Content-Language" content="en-us">
 
5
<title>JavaCC Task</title>
 
6
</head>
 
7
 
 
8
<body>
 
9
 
 
10
<h2><a name="javacc">JavaCC</a></h2>
 
11
<h3>Description</h3> 
 
12
<p>
 
13
  Invokes the <a HREF="http://www.metamata.com/javacc/" target="_top">JavaCC</a> compiler 
 
14
  compiler on a grammar file.
 
15
</p>
 
16
<p>
 
17
  To use the javacc task, set the <i>target</i> attribute to the name of the 
 
18
  grammar file to process.  You also need to specify the directory containing 
 
19
  the JavaCC installation using the <i>javacchome</i> attribute, so that ant 
 
20
  can find the JavaCC classes.  Optionally, you can also set the 
 
21
  <i>outputdirectory</i> to write the generated file to a specific directory.
 
22
  Otherwise javacc writes the generated files to the directory containing
 
23
  the grammar file.
 
24
</p>
 
25
<p>
 
26
  This task only invokes JavaCC if the grammar file is newer than the generated 
 
27
  Java files.  javacc assumes that the Java class name of the generated parser
 
28
  is the same as the name of the grammar file, ignoring the .jj.
 
29
  If this is not the case, the javacc task will still work, but it will always 
 
30
  generate the output files.
 
31
</p>
 
32
 
 
33
<h3>Parameters</h3>
 
34
<table border="1" cellpadding="2" cellspacing="0">
 
35
  <tr>
 
36
    <td valign="top"><b>Attribute</b></td>
 
37
    <td valign="top"><b>Description</b></td>
 
38
    <td align="center" valign="top"><b>Required</b></td>
 
39
  </tr>
 
40
  <tr>
 
41
    <td valign="top">target</td>
 
42
    <td valign="top">The grammar file to process.</td>
 
43
    <td valign="top" align="center">Yes</td>
 
44
  </tr>
 
45
  <tr>
 
46
    <td valign="top">javacchome</td>
 
47
    <td valign="top">The directory containing the JavaCC distribution.</td>
 
48
    <td valign="top" align="center">Yes</td>
 
49
  </tr>
 
50
  <tr>
 
51
    <td valign="top">outputdirectory</td>
 
52
    <td valign="top">
 
53
      The directory to write the generated files to.  If not set, the files
 
54
      are written to the directory containing the grammar file.
 
55
    </td>
 
56
    <td valign="top" align="center">No</td>
 
57
  </tr>
 
58
  <tr>
 
59
    <td valign="top">buildparser</td>
 
60
    <td valign="top">Sets the BUILD_PARSER grammar option.  This is a boolean option.</td>
 
61
    <td valign="top" align="center">No</td>
 
62
  </tr>
 
63
  <tr>
 
64
    <td valign="top">buildtokenmanager</td>
 
65
    <td valign="top">Sets the BUILD_TOKEN_MANAGER grammar option.  This is a boolean option.</td>
 
66
    <td valign="top" align="center">No</td>
 
67
  </tr>
 
68
  <tr>
 
69
    <td valign="top">cachetokens</td>
 
70
    <td valign="top">Sets the CACHE_TOKENS grammar option.  This is a boolean option.</td>
 
71
    <td valign="top" align="center">No</td>
 
72
  </tr>
 
73
  <tr>
 
74
    <td valign="top">choiceambiguitycheck</td>
 
75
    <td valign="top">Sets the CHOICE_AMBIGUITY_CHECK grammar option.  This is an integer option.</td>
 
76
    <td valign="top" align="center">No</td>
 
77
  </tr>
 
78
  <tr>
 
79
    <td valign="top">commontokenaction</td>
 
80
    <td valign="top">Sets the COMMON_TOKEN_ACTION grammar option.  This is a boolean option.</td>
 
81
    <td valign="top" align="center">No</td>
 
82
  </tr>
 
83
  <tr>
 
84
    <td valign="top">debuglookahead</td>
 
85
    <td valign="top">Sets the DEBUG_LOOKAHEAD grammar option.  This is a boolean option.</td>
 
86
    <td valign="top" align="center">No</td>
 
87
  </tr>
 
88
  <tr>
 
89
    <td valign="top">debugparser</td>
 
90
    <td valign="top">Sets the DEBUG_PARSER grammar option.  This is a boolean option.</td>
 
91
    <td valign="top" align="center">No</td>
 
92
  </tr>
 
93
  <tr>
 
94
    <td valign="top">debugtokenmanager</td>
 
95
    <td valign="top">Sets the DEBUG_TOKEN_MANAGER grammar option.  This is a boolean option.</td>
 
96
    <td valign="top" align="center">No</td>
 
97
  </tr>
 
98
  <tr>
 
99
    <td valign="top">errorreporting</td>
 
100
    <td valign="top">Sets the ERROR_REPORTING grammar option.  This is a boolean option.</td>
 
101
    <td valign="top" align="center">No</td>
 
102
  </tr>
 
103
  <tr>
 
104
    <td valign="top">forcelacheck</td>
 
105
    <td valign="top">Sets the FORCE_LA_CHECK grammar option.  This is a boolean option.</td>
 
106
    <td valign="top" align="center">No</td>
 
107
  </tr>
 
108
  <tr>
 
109
    <td valign="top">ignorecase</td>
 
110
    <td valign="top">Sets the IGNORE_CASE grammar option.  This is a boolean option.</td>
 
111
    <td valign="top" align="center">No</td>
 
112
  </tr>
 
113
  <tr>
 
114
    <td valign="top">javaunicodeescape</td>
 
115
    <td valign="top">Sets the JAVA_UNICODE_ESCAPE grammar option.  This is a boolean option.</td>
 
116
    <td valign="top" align="center">No</td>
 
117
  </tr>
 
118
  <tr>
 
119
    <td valign="top">lookahead</td>
 
120
    <td valign="top">Sets the LOOKAHEAD grammar option.  This is an integer option.</td>
 
121
    <td valign="top" align="center">No</td>
 
122
  </tr>
 
123
  <tr>
 
124
    <td valign="top">optimizetokenmanager</td>
 
125
    <td valign="top">Sets the OPTIMIZE_TOKEN_MANAGER grammar option.  This is a boolean option.</td>
 
126
    <td valign="top" align="center">No</td>
 
127
  </tr>
 
128
  <tr>
 
129
    <td valign="top">otherambiguitycheck</td>
 
130
    <td valign="top">Sets the OTHER_AMBIGUITY_CHECK grammar option.  This is an integer option.</td>
 
131
    <td valign="top" align="center">No</td>
 
132
  </tr>
 
133
  <tr>
 
134
    <td valign="top">sanitycheck</td>
 
135
    <td valign="top">Sets the SANITY_CHECK grammar option.  This is a boolean option.</td>
 
136
    <td valign="top" align="center">No</td>
 
137
  </tr>
 
138
  <tr>
 
139
    <td valign="top">static</td>
 
140
    <td valign="top">Sets the STATIC grammar option.  This is a boolean option.</td>
 
141
    <td valign="top" align="center">No</td>
 
142
  </tr>
 
143
  <tr>
 
144
    <td valign="top">unicodeinput</td>
 
145
    <td valign="top">Sets the UNICODE_INPUT grammar option.  This is a boolean option.</td>
 
146
    <td valign="top" align="center">No</td>
 
147
  </tr>
 
148
  <tr>
 
149
    <td valign="top">usercharstream</td>
 
150
    <td valign="top">Sets the USER_CHAR_STREAM grammar option.  This is a boolean option.</td>
 
151
    <td valign="top" align="center">No</td>
 
152
  </tr>
 
153
  <tr>
 
154
    <td valign="top">usertokenmanager</td>
 
155
    <td valign="top">Sets the USER_TOKEN_MANAGER grammar option.  This is a boolean option.</td>
 
156
    <td valign="top" align="center">No</td>
 
157
  </tr>
 
158
</table>
 
159
<h3>Example</h3>
 
160
<blockquote><pre>
 
161
&lt;javacc 
 
162
    target=&quot;src/Parser.jj&quot; 
 
163
    outputdirectory=&quot;build/src&quot;
 
164
    javacchome=&quot;c:/program files/JavaCC&quot; 
 
165
    static=&quot;true&quot;
 
166
/&gt;
 
167
</pre></blockquote>
 
168
<p>
 
169
  This invokes JavaCC on grammar file src/Parser.jj, writing the generated
 
170
  files to build/src.  The grammar option STATIC is set to true when
 
171
  invoking JavaCC.
 
172
</p>
 
173
<hr>
 
174
 
 
175
<p align="center">Copyright &copy; 2000,2001 Apache Software Foundation.
 
176
All rights
 
177
Reserved.</p>
 
178
 
 
179
</body>
 
180
</html>
 
181
 
 
182