1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--NewPage-->
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Generated by javadoc on Mon Jun 17 10:56:34 EDT 2002 -->
<title>W3C Flute version 1.3 - Java API: Class Token</title>
<link rel="stylesheet" type="text/css" href=
"../../../../stylesheet.css" title="Style" />
</head>
<body bgcolor="white">
<!-- ========== START OF NAVBAR ========== -->
<a id="navbar_top" name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan="2" bgcolor="#EEEEFF" class="NavBarCell1"><a id=
"navbar_top_firstrow" name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
<tr align="center" valign="top">
<td bgcolor="#EEEEFF" class="NavBarCell1"><a href=
"../../../../index.html"><span class=
"NavBarFont1"><b>Overview</b></span></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"><a href=
"package-summary.html"><span class=
"NavBarFont1"><b>Package</b></span></a> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> <span class=
"NavBarFont1Rev"><b>Class</b></span> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"><a href=
"package-tree.html"><span class=
"NavBarFont1"><b>Tree</b></span></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"><a href=
"../../../../index-all.html"><span class=
"NavBarFont1"><b>Index</b></span></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"><a href=
"../../../../help-doc.html"><span class=
"NavBarFont1"><b>Help</b></span></a> </td>
</tr>
</table>
</td>
<td align="right" valign="top" rowspan="3"><em><a href=
'http://www.w3.org/'><img border='0' src=
'http://www.w3.org/Icons/w3c_home' alt='W3C logo' /></a></em> </td>
</tr>
<tr>
<td bgcolor="white" class="NavBarCell2"> <a href=
"../../../../org/w3c/flute/parser/ParserTokenManager.html"><b>PREV
CLASS</b></a> NEXT CLASS</td>
<td bgcolor="white" class="NavBarCell2"></td>
</tr>
<tr>
<td valign="top" class="NavBarCell3">SUMMARY:
INNER | <a href=
"#field_summary">FIELD</a> | <a href=
"#constructor_summary">CONSTR</a> | <a href=
"#method_summary">METHOD</a></td>
<td valign="top" class="NavBarCell3">DETAIL: <a href=
"#field_detail">FIELD</a> | <a href=
"#constructor_detail">CONSTR</a> | <a href=
"#method_detail">METHOD</a></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->
<hr />
<!-- ======== START OF CLASS DATA ======== -->
<h2>org.w3c.flute.parser<br />
Class Token</h2>
<pre>
java.lang.Object
|
+--<b>org.w3c.flute.parser.Token</b>
</pre>
<hr />
<dl>
<dt>public class <b>Token</b></dt>
<dt>extends java.lang.Object</dt>
</dl>
<p>Describes the input token stream.</p>
<hr />
<p><!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<a id="field_summary" name="field_summary"><!-- --></a></p>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="2"><b>Field Summary</b></td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<code> int</code></td>
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#beginColumn">beginColumn</a></b></code>
<br />
beginLine
and beginColumn describe the position of the first character of
this token; endLine and endColumn describe the position of the last
character of this token.</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<code> int</code></td>
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#beginLine">beginLine</a></b></code>
<br />
beginLine
and beginColumn describe the position of the first character of
this token; endLine and endColumn describe the position of the last
character of this token.</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<code> int</code></td>
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#endColumn">endColumn</a></b></code>
<br />
beginLine
and beginColumn describe the position of the first character of
this token; endLine and endColumn describe the position of the last
character of this token.</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<code> int</code></td>
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#endLine">endLine</a></b></code>
<br />
beginLine
and beginColumn describe the position of the first character of
this token; endLine and endColumn describe the position of the last
character of this token.</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<code> java.lang.String</code></td>
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#image">image</a></b></code>
<br />
The
string image of the token.</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<code> int</code></td>
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#kind">kind</a></b></code>
<br />
An
integer that describes the kind of this token.</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%"><code> <a href=
"../../../../org/w3c/flute/parser/Token.html">Token</a></code></td>
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#next">next</a></b></code>
<br />
A
reference to the next regular (non-special) token from the input
stream.</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%"><code> <a href=
"../../../../org/w3c/flute/parser/Token.html">Token</a></code></td>
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#specialToken">specialToken</a></b></code>
<br />
This
field is used to access special tokens that occur prior to this
token, but after the immediately preceding regular (non-special)
token.</td>
</tr>
</table>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<a id="constructor_summary" name="constructor_summary">
<!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="2"><b>Constructor Summary</b></td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#Token__">Token</a></b>()</code>
<br />
</td>
</tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<a id="method_summary" name="method_summary"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="2"><b>Method Summary</b></td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%"><code>static <a
href=
"../../../../org/w3c/flute/parser/Token.html">Token</a></code></td>
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#newToken_int_">newToken</a></b>(int ofKind)</code>
<br />
Returns
a new Token object, by default.</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<code> java.lang.String</code></td>
<td><code><b><a href=
"../../../../org/w3c/flute/parser/Token.html#toString__">toString</a></b>()</code>
<br />
Returns
the image.</td>
</tr>
</table>
<a id="methods_inherited_from_class_java.lang.Object" name=
"methods_inherited_from_class_java.lang.Object"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#EEEEFF" class="TableSubHeadingColor">
<td><b>Methods inherited from class java.lang.Object</b></td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td><code>clone, equals, finalize, getClass, hashCode, notify,
notifyAll, wait, wait, wait</code></td>
</tr>
</table>
<p><!-- ============ FIELD DETAIL =========== -->
<a id="field_detail" name="field_detail"><!-- --></a></p>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="1"><b>Field Detail</b></td>
</tr>
</table>
<a id="beginColumn" name="beginColumn"><!-- --></a>
<h3>beginColumn</h3>
<pre>
public int <b>beginColumn</b>
</pre>
<dl>
<dd>beginLine and beginColumn describe the position of the first
character of this token; endLine and endColumn describe the
position of the last character of this token.</dd>
</dl>
<hr />
<a id="beginLine" name="beginLine"><!-- --></a>
<h3>beginLine</h3>
<pre>
public int <b>beginLine</b>
</pre>
<dl>
<dd>beginLine and beginColumn describe the position of the first
character of this token; endLine and endColumn describe the
position of the last character of this token.</dd>
</dl>
<hr />
<a id="endColumn" name="endColumn"><!-- --></a>
<h3>endColumn</h3>
<pre>
public int <b>endColumn</b>
</pre>
<dl>
<dd>beginLine and beginColumn describe the position of the first
character of this token; endLine and endColumn describe the
position of the last character of this token.</dd>
</dl>
<hr />
<a id="endLine" name="endLine"><!-- --></a>
<h3>endLine</h3>
<pre>
public int <b>endLine</b>
</pre>
<dl>
<dd>beginLine and beginColumn describe the position of the first
character of this token; endLine and endColumn describe the
position of the last character of this token.</dd>
</dl>
<hr />
<a id="image" name="image"><!-- --></a>
<h3>image</h3>
<pre>
public java.lang.String <b>image</b>
</pre>
<dl>
<dd>The string image of the token.</dd>
</dl>
<hr />
<a id="kind" name="kind"><!-- --></a>
<h3>kind</h3>
<pre>
public int <b>kind</b>
</pre>
<dl>
<dd>An integer that describes the kind of this token. This
numbering system is determined by JavaCCParser, and a table of
these numbers is stored in the file ...Constants.java.</dd>
</dl>
<hr />
<a id="next" name="next"><!-- --></a>
<h3>next</h3>
<pre>
public <a href=
"../../../../org/w3c/flute/parser/Token.html">Token</a> <b>next</b>
</pre>
<dl>
<dd>A reference to the next regular (non-special) token from the
input stream. If this is the last token from the input stream, or
if the token manager has not read tokens beyond this one, this
field is set to null. This is true only if this token is also a
regular token. Otherwise, see below for a description of the
contents of this field.</dd>
</dl>
<hr />
<a id="specialToken" name="specialToken"><!-- --></a>
<h3>specialToken</h3>
<pre>
public <a href=
"../../../../org/w3c/flute/parser/Token.html">Token</a> <b>specialToken</b>
</pre>
<dl>
<dd>This field is used to access special tokens that occur prior to
this token, but after the immediately preceding regular
(non-special) token. If there are no such special tokens, this
field is set to null. When there are more than one such special
token, this field refers to the last of these special tokens, which
in turn refers to the next previous special token through its
specialToken field, and so on until the first special token (whose
specialToken field is null). The next fields of special tokens
refer to other special tokens that immediately follow it (without
an intervening regular token). If there is no such token, this
field is null.</dd>
</dl>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<a id="constructor_detail" name="constructor_detail"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="1"><b>Constructor Detail</b></td>
</tr>
</table>
<a id="Token__" name="Token__"><!-- --></a>
<h3>Token</h3>
<pre>
public <b>Token</b>()
</pre>
<!-- ============ METHOD DETAIL ========== -->
<a id="method_detail" name="method_detail"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="1"><b>Method Detail</b></td>
</tr>
</table>
<a id="newToken_int_" name="newToken_int_"><!-- --></a>
<h3>newToken</h3>
<pre>
public static final <a href=
"../../../../org/w3c/flute/parser/Token.html">Token</a> <b>newToken</b>(int ofKind)
</pre>
<dl>
<dd>Returns a new Token object, by default. However, if you want,
you can create and return subclass objects based on the value of
ofKind. Simply add the cases to the switch for all those special
cases. For example, if you have a subclass of Token called IDToken
that you want to create if ofKind is ID, simlpy add something like
: case MyParserConstants.ID : return new IDToken(); to the
following switch statement. Then you can cast matchedToken variable
to the appropriate type and use it in your lexical actions.</dd>
</dl>
<hr />
<a id="toString__" name="toString__"><!-- --></a>
<h3>toString</h3>
<pre>
public final java.lang.String <b>toString</b>()
</pre>
<dl>
<dd>Returns the image.</dd>
<dd>
<dl>
<dt><b>Overrides:</b></dt>
<dd><code>toString</code> in class
<code>java.lang.Object</code></dd>
</dl>
</dd>
</dl>
<!-- ========= END OF CLASS DATA ========= -->
<hr />
<!-- ========== START OF NAVBAR ========== -->
<a id="navbar_bottom" name="navbar_bottom"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan="2" bgcolor="#EEEEFF" class="NavBarCell1"><a id=
"navbar_bottom_firstrow" name="navbar_bottom_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
<tr align="center" valign="top">
<td bgcolor="#EEEEFF" class="NavBarCell1"><a href=
"../../../../index.html"><span class=
"NavBarFont1"><b>Overview</b></span></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"><a href=
"package-summary.html"><span class=
"NavBarFont1"><b>Package</b></span></a> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> <span class=
"NavBarFont1Rev"><b>Class</b></span> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"><a href=
"package-tree.html"><span class=
"NavBarFont1"><b>Tree</b></span></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"><a href=
"../../../../index-all.html"><span class=
"NavBarFont1"><b>Index</b></span></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"><a href=
"../../../../help-doc.html"><span class=
"NavBarFont1"><b>Help</b></span></a> </td>
</tr>
</table>
</td>
<td align="right" valign="top" rowspan="3"></td>
</tr>
<tr>
<td bgcolor="white" class="NavBarCell2"> <a href=
"../../../../org/w3c/flute/parser/ParserTokenManager.html"><b>PREV
CLASS</b></a> NEXT CLASS</td>
<td bgcolor="white" class="NavBarCell2"></td>
</tr>
<tr>
<td valign="top" class="NavBarCell3">SUMMARY:
INNER | <a href=
"#field_summary">FIELD</a> | <a href=
"#constructor_summary">CONSTR</a> | <a href=
"#method_summary">METHOD</a></td>
<td valign="top" class="NavBarCell3">DETAIL: <a href=
"#field_detail">FIELD</a> | <a href=
"#constructor_detail">CONSTR</a> | <a href=
"#method_detail">METHOD</a></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->
<hr />
<p><small><a rel='Copyright' href=
'http://www.w3.org/Consortium/Legal/ipr-notice\#Copyright'>Copyright</a>
© 2002 <a href='http://www.w3.org/'><abbr title=
'World Wide Web Consortium'>W3C</abbr></a><sup>®</sup> (<a
href='http://www.lcs.mit.edu/'><abbr title=
'Massachusetts Institute of Technology'>MIT</abbr></a>, <a href=
'http://www.inria.fr/'><abbr lang='fr' xml:lang="fr" title=
'Institut National de Recherche en Informatique et Automatique'>INRIA</abbr></a>,
<a href='http://www.keio.ac.jp/'>Keio</a>), All Rights Reserved.
W3C <a href=
'http://www.w3.org/Consortium/Legal/ipr-notice\#Legal_Disclaimer'>liability</a>,
<a href=
'http://www.w3.org/Consortium/Legal/ipr-notice\#W3C_Trademarks'>trademark</a>,
<a rel='Copyright' href=
'http://www.w3.org/Consortium/Legal/copyright-documents'>document
use</a> and <a rel='Copyright' href=
'http://www.w3.org/Consortium/Legal/copyright-software'>software
licensing</a> rules apply. Your interactions with this site are in
accordance with our <a href=
'http://www.w3.org/Consortium/Legal/privacy-statement\#Public'>public</a>
and <a href=
'http://www.w3.org/Consortium/Legal/privacy-statement\#Members'>Member</a>
privacy statements.</small></p>
</body>
</html>
|