Revision 36624 trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/parser/Token.java
Token.java | ||
---|---|---|
1 |
/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
|
|
1 |
/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ |
|
2 | 2 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana |
3 | 3 |
* |
4 | 4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
... | ... | |
38 | 38 |
* |
39 | 39 |
* +34 963163400 |
40 | 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 |
} |
|
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 |
} |
Also available in: Unified diff