KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ext > jl > qq > Lexer_c


1 /* The following code was generated by JFlex 1.3.5 on 09/08/05 2:18 PM */
2
3 /* Java 1.4 scanner for JFlex.
4  * Based on JLS, 2ed, Chapter 3.
5  */

6
7 package polyglot.ext.jl.qq;
8
9 import java_cup.runtime.Symbol;
10 import polyglot.lex.Lexer;
11 import polyglot.lex.*;
12 import polyglot.ast.*;
13 import polyglot.util.Position;
14 import polyglot.util.InternalCompilerError;
15 import java.util.*;
16 import java.io.StringReader JavaDoc;
17 import java.math.BigInteger JavaDoc;
18
19
20 /**
21  * This class is a scanner generated by
22  * <a HREF="http://www.jflex.de/">JFlex</a> 1.3.5
23  * on 09/08/05 2:18 PM from the specification file
24  * <tt>file:/home/user/jlhotak/autobuild/resources/polyglot-1.3.2-src/src/polyglot/ext/jl/qq/qq.flex</tt>
25  */

26 public class Lexer_c implements Lexer {
27
28   /** This character denotes the end of file */
29   final public static int YYEOF = -1;
30
31   /** initial size of the lookahead buffer */
32   final private static int YY_BUFFERSIZE = 16384;
33
34   /** lexical states */
35   final public static int END_OF_LINE_COMMENT = 4;
36   final public static int STRING = 1;
37   final public static int YYINITIAL = 0;
38   final public static int CHARACTER = 2;
39   final public static int TRADITIONAL_COMMENT = 3;
40
41   /**
42    * Translates characters to character classes
43    */

44   final private static String JavaDoc yycmap_packed =
45     "\11\5\1\3\1\1\1\0\1\3\1\2\16\5\4\0\1\3\1\57"+
46     "\1\34\1\0\1\4\1\20\1\63\1\33\1\44\1\45\1\32\1\65"+
47     "\1\53\1\15\1\13\1\31\1\6\3\17\4\12\2\7\1\62\1\52"+
48     "\1\56\1\54\1\55\1\61\1\0\3\11\1\25\1\22\1\27\5\4"+
49     "\1\30\1\26\5\4\1\23\1\24\3\4\1\10\2\4\1\50\1\16"+
50     "\1\51\1\66\1\4\1\0\1\41\1\70\1\11\1\67\1\14\1\40"+
51     "\5\4\1\42\1\4\1\43\3\4\1\36\1\21\1\35\1\37\2\4"+
52     "\1\10\2\4\1\46\1\64\1\47\1\60\41\5\2\0\4\4\4\0"+
53     "\1\4\12\0\1\4\4\0\1\4\5\0\27\4\1\0\37\4\1\0"+
54     "\u0128\4\2\0\22\4\34\0\136\4\2\0\11\4\2\0\7\4\16\0"+
55     "\2\4\16\0\5\4\11\0\1\4\21\0\117\5\21\0\3\5\27\0"+
56     "\1\4\13\0\1\4\1\0\3\4\1\0\1\4\1\0\24\4\1\0"+
57     "\54\4\1\0\10\4\2\0\32\4\14\0\202\4\1\0\4\5\5\0"+
58     "\71\4\2\0\2\4\2\0\2\4\3\0\46\4\2\0\2\4\67\0"+
59     "\46\4\2\0\1\4\7\0\47\4\11\0\21\5\1\0\27\5\1\0"+
60     "\3\5\1\0\1\5\1\0\2\5\1\0\1\5\13\0\33\4\5\0"+
61     "\3\4\56\0\32\4\5\0\13\4\13\5\12\0\12\5\6\0\1\5"+
62     "\143\4\1\0\1\4\7\5\2\0\6\5\2\4\2\5\1\0\4\5"+
63     "\2\0\12\5\3\4\22\0\1\5\1\4\1\5\33\4\3\0\33\5"+
64     "\65\0\46\4\13\5\u0150\0\3\5\1\0\65\4\2\0\1\5\1\4"+
65     "\20\5\2\0\1\4\4\5\3\0\12\4\2\5\2\0\12\5\21\0"+
66     "\3\5\1\0\10\4\2\0\2\4\2\0\26\4\1\0\7\4\1\0"+
67     "\1\4\3\0\4\4\2\0\1\5\1\0\7\5\2\0\2\5\2\0"+
68     "\3\5\11\0\1\5\4\0\2\4\1\0\3\4\2\5\2\0\12\5"+
69     "\4\4\16\0\1\5\2\0\6\4\4\0\2\4\2\0\26\4\1\0"+
70     "\7\4\1\0\2\4\1\0\2\4\1\0\2\4\2\0\1\5\1\0"+
71     "\5\5\4\0\2\5\2\0\3\5\13\0\4\4\1\0\1\4\7\0"+
72     "\14\5\3\4\14\0\3\5\1\0\7\4\1\0\1\4\1\0\3\4"+
73     "\1\0\26\4\1\0\7\4\1\0\2\4\1\0\5\4\2\0\1\5"+
74     "\1\4\10\5\1\0\3\5\1\0\3\5\2\0\1\4\17\0\1\4"+
75     "\5\0\12\5\21\0\3\5\1\0\10\4\2\0\2\4\2\0\26\4"+
76     "\1\0\7\4\1\0\2\4\2\0\4\4\2\0\1\5\1\4\6\5"+
77     "\3\0\2\5\2\0\3\5\10\0\2\5\4\0\2\4\1\0\3\4"+
78     "\4\0\12\5\22\0\2\5\1\0\6\4\3\0\3\4\1\0\4\4"+
79     "\3\0\2\4\1\0\1\4\1\0\2\4\3\0\2\4\3\0\3\4"+
80     "\3\0\10\4\1\0\3\4\4\0\5\5\3\0\3\5\1\0\4\5"+
81     "\11\0\1\5\17\0\11\5\21\0\3\5\1\0\10\4\1\0\3\4"+
82     "\1\0\27\4\1\0\12\4\1\0\5\4\4\0\7\5\1\0\3\5"+
83     "\1\0\4\5\7\0\2\5\11\0\2\4\4\0\12\5\22\0\2\5"+
84     "\1\0\10\4\1\0\3\4\1\0\27\4\1\0\12\4\1\0\5\4"+
85     "\4\0\7\5\1\0\3\5\1\0\4\5\7\0\2\5\7\0\1\4"+
86     "\1\0\2\4\4\0\12\5\22\0\2\5\1\0\10\4\1\0\3\4"+
87     "\1\0\27\4\1\0\20\4\4\0\6\5\2\0\3\5\1\0\4\5"+
88     "\11\0\1\5\10\0\2\4\4\0\12\5\22\0\2\5\1\0\22\4"+
89     "\3\0\30\4\1\0\11\4\1\0\1\4\2\0\7\4\3\0\1\5"+
90     "\4\0\6\5\1\0\1\5\1\0\10\5\22\0\2\5\15\0\60\4"+
91     "\1\5\2\4\7\5\4\0\10\4\10\5\1\0\12\5\47\0\2\4"+
92     "\1\0\1\4\2\0\2\4\1\0\1\4\2\0\1\4\6\0\4\4"+
93     "\1\0\7\4\1\0\3\4\1\0\1\4\1\0\1\4\2\0\2\4"+
94     "\1\0\4\4\1\5\2\4\6\5\1\0\2\5\1\4\2\0\5\4"+
95     "\1\0\1\4\1\0\6\5\2\0\12\5\2\0\2\4\42\0\1\4"+
96     "\27\0\2\5\6\0\12\5\13\0\1\5\1\0\1\5\1\0\1\5"+
97     "\4\0\2\5\10\4\1\0\42\4\6\0\24\5\1\0\2\5\4\4"+
98     "\4\0\10\5\1\0\44\5\11\0\1\5\71\0\42\4\1\0\5\4"+
99     "\1\0\2\4\1\0\7\5\3\0\4\5\6\0\12\5\6\0\6\4"+
100     "\4\5\106\0\46\4\12\0\47\4\11\0\132\4\5\0\104\4\5\0"+
101     "\122\4\6\0\7\4\1\0\77\4\1\0\1\4\1\0\4\4\2\0"+
102     "\7\4\1\0\1\4\1\0\4\4\2\0\47\4\1\0\1\4\1\0"+
103     "\4\4\2\0\37\4\1\0\1\4\1\0\4\4\2\0\7\4\1\0"+
104     "\1\4\1\0\4\4\2\0\7\4\1\0\7\4\1\0\27\4\1\0"+
105     "\37\4\1\0\1\4\1\0\4\4\2\0\7\4\1\0\47\4\1\0"+
106     "\23\4\16\0\11\5\56\0\125\4\14\0\u026c\4\2\0\10\4\12\0"+
107     "\32\4\5\0\113\4\225\0\64\4\40\5\7\0\1\4\4\0\12\5"+
108     "\41\0\4\5\1\0\12\5\6\0\130\4\10\0\51\4\1\5\u0556\0"+
109     "\234\4\4\0\132\4\6\0\26\4\2\0\6\4\2\0\46\4\2\0"+
110     "\6\4\2\0\10\4\1\0\1\4\1\0\1\4\1\0\1\4\1\0"+
111     "\37\4\2\0\65\4\1\0\7\4\1\0\1\4\3\0\3\4\1\0"+
112     "\7\4\3\0\4\4\2\0\6\4\4\0\15\4\5\0\3\4\1\0"+
113     "\7\4\17\0\4\5\32\0\5\5\20\0\2\4\51\0\6\5\17\0"+
114     "\1\4\40\0\20\4\40\0\15\5\4\0\1\5\40\0\1\4\4\0"+
115     "\1\4\2\0\12\4\1\0\1\4\3\0\5\4\6\0\1\4\1\0"+
116     "\1\4\1\0\1\4\1\0\4\4\1\0\3\4\1\0\7\4\46\0"+
117     "\44\4\u0e81\0\3\4\31\0\11\4\6\5\1\0\5\4\2\0\3\4"+
118     "\6\0\124\4\4\0\2\5\2\0\2\4\2\0\136\4\6\0\50\4"+
119     "\4\0\136\4\21\0\30\4\u0248\0\u19b6\4\112\0\u51a6\4\132\0\u048d\4"+
120     "\u0773\0\u2ba4\4\u215c\0\u012e\4\322\0\7\4\14\0\5\4\5\0\1\4"+
121     "\1\5\12\4\1\0\15\4\1\0\5\4\1\0\1\4\1\0\2\4"+
122     "\1\0\2\4\1\0\154\4\41\0\u016b\4\22\0\100\4\2\0\66\4"+
123     "\50\0\14\4\44\0\4\5\17\0\2\4\30\0\3\4\31\0\1\4"+
124     "\6\0\3\4\1\0\1\4\1\0\207\4\2\0\1\5\4\0\1\4"+
125     "\13\0\12\5\7\0\32\4\4\0\1\4\1\0\32\4\12\0\132\4"+
126     "\3\0\6\4\2\0\6\4\2\0\6\4\2\0\3\4\3\0\2\4"+
127     "\3\0\2\4\22\0\3\5\4\0";
128
129   /**
130    * Translates characters to character classes
131    */

132   final private static char [] yycmap = yy_unpack_cmap(yycmap_packed);
133
134   /**
135    * Translates a state to a row index in the transition table
136    */

137   final private static int yy_rowMap [] = {
138         0, 57, 114, 171, 228, 285, 285, 342, 399, 456,
139       513, 570, 627, 684, 741, 798, 285, 285, 855, 912,
140       969, 285, 285, 285, 285, 285, 285, 285, 285, 1026,
141      1083, 1140, 1197, 285, 285, 285, 1254, 1311, 1368, 1425,
142      1482, 285, 1539, 1596, 285, 1653, 285, 1710, 1767, 285,
143      1824, 285, 1881, 1938, 1995, 2052, 2109, 2166, 285, 285,
144       285, 285, 285, 285, 285, 285, 285, 285, 285, 285,
145      2223, 285, 285, 285, 285, 285, 2280, 2337, 2394, 285,
146       285, 2451, 285, 2508, 285, 285, 285, 285, 285, 285,
147       285, 285, 285, 2565, 2622, 285, 285, 285, 285, 285,
148       285, 285, 285, 285, 285, 285, 285, 285, 285, 285,
149       285, 285, 2679, 2736, 2793, 285, 285, 285, 285, 285,
150       285, 2850, 2907, 2964, 285, 3021, 285, 285, 285, 399,
151      3078, 399, 285, 399
152   };
153
154   /**
155    * The packed transition table of the DFA (part 0)
156    */

157   final private static String JavaDoc yy_packed0 =
158     "\1\6\1\7\1\10\1\7\1\11\1\6\1\12\1\13"+
159     "\2\11\1\13\1\14\1\11\1\15\1\6\1\13\1\16"+
160     "\10\11\1\17\1\20\1\21\1\22\1\23\2\11\1\24"+
161     "\2\11\1\25\1\26\1\27\1\30\1\31\1\32\1\33"+
162     "\1\34\1\35\1\36\1\37\1\40\1\41\1\42\1\43"+
163     "\1\44\1\45\1\46\1\47\1\50\2\11\1\51\1\52"+
164     "\1\53\13\51\1\54\15\51\1\55\34\51\1\56\1\57"+
165     "\1\60\13\56\1\61\14\56\1\62\35\56\32\7\1\63"+
166     "\37\7\1\64\1\65\66\7\72\0\1\7\73\0\7\11"+
167     "\1\0\1\11\2\0\1\11\1\0\10\11\4\0\7\11"+
168     "\23\0\2\11\6\0\1\66\1\67\1\70\1\0\1\66"+
169     "\1\71\1\72\2\0\1\66\2\0\1\72\2\0\1\73"+
170     "\1\0\1\74\1\75\7\0\1\74\1\0\1\75\24\0"+
171     "\1\73\7\0\2\13\2\0\1\13\1\71\1\72\2\0"+
172     "\1\13\2\0\1\72\2\0\1\73\1\0\1\74\1\75"+
173     "\7\0\1\74\1\0\1\75\24\0\1\73\7\0\2\71"+
174     "\2\0\1\71\4\0\1\71\66\0\1\76\36\0\1\77"+
175     "\35\0\1\100\1\101\1\102\1\103\1\104\1\105\1\106"+
176     "\1\107\23\0\1\110\45\0\1\111\1\112\21\0\1\113"+
177     "\70\0\1\114\20\0\7\11\1\0\1\11\2\0\1\11"+
178     "\1\0\10\11\4\0\1\11\1\115\5\11\23\0\2\11"+
179     "\4\0\7\11\1\0\1\11\2\0\1\11\1\0\10\11"+
180     "\4\0\4\11\1\116\2\11\23\0\2\11\4\0\7\11"+
181     "\1\0\1\11\2\0\1\11\1\0\10\11\4\0\2\11"+
182     "\1\117\4\11\23\0\2\11\54\0\1\120\70\0\1\121"+
183     "\1\122\67\0\1\123\1\0\1\124\66\0\1\125\70\0"+
184     "\1\126\6\0\1\127\61\0\1\130\7\0\1\131\60\0"+
185     "\1\132\10\0\1\133\57\0\1\134\14\0\1\51\2\0"+
186     "\13\51\1\0\15\51\1\0\34\51\1\0\1\52\67\0"+
187     "\1\135\1\0\4\135\1\136\3\135\1\137\3\135\1\140"+
188     "\1\136\13\135\1\141\1\142\1\143\1\144\1\135\1\145"+
189     "\2\135\1\146\24\135\1\147\1\56\2\0\13\56\1\0"+
190     "\14\56\1\0\35\56\1\0\1\57\67\0\1\135\1\0"+
191     "\4\135\1\136\3\135\1\137\3\135\1\150\1\136\13\135"+
192     "\1\151\1\152\1\153\1\154\1\135\1\155\2\135\1\156"+
193     "\24\135\1\157\31\0\1\64\40\0\1\64\75\0\1\66"+
194     "\1\67\2\0\1\66\1\71\1\72\2\0\1\66\2\0"+
195     "\1\72\5\0\1\160\11\0\1\160\34\0\2\67\2\0"+
196     "\1\67\1\71\1\72\2\0\1\67\2\0\1\72\54\0"+
197     "\2\161\1\0\2\161\1\0\1\161\2\0\1\161\2\0"+
198     "\1\161\2\0\1\161\1\0\1\161\10\0\2\161\25\0"+
199     "\2\161\6\0\2\71\2\0\1\71\1\0\1\72\2\0"+
200     "\1\71\2\0\1\72\2\0\1\73\1\0\1\74\10\0"+
201     "\1\74\26\0\1\73\7\0\2\162\2\0\1\162\2\0"+
202     "\1\163\1\0\1\162\45\0\1\163\25\0\1\164\1\165"+
203     "\1\166\1\167\1\170\1\171\45\0\7\11\1\0\1\11"+
204     "\2\0\1\11\1\0\10\11\4\0\2\11\1\172\4\11"+
205     "\23\0\2\11\4\0\7\11\1\0\1\11\2\0\1\11"+
206     "\1\0\10\11\4\0\5\11\1\173\1\11\23\0\2\11"+
207     "\4\0\7\11\1\0\1\11\2\0\1\11\1\0\10\11"+
208     "\4\0\5\11\1\174\1\11\23\0\2\11\54\0\1\175"+
209     "\1\176\67\0\1\177\22\0\1\137\3\0\1\137\4\0"+
210     "\1\137\57\0\1\200\3\0\1\200\4\0\1\200\57\0"+
211     "\2\161\1\0\2\161\1\0\1\161\2\0\1\161\2\0"+
212     "\1\161\2\0\1\161\1\0\1\161\1\201\7\0\2\161"+
213     "\1\201\24\0\2\161\6\0\2\162\2\0\1\162\4\0"+
214     "\1\162\5\0\1\73\1\0\1\74\10\0\1\74\26\0"+
215     "\1\73\7\0\2\162\2\0\1\162\4\0\1\162\55\0"+
216     "\7\11\1\0\1\202\2\0\1\11\1\0\10\11\4\0"+
217     "\7\11\23\0\2\11\4\0\7\11\1\0\1\11\2\0"+
218     "\1\11\1\0\1\203\7\11\4\0\7\11\23\0\2\11"+
219     "\4\0\7\11\1\0\1\11\2\0\1\11\1\0\10\11"+
220     "\4\0\5\11\1\204\1\11\23\0\2\11\54\0\1\205"+
221     "\20\0\7\11\1\0\1\206\2\0\1\11\1\0\10\11"+
222     "\4\0\7\11\23\0\2\11";
223
224   /**
225    * The transition table of the DFA
226    */

227   final private static int yytrans [] = yy_unpack();
228
229
230   /* error codes */
231   final private static int YY_UNKNOWN_ERROR = 0;
232   final private static int YY_ILLEGAL_STATE = 1;
233   final private static int YY_NO_MATCH = 2;
234   final private static int YY_PUSHBACK_2BIG = 3;
235
236   /* error messages for the codes above */
237   final private static String JavaDoc YY_ERROR_MSG[] = {
238     "Unkown internal scanner error",
239     "Internal error: unknown state",
240     "Error: could not match input",
241     "Error: pushback value was too large"
242   };
243
244   /**
245    * YY_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
246    */

247   private final static byte YY_ATTRIBUTE[] = {
248      0, 0, 0, 0, 0, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1,
249      9, 9, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 1, 1, 1,
250      1, 9, 9, 9, 1, 1, 1, 1, 1, 9, 1, 1, 9, 1, 9, 1,
251      1, 9, 1, 9, 1, 1, 0, 0, 1, 0, 9, 9, 9, 9, 9, 9,
252      9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 1, 1, 1, 9,
253      9, 1, 9, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 1, 9,
254      9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
255      1, 1, 0, 9, 9, 9, 9, 9, 9, 1, 1, 1, 9, 1, 9, 9,
256      9, 1, 1, 1, 9, 1
257   };
258
259   /** the input device */
260   private java.io.Reader JavaDoc yy_reader;
261
262   /** the current state of the DFA */
263   private int yy_state;
264
265   /** the current lexical state */
266   private int yy_lexical_state = YYINITIAL;
267
268   /** this buffer contains the current text to be matched and is
269       the source of the yytext() string */

270   private char yy_buffer[] = new char[YY_BUFFERSIZE];
271
272   /** the textposition at the last accepting state */
273   private int yy_markedPos;
274
275   /** the textposition at the last state to be included in yytext */
276   private int yy_pushbackPos;
277
278   /** the current text position in the buffer */
279   private int yy_currentPos;
280
281   /** startRead marks the beginning of the yytext() string in the buffer */
282   private int yy_startRead;
283
284   /** endRead marks the last character in the buffer, that has been read
285       from input */

286   private int yy_endRead;
287
288   /** number of newlines encountered up to the start of the matched text */
289   private int yyline;
290
291   /** the number of characters up to the start of the matched text */
292   private int yychar;
293
294   /**
295    * the number of characters from the last newline up to the start of the
296    * matched text
297    */

298   private int yycolumn;
299
300   /**
301    * yy_atBOL == true <=> the scanner is currently at the beginning of a line
302    */

303   private boolean yy_atBOL = true;
304
305   /** yy_atEOF == true <=> the scanner is at the EOF */
306   private boolean yy_atEOF;
307
308   /* user code: */
309     StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
310     String JavaDoc file;
311     HashMap keywords;
312     LinkedList subst;
313
314     public Lexer_c(String JavaDoc s, Position pos, List subst) {
315         this(new EscapedUnicodeReader(new StringReader JavaDoc(s)));
316         if (pos != null) {
317             this.file = pos + ": quasiquote(" + s + "," + subst + ")";
318         }
319         else {
320             this.file = "quasiquote(" + s + "," + subst + ")";
321         }
322
323         this.subst = new LinkedList(subst);
324         this.keywords = new HashMap();
325         init_keywords();
326     }
327
328     private void error(String JavaDoc msg, Position pos) {
329        throw new InternalCompilerError(msg, pos);
330     }
331
332     protected String JavaDoc substKind(char kind) { return substKind(kind, false); }
333
334     protected String JavaDoc substKind(char kind, boolean list) {
335         switch (kind) {
336             case 's': return "String";
337             case 'E': return "Expr";
338             case 'S': return "Stmt";
339             case 'T': return "TypeNode";
340             case 'D': return "ClassDecl";
341             case 'M': return "ClassMember";
342             case 'F': return "Formal";
343             default:
344                 error("Bad quasiquoting substitution type: \"" + kind + "\".",
345                       pos());
346                 return null;
347         }
348     }
349
350     public Token substList(char kind) {
351         if (subst.isEmpty()) {
352             error("Not enough arguments to quasiquoter.", pos());
353         }
354
355         Object JavaDoc o = subst.removeFirst();
356         String JavaDoc expected = substKind(kind, true);
357
358         if (o instanceof List) {
359             List l = (List) o;
360
361             for (Iterator i = l.iterator(); i.hasNext(); ) {
362                 Object JavaDoc p = i.next();
363
364                 switch (kind) {
365                     case 'E':
366                         if (p instanceof Expr) continue;
367                         break;
368                     case 'S':
369                         if (p instanceof Stmt) continue;
370                         break;
371                     case 'T':
372                         if (p instanceof TypeNode) continue;
373                         break;
374                     case 'D':
375                         if (p instanceof ClassDecl) continue;
376                         break;
377                     case 'M':
378                         if (p instanceof ClassMember) continue;
379                         break;
380                     case 'F':
381                         if (p instanceof Formal) continue;
382                         break;
383                     default:
384                         break;
385                 }
386
387                 error("Bad quasiquoting substitution: expected List of " + expected + ".", pos());
388             }
389
390             return new QQListToken(pos(), l, sym.COMMA_LIST);
391         }
392         else {
393             error("Bad quasiquoting substitution: expected List of " + expected + ".", pos());
394             return null;
395         }
396     }
397
398     public Token subst(char kind) {
399         if (subst.isEmpty()) {
400             error("Not enough arguments to quasiquoter.", pos());
401         }
402                     
403         Object JavaDoc o = subst.removeFirst();
404         String JavaDoc expected = substKind(kind);
405                     
406         switch (kind) {
407             case 's': {
408                 if (o instanceof String JavaDoc) {
409                     String JavaDoc s = (String JavaDoc) o;
410                     return new Identifier(pos(), s, sym.IDENTIFIER);
411                 }
412                 break;
413             }
414             case 'E': {
415                 if (o instanceof Expr) {
416                     Expr e = (Expr) o;
417                     return new QQNodeToken(pos(), e, sym.COMMA_EXPR);
418                 }
419                 break;
420             }
421             case 'S': { if (o instanceof Stmt) {
422                     Stmt s = (Stmt) o;
423                     return new QQNodeToken(pos(), s, sym.COMMA_STMT);
424                 }
425                 break;
426             }
427             case 'T': { if (o instanceof TypeNode) {
428                     TypeNode t = (TypeNode) o;
429                     return new QQNodeToken(pos(), t, sym.COMMA_TYPE);
430                 }
431                 break;
432             }
433             case 'D': {
434                 if (o instanceof ClassDecl) {
435                     ClassDecl d = (ClassDecl) o;
436                     return new QQNodeToken(pos(), d, sym.COMMA_DECL);
437                 }
438                 break;
439             }
440             case 'M': {
441                 if (o instanceof ClassMember) {
442                     ClassMember m = (ClassMember) o;
443                     return new QQNodeToken(pos(), m, sym.COMMA_MEMB);
444                 }
445                 break;
446             }
447             case 'F': {
448                 if (o instanceof Formal) {
449                     Formal f = (Formal) o;
450                     return new QQNodeToken(pos(), f, sym.COMMA_FORM);
451                 }
452                 break;
453             }
454             default:
455                 // error: should be caught in substKind
456
return null;
457         }
458
459         error("Bad quasiquoting substitution: expected " + expected + ".", pos());
460         return null;
461     }
462
463     protected void init_keywords() {
464         keywords.put("abstract", new Integer JavaDoc(sym.ABSTRACT));
465         keywords.put("assert", new Integer JavaDoc(sym.ASSERT));
466         keywords.put("boolean", new Integer JavaDoc(sym.BOOLEAN));
467         keywords.put("break", new Integer JavaDoc(sym.BREAK));
468         keywords.put("byte", new Integer JavaDoc(sym.BYTE));
469         keywords.put("case", new Integer JavaDoc(sym.CASE));
470         keywords.put("catch", new Integer JavaDoc(sym.CATCH));
471         keywords.put("char", new Integer JavaDoc(sym.CHAR));
472         keywords.put("class", new Integer JavaDoc(sym.CLASS));
473         keywords.put("const", new Integer JavaDoc(sym.CONST));
474         keywords.put("continue", new Integer JavaDoc(sym.CONTINUE));
475         keywords.put("default", new Integer JavaDoc(sym.DEFAULT));
476         keywords.put("do", new Integer JavaDoc(sym.DO));
477         keywords.put("double", new Integer JavaDoc(sym.DOUBLE));
478         keywords.put("else", new Integer JavaDoc(sym.ELSE));
479         keywords.put("extends", new Integer JavaDoc(sym.EXTENDS));
480         keywords.put("final", new Integer JavaDoc(sym.FINAL));
481         keywords.put("finally", new Integer JavaDoc(sym.FINALLY));
482         keywords.put("float", new Integer JavaDoc(sym.FLOAT));
483         keywords.put("for", new Integer JavaDoc(sym.FOR));
484         keywords.put("goto", new Integer JavaDoc(sym.GOTO));
485         keywords.put("if", new Integer JavaDoc(sym.IF));
486         keywords.put("implements", new Integer JavaDoc(sym.IMPLEMENTS));
487         keywords.put("import", new Integer JavaDoc(sym.IMPORT));
488         keywords.put("instanceof", new Integer JavaDoc(sym.INSTANCEOF));
489         keywords.put("int", new Integer JavaDoc(sym.INT));
490         keywords.put("interface", new Integer JavaDoc(sym.INTERFACE));
491         keywords.put("long", new Integer JavaDoc(sym.LONG));
492         keywords.put("native", new Integer JavaDoc(sym.NATIVE));
493         keywords.put("new", new Integer JavaDoc(sym.NEW));
494         keywords.put("package", new Integer JavaDoc(sym.PACKAGE));
495         keywords.put("private", new Integer JavaDoc(sym.PRIVATE));
496         keywords.put("protected", new Integer JavaDoc(sym.PROTECTED));
497         keywords.put("public", new Integer JavaDoc(sym.PUBLIC));
498         keywords.put("return", new Integer JavaDoc(sym.RETURN));
499         keywords.put("short", new Integer JavaDoc(sym.SHORT));
500         keywords.put("static", new Integer JavaDoc(sym.STATIC));
501         keywords.put("strictfp", new Integer JavaDoc(sym.STRICTFP));
502         keywords.put("super", new Integer JavaDoc(sym.SUPER));
503         keywords.put("switch", new Integer JavaDoc(sym.SWITCH));
504         keywords.put("synchronized", new Integer JavaDoc(sym.SYNCHRONIZED));
505         keywords.put("this", new Integer JavaDoc(sym.THIS));
506         keywords.put("throw", new Integer JavaDoc(sym.THROW));
507         keywords.put("throws", new Integer JavaDoc(sym.THROWS));
508         keywords.put("transient", new Integer JavaDoc(sym.TRANSIENT));
509         keywords.put("try", new Integer JavaDoc(sym.TRY));
510         keywords.put("void", new Integer JavaDoc(sym.VOID));
511         keywords.put("volatile", new Integer JavaDoc(sym.VOLATILE));
512         keywords.put("while", new Integer JavaDoc(sym.WHILE));
513     }
514
515     public String JavaDoc file() {
516         return file;
517     }
518
519     private Position pos() {
520         return new Position(file, yyline+1, yycolumn, yyline+1,
521                             yycolumn + yytext().length());
522     }
523
524     private Position pos(int len) {
525         return new Position(file, yyline+1, yycolumn-len-1, yyline+1,
526                             yycolumn+1);
527     }
528
529     private Token key(int symbol) {
530         return new Keyword(pos(), yytext(), symbol);
531     }
532
533     private Token op(int symbol) {
534         return new Operator(pos(), yytext(), symbol);
535     }
536
537     private Token id() {
538         return new Identifier(pos(), yytext(), sym.IDENTIFIER);
539     }
540
541     private Token int_lit(String JavaDoc s, int radix) {
542         BigInteger JavaDoc x = new BigInteger JavaDoc(s, radix);
543         boolean boundary = (radix == 10 && s.equals("2147483648"));
544         int bits = radix == 10 ? 31 : 32;
545         if (x.bitLength() > bits && ! boundary) {
546             error("Integer literal \"" + yytext() + "\" out of range.", pos());
547             return null;
548         }
549         return new IntegerLiteral(pos(), x.intValue(),
550                 boundary ? sym.INTEGER_LITERAL_BD : sym.INTEGER_LITERAL);
551     }
552
553     private Token long_lit(String JavaDoc s, int radix) {
554         BigInteger JavaDoc x = new BigInteger JavaDoc(s, radix);
555         boolean boundary = (radix == 10 && s.equals("9223372036854775808"));
556         int bits = radix == 10 ? 63 : 64;
557         if (x.bitLength() > bits && ! boundary) {
558             error("Long literal \"" + yytext() + "\" out of range.", pos());
559             return null;
560         }
561         return new LongLiteral(pos(), x.longValue(),
562                 boundary ? sym.LONG_LITERAL_BD : sym.LONG_LITERAL);
563     }
564
565     private Token float_lit(String JavaDoc s) {
566         try {
567             Float JavaDoc x = Float.valueOf(s);
568         boolean zero = true;
569         for (int i = 0; i < s.length(); i++) {
570         if ('1' <= s.charAt(i) && s.charAt(i) <= '9') {
571             zero = false;
572             break;
573         }
574         }
575         if (x.isInfinite() || x.isNaN() || (x.floatValue() == 0 && ! zero)) {
576         error("Illegal float literal \"" + yytext() + "\"", pos());
577         return null;
578         }
579             return new FloatLiteral(pos(), x.floatValue(), sym.FLOAT_LITERAL);
580         }
581         catch (NumberFormatException JavaDoc e) {
582             error("Illegal float literal \"" + yytext() + "\"", pos());
583             return null;
584         }
585     }
586
587     private Token double_lit(String JavaDoc s) {
588         try {
589             Double JavaDoc x = Double.valueOf(s);
590         boolean zero = true;
591         for (int i = 0; i < s.length(); i++) {
592         if ('1' <= s.charAt(i) && s.charAt(i) <= '9') {
593             zero = false;
594             break;
595         }
596         }
597         if (x.isInfinite() || x.isNaN() || (x.floatValue() == 0 && ! zero)) {
598         error("Illegal double literal \"" + yytext() + "\"", pos());
599         return null;
600         }
601             return new DoubleLiteral(pos(), x.doubleValue(), sym.DOUBLE_LITERAL);
602         }
603         catch (NumberFormatException JavaDoc e) {
604             error("Illegal double literal \"" + yytext() + "\"", pos());
605             return null;
606         }
607     }
608
609     private Token char_lit(String JavaDoc s) {
610         if (s.length() == 1) {
611             char x = s.charAt(0);
612             return new CharacterLiteral(pos(), x, sym.CHARACTER_LITERAL);
613         }
614         else {
615             error("Illegal character literal \'" + s + "\'", pos(s.length()));
616             return null;
617         }
618     }
619
620     private Token boolean_lit(boolean x) {
621         return new BooleanLiteral(pos(), x, sym.BOOLEAN_LITERAL);
622     }
623
624     private Token null_lit() {
625         return new NullLiteral(pos(), sym.NULL_LITERAL);
626     }
627
628     private Token string_lit() {
629         return new StringLiteral(pos(sb.length()), sb.toString(),
630                                  sym.STRING_LITERAL);
631     }
632
633     private String JavaDoc chop(int i, int j) {
634         return yytext().substring(i,yylength()-j);
635     }
636
637     private String JavaDoc chop(int j) {
638         return chop(0, j);
639     }
640
641     private String JavaDoc chop() {
642         return chop(0, 1);
643     }
644
645
646   /**
647    * Creates a new scanner
648    * There is also a java.io.InputStream version of this constructor.
649    *
650    * @param in the java.io.Reader to read input from.
651    */

652   public Lexer_c(java.io.Reader JavaDoc in) {
653     this.yy_reader = in;
654   }
655
656   /**
657    * Creates a new scanner.
658    * There is also java.io.Reader version of this constructor.
659    *
660    * @param in the java.io.Inputstream to read input from.
661    */

662   public Lexer_c(java.io.InputStream JavaDoc in) {
663     this(new java.io.InputStreamReader JavaDoc(in));
664   }
665
666   /**
667    * Unpacks the split, compressed DFA transition table.
668    *
669    * @return the unpacked transition table
670    */

671   private static int [] yy_unpack() {
672     int [] trans = new int[3135];
673     int offset = 0;
674     offset = yy_unpack(yy_packed0, offset, trans);
675     return trans;
676   }
677
678   /**
679    * Unpacks the compressed DFA transition table.
680    *
681    * @param packed the packed transition table
682    * @return the index of the last entry
683    */

684   private static int yy_unpack(String JavaDoc packed, int offset, int [] trans) {
685     int i = 0; /* index in packed string */
686     int j = offset; /* index in unpacked array */
687     int l = packed.length();
688     while (i < l) {
689       int count = packed.charAt(i++);
690       int value = packed.charAt(i++);
691       value--;
692       do trans[j++] = value; while (--count > 0);
693     }
694     return j;
695   }
696
697   /**
698    * Unpacks the compressed character translation table.
699    *
700    * @param packed the packed character translation table
701    * @return the unpacked character translation table
702    */

703   private static char [] yy_unpack_cmap(String JavaDoc packed) {
704     char [] map = new char[0x10000];
705     int i = 0; /* index in packed string */
706     int j = 0; /* index in unpacked array */
707     while (i < 1650) {
708       int count = packed.charAt(i++);
709       char value = packed.charAt(i++);
710       do map[j++] = value; while (--count > 0);
711     }
712     return map;
713   }
714
715
716   /**
717    * Refills the input buffer.
718    *
719    * @return <code>false</code>, iff there was new input.
720    *
721    * @exception IOException if any I/O-Error occurs
722    */

723   private boolean yy_refill() throws java.io.IOException JavaDoc {
724
725     /* first: make room (if you can) */
726     if (yy_startRead > 0) {
727       System.arraycopy(yy_buffer, yy_startRead,
728                        yy_buffer, 0,
729                        yy_endRead-yy_startRead);
730
731       /* translate stored positions */
732       yy_endRead-= yy_startRead;
733       yy_currentPos-= yy_startRead;
734       yy_markedPos-= yy_startRead;
735       yy_pushbackPos-= yy_startRead;
736       yy_startRead = 0;
737     }
738
739     /* is the buffer big enough? */
740     if (yy_currentPos >= yy_buffer.length) {
741       /* if not: blow it up */
742       char newBuffer[] = new char[yy_currentPos*2];
743       System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length);
744       yy_buffer = newBuffer;
745     }
746
747     /* finally: fill the buffer with new input */
748     int numRead = yy_reader.read(yy_buffer, yy_endRead,
749                                             yy_buffer.length-yy_endRead);
750
751     if (numRead < 0) {
752       return true;
753     }
754     else {
755       yy_endRead+= numRead;
756       return false;
757     }
758   }
759
760
761   /**
762    * Closes the input stream.
763    */

764   final public void yyclose() throws java.io.IOException JavaDoc {
765     yy_atEOF = true; /* indicate end of file */
766     yy_endRead = yy_startRead; /* invalidate buffer */
767
768     if (yy_reader != null)
769       yy_reader.close();
770   }
771
772
773   /**
774    * Closes the current stream, and resets the
775    * scanner to read from a new input stream.
776    *
777    * All internal variables are reset, the old input stream
778    * <b>cannot</b> be reused (internal buffer is discarded and lost).
779    * Lexical state is set to <tt>YY_INITIAL</tt>.
780    *
781    * @param reader the new input stream
782    */

783   final public void yyreset(java.io.Reader JavaDoc reader) throws java.io.IOException JavaDoc {
784     yyclose();
785     yy_reader = reader;
786     yy_atBOL = true;
787     yy_atEOF = false;
788     yy_endRead = yy_startRead = 0;
789     yy_currentPos = yy_markedPos = yy_pushbackPos = 0;
790     yyline = yychar = yycolumn = 0;
791     yy_lexical_state = YYINITIAL;
792   }
793
794
795   /**
796    * Returns the current lexical state.
797    */

798   final public int yystate() {
799     return yy_lexical_state;
800   }
801
802
803   /**
804    * Enters a new lexical state
805    *
806    * @param newState the new lexical state
807    */

808   final public void yybegin(int newState) {
809     yy_lexical_state = newState;
810   }
811
812
813   /**
814    * Returns the text matched by the current regular expression.
815    */

816   final public String JavaDoc yytext() {
817     return new String JavaDoc( yy_buffer, yy_startRead, yy_markedPos-yy_startRead );
818   }
819
820
821   /**
822    * Returns the character at position <tt>pos</tt> from the
823    * matched text.
824    *
825    * It is equivalent to yytext().charAt(pos), but faster
826    *
827    * @param pos the position of the character to fetch.
828    * A value from 0 to yylength()-1.
829    *
830    * @return the character at position pos
831    */

832   final public char yycharat(int pos) {
833     return yy_buffer[yy_startRead+pos];
834   }
835
836
837   /**
838    * Returns the length of the matched text region.
839    */

840   final public int yylength() {
841     return yy_markedPos-yy_startRead;
842   }
843
844
845   /**
846    * Reports an error that occured while scanning.
847    *
848    * In a wellformed scanner (no or only correct usage of
849    * yypushback(int) and a match-all fallback rule) this method
850    * will only be called with things that "Can't Possibly Happen".
851    * If this method is called, something is seriously wrong
852    * (e.g. a JFlex bug producing a faulty scanner etc.).
853    *
854    * Usual syntax/scanner level error handling should be done
855    * in error fallback rules.
856    *
857    * @param errorCode the code of the errormessage to display
858    */

859   private void yy_ScanError(int errorCode) {
860     String JavaDoc message;
861     try {
862       message = YY_ERROR_MSG[errorCode];
863     }
864     catch (ArrayIndexOutOfBoundsException JavaDoc e) {
865       message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];
866     }
867
868     throw new Error JavaDoc(message);
869   }
870
871
872   /**
873    * Pushes the specified amount of characters back into the input stream.
874    *
875    * They will be read again by then next call of the scanning method
876    *
877    * @param number the number of characters to be read again.
878    * This number must not be greater than yylength()!
879    */

880   private void yypushback(int number) {
881     if ( number > yylength() )
882       yy_ScanError(YY_PUSHBACK_2BIG);
883
884     yy_markedPos -= number;
885   }
886
887
888   /**
889    * Resumes scanning until the next regular expression is matched,
890    * the end of input is encountered or an I/O-Error occurs.
891    *
892    * @return the next token
893    * @exception IOException if any I/O-Error occurs
894    */

895   public Token nextToken() throws java.io.IOException JavaDoc {
896     int yy_input;
897     int yy_action;
898
899     // cached fields:
900
int yy_currentPos_l;
901     int yy_startRead_l;
902     int yy_markedPos_l;
903     int yy_endRead_l = yy_endRead;
904     char [] yy_buffer_l = yy_buffer;
905     char [] yycmap_l = yycmap;
906
907     int [] yytrans_l = yytrans;
908     int [] yy_rowMap_l = yy_rowMap;
909     byte [] yy_attr_l = YY_ATTRIBUTE;
910
911     while (true) {
912       yy_markedPos_l = yy_markedPos;
913
914       boolean yy_r = false;
915       for (yy_currentPos_l = yy_startRead; yy_currentPos_l < yy_markedPos_l;
916                                                              yy_currentPos_l++) {
917         switch (yy_buffer_l[yy_currentPos_l]) {
918         case '\u000B':
919         case '\u000C':
920         case '\u0085':
921         case '\u2028':
922         case '\u2029':
923           yyline++;
924           yycolumn = 0;
925           yy_r = false;
926           break;
927         case '\r':
928           yyline++;
929           yycolumn = 0;
930           yy_r = true;
931           break;
932         case '\n':
933           if (yy_r)
934             yy_r = false;
935           else {
936             yyline++;
937             yycolumn = 0;
938           }
939           break;
940         default:
941           yy_r = false;
942           yycolumn++;
943         }
944       }
945
946       if (yy_r) {
947         // peek one character ahead if it is \n (if we have counted one line too much)
948
boolean yy_peek;
949         if (yy_markedPos_l < yy_endRead_l)
950           yy_peek = yy_buffer_l[yy_markedPos_l] == '\n';
951         else if (yy_atEOF)
952           yy_peek = false;
953         else {
954           boolean eof = yy_refill();
955           yy_markedPos_l = yy_markedPos;
956           yy_buffer_l = yy_buffer;
957           if (eof)
958             yy_peek = false;
959           else
960             yy_peek = yy_buffer_l[yy_markedPos_l] == '\n';
961         }
962         if (yy_peek) yyline--;
963       }
964       yy_action = -1;
965
966       yy_startRead_l = yy_currentPos_l = yy_currentPos =
967                        yy_startRead = yy_markedPos_l;
968
969       yy_state = yy_lexical_state;
970
971
972       yy_forAction: {
973         while (true) {
974
975           if (yy_currentPos_l < yy_endRead_l)
976             yy_input = yy_buffer_l[yy_currentPos_l++];
977           else if (yy_atEOF) {
978             yy_input = YYEOF;
979             break yy_forAction;
980           }
981           else {
982             // store back cached positions
983
yy_currentPos = yy_currentPos_l;
984             yy_markedPos = yy_markedPos_l;
985             boolean eof = yy_refill();
986             // get translated positions and possibly new buffer
987
yy_currentPos_l = yy_currentPos;
988             yy_markedPos_l = yy_markedPos;
989             yy_buffer_l = yy_buffer;
990             yy_endRead_l = yy_endRead;
991             if (eof) {
992               yy_input = YYEOF;
993               break yy_forAction;
994             }
995             else {
996               yy_input = yy_buffer_l[yy_currentPos_l++];
997             }
998           }
999           int yy_next = yytrans_l[ yy_rowMap_l[yy_state] + yycmap_l[yy_input] ];
1000          if (yy_next == -1) break yy_forAction;
1001          yy_state = yy_next;
1002
1003          int yy_attributes = yy_attr_l[yy_state];
1004          if ( (yy_attributes & 1) == 1 ) {
1005            yy_action = yy_state;
1006            yy_markedPos_l = yy_currentPos_l;
1007            if ( (yy_attributes & 8) == 8 ) break yy_forAction;
1008          }
1009
1010        }
1011      }
1012
1013      // store back cached position
1014
yy_markedPos = yy_markedPos_l;
1015
1016      switch (yy_action) {
1017
1018        case 45:
1019          { sb.append( yytext() ); }
1020        case 135: break;
1021        case 40:
1022          { sb.append( yytext() ); }
1023        case 136: break;
1024        case 120:
1025          { return substList('F'); }
1026        case 137: break;
1027        case 119:
1028          { return substList('M'); }
1029        case 138: break;
1030        case 118:
1031          { return substList('D'); }
1032        case 139: break;
1033        case 117:
1034          { return substList('T'); }
1035        case 140: break;
1036        case 116:
1037          { return substList('S'); }
1038        case 141: break;
1039        case 115:
1040          { return substList('E'); }
1041        case 142: break;
1042        case 46:
1043        case 47:
1044          { yybegin(YYINITIAL);
1045                                  error("Unclosed character literal",
1046                                             pos(sb.length())); }
1047        case 143: break;
1048        case 49:
1049          { yybegin(YYINITIAL);
1050                                   Token t = char_lit(sb.toString());
1051                                   if (t != null) return t; }
1052        case 144: break;
1053        case 6:
1054        case 7:
1055          { /* ignore */ }
1056        case 145: break;
1057        case 50:
1058          { /* ignore */ }
1059        case 146: break;
1060        case 133:
1061          { return boolean_lit(false); }
1062        case 147: break;
1063        case 129:
1064          { return boolean_lit(true); }
1065        case 148: break;
1066        case 28:
1067          { return op(sym.COMMA); }
1068        case 149: break;
1069        case 27:
1070          { return op(sym.SEMICOLON); }
1071        case 150: break;
1072        case 11:
1073          { return op(sym.DOT); }
1074        case 151: break;
1075        case 21:
1076          { return op(sym.LPAREN); }
1077        case 152: break;
1078        case 22:
1079          { return op(sym.RPAREN); }
1080        case 153: break;
1081        case 23:
1082          { return op(sym.LBRACE); }
1083        case 154: break;
1084        case 24:
1085          { return op(sym.RBRACE); }
1086        case 155: break;
1087        case 25:
1088          { return op(sym.LBRACK); }
1089        case 156: break;
1090        case 26:
1091          { return op(sym.RBRACK); }
1092        case 157: break;
1093        case 131:
1094          { return null_lit(); }
1095        case 158: break;
1096        case 41:
1097        case 42:
1098          { yybegin(YYINITIAL);
1099                                   error("Unclosed string literal",
1100                                              pos(sb.length())); }
1101        case 159: break;
1102        case 110:
1103          { sb.append('\b'); }
1104        case 160: break;
1105        case 109:
1106          { sb.append('\n'); }
1107        case 161: break;
1108        case 108:
1109          { sb.append('\f'); }
1110        case 162: break;
1111        case 107:
1112          { sb.append('\r'); }
1113        case 163: break;
1114        case 106:
1115          { sb.append('\t'); }
1116        case 164: break;
1117        case 105:
1118          { sb.append('\"'); }
1119        case 165: break;
1120        case 104:
1121          { sb.append('\''); }
1122        case 166: break;
1123        case 103:
1124          { sb.append('\\'); }
1125        case 167: break;
1126        case 63:
1127          { return subst('s'); }
1128        case 168: break;
1129        case 64:
1130          { return subst('E'); }
1131        case 169: break;
1132        case 65:
1133          { return subst('S'); }
1134        case 170: break;
1135        case 66:
1136          { return subst('T'); }
1137        case 171: break;
1138        case 67:
1139          { return subst('D'); }
1140        case 172: break;
1141        case 68:
1142          { return subst('M'); }
1143        case 173: break;
1144        case 69:
1145          { return subst('F'); }
1146        case 174: break;
1147        case 93:
1148        case 94:
1149        case 127:
1150          { try {
1151                                       int x = Integer.parseInt(chop(1,0), 8);
1152                                       sb.append((char) x);
1153                                   }
1154                                   catch (NumberFormatException JavaDoc e) {
1155                                       error("Illegal octal escape \""
1156                                                  + yytext() + "\"", pos());
1157                                   }
1158                                  }
1159        case 175: break;
1160        case 72:
1161          { yybegin(END_OF_LINE_COMMENT); }
1162        case 176: break;
1163        case 51:
1164        case 52:
1165          { yybegin(YYINITIAL); }
1166        case 177: break;
1167        case 73:
1168          { yybegin(TRADITIONAL_COMMENT); }
1169        case 178: break;
1170        case 8:
1171        case 18:
1172        case 19:
1173        case 20:
1174        case 76:
1175        case 77:
1176        case 78:
1177        case 121:
1178        case 122:
1179        case 123:
1180        case 130:
1181          { Integer JavaDoc i = (Integer JavaDoc) keywords.get(yytext());
1182                    if (i == null) return id();
1183                    else return key(i.intValue()); }
1184        case 179: break;
1185        case 16:
1186          { yybegin(CHARACTER); sb.setLength(0); }
1187        case 180: break;
1188        case 132:
1189          { return op(sym.URSHIFTEQ); }
1190        case 181: break;
1191        case 126:
1192          { return op(sym.LSHIFTEQ); }
1193        case 182: break;
1194        case 125:
1195          { return op(sym.URSHIFT); }
1196        case 183: break;
1197        case 124:
1198          { return op(sym.RSHIFTEQ); }
1199        case 184: break;
1200        case 39:
1201          { return op(sym.XOR); }
1202        case 185: break;
1203        case 38:
1204          { return op(sym.PLUS); }
1205        case 186: break;
1206        case 37:
1207          { return op(sym.OR); }
1208        case 187: break;
1209        case 36:
1210          { return op(sym.AND); }
1211        case 188: break;
1212        case 35:
1213          { return op(sym.COLON); }
1214        case 189: break;
1215        case 34:
1216          { return op(sym.QUESTION); }
1217        case 190: break;
1218        case 33:
1219          { return op(sym.COMP); }
1220        case 191: break;
1221        case 32:
1222          { return op(sym.NOT); }
1223        case 192: break;
1224        case 31:
1225          { return op(sym.LT); }
1226        case 193: break;
1227        case 30:
1228          { return op(sym.GT); }
1229        case 194: break;
1230        case 29:
1231          { return op(sym.EQ); }
1232        case 195: break;
1233        case 14:
1234          { return op(sym.DIV); }
1235        case 196: break;
1236        case 13:
1237          { return op(sym.MOD); }
1238        case 197: break;
1239        case 12:
1240          { return op(sym.MINUS); }
1241        case 198: break;
1242        case 15:
1243          { return op(sym.MULT); }
1244        case 199: break;
1245        case 61:
1246          { return op(sym.MINUSMINUS); }
1247        case 200: break;
1248        case 62:
1249          { return op(sym.MINUSEQ); }
1250        case 201: break;
1251        case 71:
1252          { return op(sym.MODEQ); }
1253        case 202: break;
1254        case 74:
1255          { return op(sym.DIVEQ); }
1256        case 203: break;
1257        case 75:
1258          { return op(sym.MULTEQ); }
1259        case 204: break;
1260        case 79:
1261          { return op(sym.EQEQ); }
1262        case 205: break;
1263        case 80:
1264          { return op(sym.GTEQ); }
1265        case 206: break;
1266        case 81:
1267          { return op(sym.RSHIFT); }
1268        case 207: break;
1269        case 82:
1270          { return op(sym.LTEQ); }
1271        case 208: break;
1272        case 83:
1273          { return op(sym.LSHIFT); }
1274        case 209: break;
1275        case 84:
1276          { return op(sym.NOTEQ); }
1277        case 210: break;
1278        case 85:
1279          { return op(sym.ANDEQ); }
1280        case 211: break;
1281        case 86:
1282          { return op(sym.ANDAND); }
1283        case 212: break;
1284        case 87:
1285          { return op(sym.OREQ); }
1286        case 213: break;
1287        case 88:
1288          { return op(sym.OROR); }
1289        case 214: break;
1290        case 89:
1291          { return op(sym.PLUSEQ); }
1292        case 215: break;
1293        case 90:
1294          { return op(sym.PLUSPLUS); }
1295        case 216: break;
1296        case 91:
1297          { return op(sym.XOREQ); }
1298        case 217: break;
1299        case 102:
1300          { sb.append( '\b' ); }
1301        case 218: break;
1302        case 101:
1303          { sb.append( '\n' ); }
1304        case 219: break;
1305        case 100:
1306          { sb.append( '\f' ); }
1307        case 220: break;
1308        case 99:
1309          { sb.append( '\r' ); }
1310        case 221: break;
1311        case 98:
1312          { sb.append( '\t' ); }
1313        case 222: break;
1314        case 97:
1315          { sb.append( '\"' ); }
1316        case 223: break;
1317        case 96:
1318          { sb.append( '\'' ); }
1319        case 224: break;
1320        case 95:
1321          { sb.append( '\\' ); }
1322        case 225: break;
1323        case 128:
1324          { Token t = long_lit(chop(2,1), 16);
1325                                   if (t != null) return t; }
1326        case 226: break;
1327        case 112:
1328          { Token t = int_lit(chop(2,0), 16);
1329                                   if (t != null) return t; }
1330        case 227: break;
1331        case 111:
1332          { Token t = long_lit(chop(), 8);
1333                                   if (t != null) return t; }
1334        case 228: break;
1335        case 44:
1336          { yybegin(YYINITIAL);
1337                                   return string_lit(); }
1338        case 229: break;
1339        case 9:
1340        case 10:
1341          { Token t = int_lit(yytext(), 10);
1342                                   if (t != null) return t; }
1343        case 230: break;
1344        case 5:
1345        case 43:
1346        case 48:
1347          { error("Illegal character \"" +
1348                                              yytext() + "\"", pos()); }
1349        case 231: break;
1350        case 17:
1351          { yybegin(STRING); sb.setLength(0); }
1352        case 232: break;
1353        case 53:
1354          { Token t = int_lit(yytext(), 8);
1355                                   if (t != null) return t; }
1356        case 233: break;
1357        case 56:
1358        case 113:
1359          { Token t = double_lit(yytext());
1360                                   if (t != null) return t; }
1361        case 234: break;
1362        case 58:
1363          { Token t = double_lit(chop());
1364                                   if (t != null) return t; }
1365        case 235: break;
1366        case 59:
1367          { Token t = float_lit(chop());
1368                                   if (t != null) return t; }
1369        case 236: break;
1370        case 60:
1371          { Token t = long_lit(chop(), 10);
1372                                   if (t != null) return t; }
1373        case 237: break;
1374        case 92:
1375          { error("Illegal escape character \"" +
1376                                              yytext() + "\"", pos()); }
1377        case 238: break;
1378        default:
1379          if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
1380            yy_atEOF = true;
1381              { return new EOF(pos(), sym.EOF);
1382 }
1383          }
1384          else {
1385            yy_ScanError(YY_NO_MATCH);
1386          }
1387      }
1388    }
1389  }
1390
1391
1392}
1393
Popular Tags