svn-gvsig-desktop / trunk / extensions / extSymbology / src / org / gvsig / symbology / fmap / rendering / filter / parser / Token.java @ 36624
History | View | Annotate | Download (3.87 KB)
1 |
/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
|
---|---|
2 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
|
3 |
*
|
4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
19 |
*
|
20 |
* For more information, contact:
|
21 |
*
|
22 |
* Generalitat Valenciana
|
23 |
* Conselleria d'Infraestructures i Transport
|
24 |
* Av. Blasco Ib��ez, 50
|
25 |
* 46010 VALENCIA
|
26 |
* SPAIN
|
27 |
*
|
28 |
* +34 963862235
|
29 |
* gvsig@gva.es
|
30 |
* www.gvsig.gva.es
|
31 |
*
|
32 |
* or
|
33 |
*
|
34 |
* IVER T.I. S.A
|
35 |
* Salamanca 50
|
36 |
* 46005 Valencia
|
37 |
* Spain
|
38 |
*
|
39 |
* +34 963163400
|
40 |
* dac@iver.es
|
41 |
*/
|
42 |
package org.gvsig.symbology.fmap.rendering.filter.parser; |
43 |
|
44 |
/**
|
45 |
* Describes the input token stream.
|
46 |
*/
|
47 |
|
48 |
public class Token { |
49 |
|
50 |
/**
|
51 |
* An integer that describes the kind of this token. This numbering
|
52 |
* system is determined by JavaCCParser, and a table of these numbers is
|
53 |
* stored in the file ...Constants.java.
|
54 |
*/
|
55 |
public int kind; |
56 |
|
57 |
/**
|
58 |
* beginLine and beginColumn describe the position of the first character
|
59 |
* of this token; endLine and endColumn describe the position of the
|
60 |
* last character of this token.
|
61 |
*/
|
62 |
public int beginLine, beginColumn, endLine, endColumn; |
63 |
|
64 |
/**
|
65 |
* The string image of the token.
|
66 |
*/
|
67 |
public String image; |
68 |
|
69 |
/**
|
70 |
* A reference to the next regular (non-special) token from the input
|
71 |
* stream. If this is the last token from the input stream, or if the
|
72 |
* token manager has not read tokens beyond this one, this field is
|
73 |
* set to null. This is true only if this token is also a regular
|
74 |
* token. Otherwise, see below for a description of the contents of
|
75 |
* this field.
|
76 |
*/
|
77 |
public Token next;
|
78 |
|
79 |
/**
|
80 |
* This field is used to access special tokens that occur prior to this
|
81 |
* token, but after the immediately preceding regular (non-special) token.
|
82 |
* If there are no such special tokens, this field is set to null.
|
83 |
* When there are more than one such special token, this field refers
|
84 |
* to the last of these special tokens, which in turn refers to the next
|
85 |
* previous special token through its specialToken field, and so on
|
86 |
* until the first special token (whose specialToken field is null).
|
87 |
* The next fields of special tokens refer to other special tokens that
|
88 |
* immediately follow it (without an intervening regular token). If there
|
89 |
* is no such token, this field is null.
|
90 |
*/
|
91 |
public Token specialToken;
|
92 |
|
93 |
/**
|
94 |
* Returns the image.
|
95 |
*/
|
96 |
public String toString() |
97 |
{ |
98 |
return image;
|
99 |
} |
100 |
|
101 |
/**
|
102 |
* Returns a new Token object, by default. However, if you want, you
|
103 |
* can create and return subclass objects based on the value of ofKind.
|
104 |
* Simply add the cases to the switch for all those special cases.
|
105 |
* For example, if you have a subclass of Token called IDToken that
|
106 |
* you want to create if ofKind is ID, simlpy add something like :
|
107 |
*
|
108 |
* case MyParserConstants.ID : return new IDToken();
|
109 |
*
|
110 |
* to the following switch statement. Then you can cast matchedToken
|
111 |
* variable to the appropriate type and use it in your lexical actions.
|
112 |
*/
|
113 |
public static final Token newToken(int ofKind) |
114 |
{ |
115 |
switch(ofKind)
|
116 |
{ |
117 |
default : return new Token(); |
118 |
} |
119 |
} |
120 |
|
121 |
} |