KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > genimen > djeneric > repository > sqlparser > core > SqlParserEngineTokenManager


1 /* Generated By:JavaCC: Do not edit this line. SqlParserEngineTokenManager.java */
2 package com.genimen.djeneric.repository.sqlparser.core;
3
4 public class SqlParserEngineTokenManager implements SqlParserEngineConstants
5 {
6   public java.io.PrintStream JavaDoc debugStream = System.out;
7
8   public void setDebugStream(java.io.PrintStream JavaDoc ds)
9   {
10     debugStream = ds;
11   }
12
13   private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
14   {
15     switch (pos)
16     {
17       case 0 :
18         if ((active1 & 0x20L) != 0L) return 0;
19         if ((active0 & 0x40000000000000L) != 0L || (active1 & 0x400L) != 0L) return 14;
20         if ((active1 & 0x8L) != 0L) return 6;
21         if ((active0 & 0x3ffffffff80L) != 0L)
22         {
23           jjmatchedKind = 49;
24           return 46;
25         }
26         return -1;
27       case 1 :
28         if ((active0 & 0x6018c05800L) != 0L) return 46;
29         if ((active0 & 0x39fe73fa780L) != 0L)
30         {
31           if (jjmatchedPos != 1)
32           {
33             jjmatchedKind = 49;
34             jjmatchedPos = 1;
35           }
36           return 46;
37         }
38         return -1;
39       case 2 :
40         if ((active0 & 0x8002100c80L) != 0L) return 46;
41         if ((active0 & 0x37ff52fa300L) != 0L)
42         {
43           jjmatchedKind = 49;
44           jjmatchedPos = 2;
45           return 46;
46         }
47         return -1;
48       case 3 :
49         if ((active0 & 0x4085028000L) != 0L) return 46;
50         if ((active0 & 0x33f702d2300L) != 0L)
51         {
52           jjmatchedKind = 49;
53           jjmatchedPos = 3;
54           return 46;
55         }
56         return -1;
57       case 4 :
58         if ((active0 & 0x450040000L) != 0L) return 46;
59         if ((active0 & 0x33b20292300L) != 0L)
60         {
61           jjmatchedKind = 49;
62           jjmatchedPos = 4;
63           return 46;
64         }
65         return -1;
66       case 5 :
67         if ((active0 & 0x33820280100L) != 0L) return 46;
68         if ((active0 & 0x300012200L) != 0L)
69         {
70           jjmatchedKind = 49;
71           jjmatchedPos = 5;
72           return 46;
73         }
74         return -1;
75       case 6 :
76         if ((active0 & 0x300002000L) != 0L) return 46;
77         if ((active0 & 0x10200L) != 0L)
78         {
79           if (jjmatchedPos != 6)
80           {
81             jjmatchedKind = 49;
82             jjmatchedPos = 6;
83           }
84           return 46;
85         }
86         return -1;
87       default :
88         return -1;
89     }
90   }
91
92   private final int jjStartNfa_0(int pos, long active0, long active1)
93   {
94     return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);
95   }
96
97   private final int jjStopAtPos(int pos, int kind)
98   {
99     jjmatchedKind = kind;
100     jjmatchedPos = pos;
101     return pos + 1;
102   }
103
104   private final int jjStartNfaWithStates_0(int pos, int kind, int state)
105   {
106     jjmatchedKind = kind;
107     jjmatchedPos = pos;
108     try
109     {
110       curChar = input_stream.readChar();
111     }
112     catch (java.io.IOException JavaDoc e)
113     {
114       return pos + 1;
115     }
116     return jjMoveNfa_0(state, pos + 1);
117   }
118
119   private final int jjMoveStringLiteralDfa0_0()
120   {
121     switch (curChar)
122     {
123       case 32 :
124         jjmatchedKind = 1;
125         return jjMoveStringLiteralDfa1_0(0x0L, 0x80L);
126       case 33 :
127         return jjMoveStringLiteralDfa1_0(0x2000000000000000L, 0x0L);
128       case 40 :
129         jjmatchedKind = 64;
130         return jjMoveStringLiteralDfa1_0(0x8000000000000000L, 0x0L);
131       case 41 :
132         return jjStopAtPos(0, 66);
133       case 42 :
134         return jjStopAtPos(0, 65);
135       case 43 :
136         return jjStopAtPos(0, 68);
137       case 44 :
138         return jjStopAtPos(0, 72);
139       case 45 :
140         return jjStartNfaWithStates_0(0, 69, 0);
141       case 46 :
142         jjmatchedKind = 54;
143         return jjMoveStringLiteralDfa1_0(0x0L, 0x400L);
144       case 47 :
145         return jjStartNfaWithStates_0(0, 67, 6);
146       case 58 :
147         return jjStopAtPos(0, 73);
148       case 59 :
149         return jjStopAtPos(0, 53);
150       case 60 :
151         jjmatchedKind = 56;
152         return jjMoveStringLiteralDfa1_0(0x4200000000000000L, 0x0L);
153       case 61 :
154         return jjStopAtPos(0, 60);
155       case 62 :
156         jjmatchedKind = 58;
157         return jjMoveStringLiteralDfa1_0(0x800000000000000L, 0x0L);
158       case 63 :
159         return jjStopAtPos(0, 70);
160       case 65 :
161       case 97 :
162         return jjMoveStringLiteralDfa1_0(0x1c80L, 0x0L);
163       case 66 :
164       case 98 :
165         return jjMoveStringLiteralDfa1_0(0x6000L, 0x0L);
166       case 67 :
167       case 99 :
168         return jjMoveStringLiteralDfa1_0(0x100L, 0x0L);
169       case 68 :
170       case 100 :
171         return jjMoveStringLiteralDfa1_0(0x800018000L, 0x0L);
172       case 69 :
173       case 101 :
174         return jjMoveStringLiteralDfa1_0(0x1000000000L, 0x0L);
175       case 70 :
176       case 102 :
177         return jjMoveStringLiteralDfa1_0(0x120000L, 0x0L);
178       case 71 :
179       case 103 :
180         return jjMoveStringLiteralDfa1_0(0x40000L, 0x0L);
181       case 72 :
182       case 104 :
183         return jjMoveStringLiteralDfa1_0(0x80000L, 0x0L);
184       case 73 :
185       case 105 :
186         return jjMoveStringLiteralDfa1_0(0x6000c00000L, 0x0L);
187       case 76 :
188       case 108 :
189         return jjMoveStringLiteralDfa1_0(0x1000000L, 0x0L);
190       case 78 :
191       case 110 :
192         return jjMoveStringLiteralDfa1_0(0x6200000L, 0x0L);
193       case 79 :
194       case 111 :
195         return jjMoveStringLiteralDfa1_0(0x18000000L, 0x0L);
196       case 82 :
197       case 114 :
198         return jjMoveStringLiteralDfa1_0(0x200L, 0x0L);
199       case 83 :
200       case 115 :
201         return jjMoveStringLiteralDfa1_0(0x8020000000L, 0x0L);
202       case 85 :
203       case 117 :
204         return jjMoveStringLiteralDfa1_0(0x100c0000000L, 0x0L);
205       case 86 :
206       case 118 :
207         return jjMoveStringLiteralDfa1_0(0x20300000000L, 0x0L);
208       case 87 :
209       case 119 :
210         return jjMoveStringLiteralDfa1_0(0x400000000L, 0x0L);
211       case 124 :
212         return jjMoveStringLiteralDfa1_0(0x10000000000000L, 0x0L);
213       case 126 :
214         return jjStopAtPos(0, 55);
215       default :
216         return jjMoveNfa_0(5, 0);
217     }
218   }
219
220   private final int jjMoveStringLiteralDfa1_0(long active0, long active1)
221   {
222     try
223     {
224       curChar = input_stream.readChar();
225     }
226     catch (java.io.IOException JavaDoc e)
227     {
228       jjStopStringLiteralDfa_0(0, active0, active1);
229       return 1;
230     }
231     switch (curChar)
232     {
233       case 40 :
234         return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x80L);
235       case 42 :
236         if ((active1 & 0x400L) != 0L) return jjStopAtPos(1, 74);
237         break;
238       case 43 :
239         return jjMoveStringLiteralDfa2_0(active0, 0x8000000000000000L, active1, 0L);
240       case 61 :
241         if ((active0 & 0x200000000000000L) != 0L) return jjStopAtPos(1, 57);
242         else if ((active0 & 0x800000000000000L) != 0L) return jjStopAtPos(1, 59);
243         else if ((active0 & 0x2000000000000000L) != 0L) return jjStopAtPos(1, 61);
244         break;
245       case 62 :
246         if ((active0 & 0x4000000000000000L) != 0L) return jjStopAtPos(1, 62);
247         break;
248       case 65 :
249       case 97 :
250         return jjMoveStringLiteralDfa2_0(active0, 0x20300080000L, active1, 0L);
251       case 69 :
252       case 101 :
253         return jjMoveStringLiteralDfa2_0(active0, 0x882000a000L, active1, 0L);
254       case 72 :
255       case 104 :
256         return jjMoveStringLiteralDfa2_0(active0, 0x400000000L, active1, 0L);
257       case 73 :
258       case 105 :
259         return jjMoveStringLiteralDfa2_0(active0, 0x1010000L, active1, 0L);
260       case 76 :
261       case 108 :
262         return jjMoveStringLiteralDfa2_0(active0, 0x80L, active1, 0L);
263       case 78 :
264       case 110 :
265         if ((active0 & 0x400000L) != 0L)
266         {
267           jjmatchedKind = 22;
268           jjmatchedPos = 1;
269         }
270         return jjMoveStringLiteralDfa2_0(active0, 0x6040000400L, active1, 0L);
271       case 79 :
272       case 111 :
273         return jjMoveStringLiteralDfa2_0(active0, 0x2300300L, active1, 0L);
274       case 80 :
275       case 112 :
276         return jjMoveStringLiteralDfa2_0(active0, 0x10000000000L, active1, 0L);
277       case 82 :
278       case 114 :
279         if ((active0 & 0x8000000L) != 0L)
280         {
281           jjmatchedKind = 27;
282           jjmatchedPos = 1;
283         }
284         return jjMoveStringLiteralDfa2_0(active0, 0x10060000L, active1, 0L);
285       case 83 :
286       case 115 :
287         if ((active0 & 0x1000L) != 0L)
288         {
289           jjmatchedKind = 12;
290           jjmatchedPos = 1;
291         }
292         else if ((active0 & 0x800000L) != 0L) return jjStartNfaWithStates_0(1, 23, 46);
293         return jjMoveStringLiteralDfa2_0(active0, 0x80000800L, active1, 0L);
294       case 85 :
295       case 117 :
296         return jjMoveStringLiteralDfa2_0(active0, 0x4000000L, active1, 0L);
297       case 88 :
298       case 120 :
299         return jjMoveStringLiteralDfa2_0(active0, 0x1000000000L, active1, 0L);
300       case 89 :
301       case 121 :
302         if ((active0 & 0x4000L) != 0L) return jjStartNfaWithStates_0(1, 14, 46);
303         break;
304       case 124 :
305         if ((active0 & 0x10000000000000L) != 0L) return jjStopAtPos(1, 52);
306         break;
307       default :
308         break;
309     }
310     return jjStartNfa_0(0, active0, active1);
311   }
312
313   private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1)
314   {
315     if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(0, old0, old1);
316     try
317     {
318       curChar = input_stream.readChar();
319     }
320     catch (java.io.IOException JavaDoc e)
321     {
322       jjStopStringLiteralDfa_0(1, active0, active1);
323       return 2;
324     }
325     switch (curChar)
326     {
327       case 41 :
328         if ((active0 & 0x8000000000000000L) != 0L) return jjStopAtPos(2, 63);
329         break;
330       case 43 :
331         return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x80L);
332       case 67 :
333       case 99 :
334         if ((active0 & 0x800L) != 0L) return jjStartNfaWithStates_0(2, 11, 46);
335         break;
336       case 68 :
337       case 100 :
338         if ((active0 & 0x400L) != 0L) return jjStartNfaWithStates_0(2, 10, 46);
339         return jjMoveStringLiteralDfa3_0(active0, 0x10010000000L, active1, 0L);
340       case 69 :
341       case 101 :
342         return jjMoveStringLiteralDfa3_0(active0, 0x480000000L, active1, 0L);
343       case 73 :
344       case 105 :
345         return jjMoveStringLiteralDfa3_0(active0, 0x1040000000L, active1, 0L);
346       case 75 :
347       case 107 :
348         return jjMoveStringLiteralDfa3_0(active0, 0x1000000L, active1, 0L);
349       case 76 :
350       case 108 :
351         if ((active0 & 0x80L) != 0L) return jjStartNfaWithStates_0(2, 7, 46);
352         return jjMoveStringLiteralDfa3_0(active0, 0x20824000200L, active1, 0L);
353       case 77 :
354       case 109 :
355         return jjMoveStringLiteralDfa3_0(active0, 0x100L, active1, 0L);
356       case 79 :
357       case 111 :
358         return jjMoveStringLiteralDfa3_0(active0, 0x60000L, active1, 0L);
359       case 82 :
360       case 114 :
361         if ((active0 & 0x100000L) != 0L) return jjStartNfaWithStates_0(2, 20, 46);
362         return jjMoveStringLiteralDfa3_0(active0, 0x300000000L, active1, 0L);
363       case 83 :
364       case 115 :
365         return jjMoveStringLiteralDfa3_0(active0, 0x2000018000L, active1, 0L);
366       case 84 :
367       case 116 :
368         if ((active0 & 0x2000000L) != 0L) return jjStartNfaWithStates_0(2, 25, 46);
369         else if ((active0 & 0x8000000000L) != 0L) return jjStartNfaWithStates_0(2, 39, 46);
370         return jjMoveStringLiteralDfa3_0(active0, 0x4000002000L, active1, 0L);
371       case 86 :
372       case 118 :
373         return jjMoveStringLiteralDfa3_0(active0, 0x80000L, active1, 0L);
374       case 87 :
375       case 119 :
376         return jjMoveStringLiteralDfa3_0(active0, 0x200000L, active1, 0L);
377       default :
378         break;
379     }
380     return jjStartNfa_0(1, active0, active1);
381   }
382
383   private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1)
384   {
385     if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(1, old0, old1);
386     try
387     {
388       curChar = input_stream.readChar();
389     }
390     catch (java.io.IOException JavaDoc e)
391     {
392       jjStopStringLiteralDfa_0(2, active0, active1);
393       return 3;
394     }
395     switch (curChar)
396     {
397       case 41 :
398         return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x80L);
399       case 65 :
400       case 97 :
401         return jjMoveStringLiteralDfa4_0(active0, 0x10000200000L, active1, 0L);
402       case 67 :
403       case 99 :
404         if ((active0 & 0x8000L) != 0L) return jjStartNfaWithStates_0(3, 15, 46);
405         return jjMoveStringLiteralDfa4_0(active0, 0x300000000L, active1, 0L);
406       case 69 :
407       case 101 :
408         if ((active0 & 0x1000000L) != 0L) return jjStartNfaWithStates_0(3, 24, 46);
409         return jjMoveStringLiteralDfa4_0(active0, 0x2830000000L, active1, 0L);
410       case 73 :
411       case 105 :
412         return jjMoveStringLiteralDfa4_0(active0, 0x80000L, active1, 0L);
413       case 76 :
414       case 108 :
415         if ((active0 & 0x4000000L) != 0L) return jjStartNfaWithStates_0(3, 26, 46);
416         return jjMoveStringLiteralDfa4_0(active0, 0x200L, active1, 0L);
417       case 77 :
418       case 109 :
419         if ((active0 & 0x20000L) != 0L) return jjStartNfaWithStates_0(3, 17, 46);
420         return jjMoveStringLiteralDfa4_0(active0, 0x100L, active1, 0L);
421       case 79 :
422       case 111 :
423         if ((active0 & 0x4000000000L) != 0L) return jjStartNfaWithStates_0(3, 38, 46);
424         return jjMoveStringLiteralDfa4_0(active0, 0x40000000L, active1, 0L);
425       case 82 :
426       case 114 :
427         if ((active0 & 0x80000000L) != 0L) return jjStartNfaWithStates_0(3, 31, 46);
428         return jjMoveStringLiteralDfa4_0(active0, 0x400000000L, active1, 0L);
429       case 83 :
430       case 115 :
431         return jjMoveStringLiteralDfa4_0(active0, 0x1000000000L, active1, 0L);
432       case 84 :
433       case 116 :
434         return jjMoveStringLiteralDfa4_0(active0, 0x10000L, active1, 0L);
435       case 85 :
436       case 117 :
437         return jjMoveStringLiteralDfa4_0(active0, 0x20000040000L, active1, 0L);
438       case 87 :
439       case 119 :
440         return jjMoveStringLiteralDfa4_0(active0, 0x2000L, active1, 0L);
441       default :
442         break;
443     }
444     return jjStartNfa_0(2, active0, active1);
445   }
446
447   private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1)
448   {
449     if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(2, old0, old1);
450     try
451     {
452       curChar = input_stream.readChar();
453     }
454     catch (java.io.IOException JavaDoc e)
455     {
456       jjStopStringLiteralDfa_0(3, active0, active1);
457       return 4;
458     }
459     switch (curChar)
460     {
461       case 32 :
462         if ((active1 & 0x80L) != 0L) return jjStopAtPos(4, 71);
463         break;
464       case 66 :
465       case 98 :
466         return jjMoveStringLiteralDfa5_0(active0, 0x200L, active1, 0L);
467       case 67 :
468       case 99 :
469         return jjMoveStringLiteralDfa5_0(active0, 0x20000000L, active1, 0L);
470       case 69 :
471       case 101 :
472         if ((active0 & 0x400000000L) != 0L) return jjStartNfaWithStates_0(4, 34, 46);
473         return jjMoveStringLiteralDfa5_0(active0, 0x20000002000L, active1, 0L);
474       case 72 :
475       case 104 :
476         return jjMoveStringLiteralDfa5_0(active0, 0x300000000L, active1, 0L);
477       case 73 :
478       case 105 :
479         return jjMoveStringLiteralDfa5_0(active0, 0x210100L, active1, 0L);
480       case 78 :
481       case 110 :
482         if ((active0 & 0x40000000L) != 0L) return jjStartNfaWithStates_0(4, 30, 46);
483         return jjMoveStringLiteralDfa5_0(active0, 0x80000L, active1, 0L);
484       case 80 :
485       case 112 :
486         if ((active0 & 0x40000L) != 0L) return jjStartNfaWithStates_0(4, 18, 46);
487         break;
488       case 82 :
489       case 114 :
490         if ((active0 & 0x10000000L) != 0L) return jjStartNfaWithStates_0(4, 28, 46);
491         return jjMoveStringLiteralDfa5_0(active0, 0x2000000000L, active1, 0L);
492       case 84 :
493       case 116 :
494         return jjMoveStringLiteralDfa5_0(active0, 0x11800000000L, active1, 0L);
495       default :
496         break;
497     }
498     return jjStartNfa_0(3, active0, active1);
499   }
500
501   private final int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1)
502   {
503     if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(3, old0, old1);
504     try
505     {
506       curChar = input_stream.readChar();
507     }
508     catch (java.io.IOException JavaDoc e)
509     {
510       jjStopStringLiteralDfa_0(4, active0, 0L);
511       return 5;
512     }
513     switch (curChar)
514     {
515       case 65 :
516       case 97 :
517         return jjMoveStringLiteralDfa6_0(active0, 0x300000200L);
518       case 69 :
519       case 101 :
520         if ((active0 & 0x800000000L) != 0L) return jjStartNfaWithStates_0(5, 35, 46);
521         else if ((active0 & 0x10000000000L) != 0L) return jjStartNfaWithStates_0(5, 40, 46);
522         return jjMoveStringLiteralDfa6_0(active0, 0x2000L);
523       case 71 :
524       case 103 :
525         if ((active0 & 0x80000L) != 0L) return jjStartNfaWithStates_0(5, 19, 46);
526         break;
527       case 78 :
528       case 110 :
529         return jjMoveStringLiteralDfa6_0(active0, 0x10000L);
530       case 83 :
531       case 115 :
532         if ((active0 & 0x1000000000L) != 0L) return jjStartNfaWithStates_0(5, 36, 46);
533         else if ((active0 & 0x20000000000L) != 0L) return jjStartNfaWithStates_0(5, 41, 46);
534         break;
535       case 84 :
536       case 116 :
537         if ((active0 & 0x100L) != 0L) return jjStartNfaWithStates_0(5, 8, 46);
538         else if ((active0 & 0x200000L) != 0L) return jjStartNfaWithStates_0(5, 21, 46);
539         else if ((active0 & 0x20000000L) != 0L) return jjStartNfaWithStates_0(5, 29, 46);
540         else if ((active0 & 0x2000000000L) != 0L) return jjStartNfaWithStates_0(5, 37, 46);
541         break;
542       default :
543         break;
544     }
545     return jjStartNfa_0(4, active0, 0L);
546   }
547
548   private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
549   {
550     if (((active0 &= old0)) == 0L) return jjStartNfa_0(4, old0, 0L);
551     try
552     {
553       curChar = input_stream.readChar();
554     }
555     catch (java.io.IOException JavaDoc e)
556     {
557       jjStopStringLiteralDfa_0(5, active0, 0L);
558       return 6;
559     }
560     switch (curChar)
561     {
562       case 67 :
563       case 99 :
564         return jjMoveStringLiteralDfa7_0(active0, 0x10200L);
565       case 78 :
566       case 110 :
567         if ((active0 & 0x2000L) != 0L) return jjStartNfaWithStates_0(6, 13, 46);
568         break;
569       case 82 :
570       case 114 :
571         if ((active0 & 0x100000000L) != 0L)
572         {
573           jjmatchedKind = 32;
574           jjmatchedPos = 6;
575         }
576         return jjMoveStringLiteralDfa7_0(active0, 0x200000000L);
577       default :
578         break;
579     }
580     return jjStartNfa_0(5, active0, 0L);
581   }
582
583   private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
584   {
585     if (((active0 &= old0)) == 0L) return jjStartNfa_0(5, old0, 0L);
586     try
587     {
588       curChar = input_stream.readChar();
589     }
590     catch (java.io.IOException JavaDoc e)
591     {
592       jjStopStringLiteralDfa_0(6, active0, 0L);
593       return 7;
594     }
595     switch (curChar)
596     {
597       case 50 :
598         if ((active0 & 0x200000000L) != 0L) return jjStartNfaWithStates_0(7, 33, 25);
599         break;
600       case 75 :
601       case 107 :
602         if ((active0 & 0x200L) != 0L) return jjStartNfaWithStates_0(7, 9, 46);
603         break;
604       case 84 :
605       case 116 :
606         if ((active0 & 0x10000L) != 0L) return jjStartNfaWithStates_0(7, 16, 46);
607         break;
608       default :
609         break;
610     }
611     return jjStartNfa_0(6, active0, 0L);
612   }
613
614   private final void jjCheckNAdd(int state)
615   {
616     if (jjrounds[state] != jjround)
617     {
618       jjstateSet[jjnewStateCnt++] = state;
619       jjrounds[state] = jjround;
620     }
621   }
622
623   private final void jjAddStates(int start, int end)
624   {
625     do
626     {
627       jjstateSet[jjnewStateCnt++] = jjnextStates[start];
628     }
629     while (start++ != end);
630   }
631
632   private final void jjCheckNAddTwoStates(int state1, int state2)
633   {
634     jjCheckNAdd(state1);
635     jjCheckNAdd(state2);
636   }
637
638   private final void jjCheckNAddStates(int start, int end)
639   {
640     do
641     {
642       jjCheckNAdd(jjnextStates[start]);
643     }
644     while (start++ != end);
645   }
646
647   private final void jjCheckNAddStates(int start)
648   {
649     jjCheckNAdd(jjnextStates[start]);
650     jjCheckNAdd(jjnextStates[start + 1]);
651   }
652
653   static final long[] jjbitVec0 = {0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL};
654   static final long[] jjbitVec2 = {0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL};
655
656   private final int jjMoveNfa_0(int startState, int curPos)
657   {
658     int[] nextStates;
659     int startsAt = 0;
660     jjnewStateCnt = 46;
661     int i = 1;
662     jjstateSet[0] = startState;
663     int j, kind = 0x7fffffff;
664     for (;;)
665     {
666       if (++jjround == 0x7fffffff) ReInitRounds();
667       if (curChar < 64)
668       {
669         long l = 1L << curChar;
670         MatchLoop : do
671         {
672           switch (jjstateSet[--i])
673           {
674             case 5 :
675               if ((0x3ff000000000000L & l) != 0L)
676               {
677                 if (kind > 45) kind = 45;
678                 jjCheckNAddStates(0, 6);
679               }
680               else if ((0x1800000000L & l) != 0L)
681               {
682                 if (kind > 49) kind = 49;
683                 jjCheckNAddTwoStates(24, 25);
684               }
685               else if (curChar == 34) jjCheckNAdd(27);
686               else if (curChar == 39) jjCheckNAddStates(7, 9);
687               else if (curChar == 46) jjCheckNAdd(14);
688               else if (curChar == 47) jjstateSet[jjnewStateCnt++] = 6;
689               else if (curChar == 45) jjstateSet[jjnewStateCnt++] = 0;
690               break;
691             case 46 :
692               if ((0x3ff001800000000L & l) != 0L)
693               {
694                 if (kind > 49) kind = 49;
695                 jjCheckNAdd(25);
696               }
697               if ((0x1800000000L & l) != 0L)
698               {
699                 if (kind > 49) kind = 49;
700                 jjCheckNAddTwoStates(24, 25);
701               }
702               break;
703             case 0 :
704               if (curChar == 45) jjCheckNAddStates(10, 12);
705               break;
706             case 1 :
707               if ((0xffffffffffffdbffL & l) != 0L) jjCheckNAddStates(10, 12);
708               break;
709             case 2 :
710               if ((0x2400L & l) != 0L && kind > 5) kind = 5;
711               break;
712             case 3 :
713               if (curChar == 10 && kind > 5) kind = 5;
714               break;
715             case 4 :
716               if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3;
717               break;
718             case 6 :
719               if (curChar == 42) jjCheckNAddTwoStates(7, 8);
720               break;
721             case 7 :
722               if ((0xfffffbffffffffffL & l) != 0L) jjCheckNAddTwoStates(7, 8);
723               break;
724             case 8 :
725               if (curChar == 42) jjCheckNAddStates(13, 15);
726               break;
727             case 9 :
728               if ((0xffff7bffffffffffL & l) != 0L) jjCheckNAddTwoStates(10, 8);
729               break;
730             case 10 :
731               if ((0xfffffbffffffffffL & l) != 0L) jjCheckNAddTwoStates(10, 8);
732               break;
733             case 11 :
734               if (curChar == 47 && kind > 6) kind = 6;
735               break;
736             case 12 :
737               if (curChar == 47) jjstateSet[jjnewStateCnt++] = 6;
738               break;
739             case 13 :
740               if (curChar == 46) jjCheckNAdd(14);
741               break;
742             case 14 :
743               if ((0x3ff000000000000L & l) == 0L) break;
744               if (kind > 46) kind = 46;
745               jjCheckNAddTwoStates(14, 15);
746               break;
747             case 16 :
748               if ((0x280000000000L & l) != 0L) jjCheckNAdd(17);
749               break;
750             case 17 :
751               if ((0x3ff000000000000L & l) == 0L) break;
752               if (kind > 46) kind = 46;
753               jjCheckNAdd(17);
754               break;
755             case 18 :
756               if (curChar == 39) jjCheckNAddStates(7, 9);
757               break;
758             case 19 :
759               if ((0xffffff7fffffffffL & l) != 0L) jjCheckNAddStates(7, 9);
760               break;
761             case 20 :
762               if (curChar == 39) jjCheckNAddStates(16, 18);
763               break;
764             case 21 :
765               if (curChar == 39) jjstateSet[jjnewStateCnt++] = 20;
766               break;
767             case 22 :
768               if ((0xffffff7fffffffffL & l) != 0L) jjCheckNAddStates(16, 18);
769               break;
770             case 23 :
771               if (curChar == 39 && kind > 48) kind = 48;
772               break;
773             case 24 :
774               if ((0x1800000000L & l) == 0L) break;
775               if (kind > 49) kind = 49;
776               jjCheckNAddTwoStates(24, 25);
777               break;
778             case 25 :
779               if ((0x3ff001800000000L & l) == 0L) break;
780               if (kind > 49) kind = 49;
781               jjCheckNAdd(25);
782               break;
783             case 26 :
784               if (curChar == 34) jjCheckNAdd(27);
785               break;
786             case 27 :
787               if ((0x1800000000L & l) != 0L) jjCheckNAddStates(19, 21);
788               break;
789             case 28 :
790               if ((0x3ff001800000000L & l) != 0L) jjCheckNAddTwoStates(28, 29);
791               break;
792             case 29 :
793               if (curChar == 34 && kind > 49) kind = 49;
794               break;
795             case 30 :
796               if ((0x3ff000000000000L & l) == 0L) break;
797               if (kind > 45) kind = 45;
798               jjCheckNAddStates(0, 6);
799               break;
800             case 31 :
801               if ((0x3ff000000000000L & l) == 0L) break;
802               if (kind > 45) kind = 45;
803               jjCheckNAdd(31);
804               break;
805             case 32 :
806               if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(32, 33);
807               break;
808             case 33 :
809               if (curChar == 46) jjCheckNAdd(34);
810               break;
811             case 34 :
812               if ((0x3ff000000000000L & l) == 0L) break;
813               if (kind > 46) kind = 46;
814               jjCheckNAddTwoStates(34, 35);
815               break;
816             case 36 :
817               if ((0x280000000000L & l) != 0L) jjCheckNAdd(37);
818               break;
819             case 37 :
820               if ((0x3ff000000000000L & l) == 0L) break;
821               if (kind > 46) kind = 46;
822               jjCheckNAdd(37);
823               break;
824             case 38 :
825               if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(38, 39);
826               break;
827             case 40 :
828               if ((0x280000000000L & l) != 0L) jjCheckNAdd(41);
829               break;
830             case 41 :
831               if ((0x3ff000000000000L & l) == 0L) break;
832               if (kind > 46) kind = 46;
833               jjCheckNAdd(41);
834               break;
835             case 42 :
836               if ((0x3ff000000000000L & l) == 0L) break;
837               if (kind > 46) kind = 46;
838               jjCheckNAddTwoStates(42, 43);
839               break;
840             case 44 :
841               if ((0x280000000000L & l) != 0L) jjCheckNAdd(45);
842               break;
843             case 45 :
844               if ((0x3ff000000000000L & l) == 0L) break;
845               if (kind > 46) kind = 46;
846               jjCheckNAdd(45);
847               break;
848             default :
849               break;
850           }
851         }
852         while (i != startsAt);
853       }
854       else if (curChar < 128)
855       {
856         long l = 1L << (curChar & 077);
857         MatchLoop : do
858         {
859           switch (jjstateSet[--i])
860           {
861             case 5 :
862             case 24 :
863               if ((0x7fffffe87fffffeL & l) == 0L) break;
864               if (kind > 49) kind = 49;
865               jjCheckNAddTwoStates(24, 25);
866               break;
867             case 46 :
868               if ((0x7fffffe87fffffeL & l) != 0L)
869               {
870                 if (kind > 49) kind = 49;
871                 jjCheckNAdd(25);
872               }
873               if ((0x7fffffe87fffffeL & l) != 0L)
874               {
875                 if (kind > 49) kind = 49;
876                 jjCheckNAddTwoStates(24, 25);
877               }
878               break;
879             case 1 :
880               jjAddStates(10, 12);
881               break;
882             case 7 :
883               jjCheckNAddTwoStates(7, 8);
884               break;
885             case 9 :
886             case 10 :
887               jjCheckNAddTwoStates(10, 8);
888               break;
889             case 15 :
890               if ((0x2000000020L & l) != 0L) jjAddStates(22, 23);
891               break;
892             case 19 :
893               jjCheckNAddStates(7, 9);
894               break;
895             case 22 :
896               jjCheckNAddStates(16, 18);
897               break;
898             case 25 :
899               if ((0x7fffffe87fffffeL & l) == 0L) break;
900               if (kind > 49) kind = 49;
901               jjCheckNAdd(25);
902               break;
903             case 27 :
904               if ((0x7fffffe87fffffeL & l) != 0L) jjCheckNAddStates(19, 21);
905               break;
906             case 28 :
907               if ((0x7fffffe87fffffeL & l) != 0L) jjCheckNAddTwoStates(28, 29);
908               break;
909             case 35 :
910               if ((0x2000000020L & l) != 0L) jjAddStates(24, 25);
911               break;
912             case 39 :
913               if ((0x2000000020L & l) != 0L) jjAddStates(26, 27);
914               break;
915             case 43 :
916               if ((0x2000000020L & l) != 0L) jjAddStates(28, 29);
917               break;
918             default :
919               break;
920           }
921         }
922         while (i != startsAt);
923       }
924       else
925       {
926         int hiByte = (int) (curChar >> 8);
927         int i1 = hiByte >> 6;
928         long l1 = 1L << (hiByte & 077);
929         int i2 = (curChar & 0xff) >> 6;
930         long l2 = 1L << (curChar & 077);
931         MatchLoop : do
932         {
933           switch (jjstateSet[--i])
934           {
935             case 1 :
936               if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(10, 12);
937               break;
938             case 7 :
939               if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(7, 8);
940               break;
941             case 9 :
942             case 10 :
943               if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(10, 8);
944               break;
945             case 19 :
946               if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjCheckNAddStates(7, 9);
947               break;
948             case 22 :
949               if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjCheckNAddStates(16, 18);
950               break;
951             default :
952               break;
953           }
954         }
955         while (i != startsAt);
956       }
957       if (kind != 0x7fffffff)
958       {
959         jjmatchedKind = kind;
960         jjmatchedPos = curPos;
961         kind = 0x7fffffff;
962       }
963       ++curPos;
964       if ((i = jjnewStateCnt) == (startsAt = 46 - (jjnewStateCnt = startsAt))) return curPos;
965       try
966       {
967         curChar = input_stream.readChar();
968       }
969       catch (java.io.IOException JavaDoc e)
970       {
971         return curPos;
972       }
973     }
974   }
975
976   private final int jjMoveStringLiteralDfa0_1()
977   {
978     switch (curChar)
979     {
980       case 13 :
981         return jjMoveStringLiteralDfa1_1(0x40000000000L);
982       default :
983         return 1;
984     }
985   }
986
987   private final int jjMoveStringLiteralDfa1_1(long active0)
988   {
989     try
990     {
991       curChar = input_stream.readChar();
992     }
993     catch (java.io.IOException JavaDoc e)
994     {
995       return 1;
996     }
997     switch (curChar)
998     {
999       case 10 :
1000        if ((active0 & 0x40000000000L) != 0L) return jjStopAtPos(1, 42);
1001        break;
1002      default :
1003        return 2;
1004    }
1005    return 2;
1006  }
1007
1008  private final int jjStopStringLiteralDfa_2(int pos, long active0)
1009  {
1010    switch (pos)
1011    {
1012      default :
1013        return -1;
1014    }
1015  }
1016
1017  private final int jjStartNfa_2(int pos, long active0)
1018  {
1019    return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
1020  }
1021
1022  private final int jjStartNfaWithStates_2(int pos, int kind, int state)
1023  {
1024    jjmatchedKind = kind;
1025    jjmatchedPos = pos;
1026    try
1027    {
1028      curChar = input_stream.readChar();
1029    }
1030    catch (java.io.IOException JavaDoc e)
1031    {
1032      return pos + 1;
1033    }
1034    return jjMoveNfa_2(state, pos + 1);
1035  }
1036
1037  private final int jjMoveStringLiteralDfa0_2()
1038  {
1039    switch (curChar)
1040    {
1041      case 126 :
1042        return jjStopAtPos(0, 43);
1043      default :
1044        return jjMoveNfa_2(2, 0);
1045    }
1046  }
1047
1048  private final int jjMoveNfa_2(int startState, int curPos)
1049  {
1050    int[] nextStates;
1051    int startsAt = 0;
1052    jjnewStateCnt = 2;
1053    int i = 1;
1054    jjstateSet[0] = startState;
1055    int j, kind = 0x7fffffff;
1056    for (;;)
1057    {
1058      if (++jjround == 0x7fffffff) ReInitRounds();
1059      if (curChar < 64)
1060      {
1061        long l = 1L << curChar;
1062        MatchLoop : do
1063        {
1064          switch (jjstateSet[--i])
1065          {
1066            case 2 :
1067            case 0 :
1068              jjCheckNAddTwoStates(0, 1);
1069              break;
1070            default :
1071              break;
1072          }
1073        }
1074        while (i != startsAt);
1075      }
1076      else if (curChar < 128)
1077      {
1078        long l = 1L << (curChar & 077);
1079        MatchLoop : do
1080        {
1081          switch (jjstateSet[--i])
1082          {
1083            case 2 :
1084              if ((0xbfffffffffffffffL & l) != 0L) jjCheckNAddTwoStates(0, 1);
1085              else if (curChar == 126)
1086              {
1087                if (kind > 44) kind = 44;
1088              }
1089              break;
1090            case 0 :
1091              if ((0xbfffffffffffffffL & l) != 0L) jjCheckNAddTwoStates(0, 1);
1092              break;
1093            case 1 :
1094              if (curChar == 126) kind = 44;
1095              break;
1096            default :
1097              break;
1098          }
1099        }
1100        while (i != startsAt);
1101      }
1102      else
1103      {
1104        int hiByte = (int) (curChar >> 8);
1105        int i1 = hiByte >> 6;
1106        long l1 = 1L << (hiByte & 077);
1107        int i2 = (curChar & 0xff) >> 6;
1108        long l2 = 1L << (curChar & 077);
1109        MatchLoop : do
1110        {
1111          switch (jjstateSet[--i])
1112          {
1113            case 2 :
1114            case 0 :
1115              if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(0, 1);
1116              break;
1117            default :
1118              break;
1119          }
1120        }
1121        while (i != startsAt);
1122      }
1123      if (kind != 0x7fffffff)
1124      {
1125        jjmatchedKind = kind;
1126        jjmatchedPos = curPos;
1127        kind = 0x7fffffff;
1128      }
1129      ++curPos;
1130      if ((i = jjnewStateCnt) == (startsAt = 2 - (jjnewStateCnt = startsAt))) return curPos;
1131      try
1132      {
1133        curChar = input_stream.readChar();
1134      }
1135      catch (java.io.IOException JavaDoc e)
1136      {
1137        return curPos;
1138      }
1139    }
1140  }
1141
1142  static final int[] jjnextStates = {31, 32, 33, 38, 39, 42, 43, 19, 21, 23, 1, 2, 4, 8, 9, 11, 21, 22, 23, 27, 28, 29,
1143      16, 17, 36, 37, 40, 41, 44, 45,};
1144
1145  private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
1146  {
1147    switch (hiByte)
1148    {
1149      case 0 :
1150        return ((jjbitVec2[i2] & l2) != 0L);
1151      default :
1152        if ((jjbitVec0[i1] & l1) != 0L) return true;
1153        return false;
1154    }
1155  }
1156
1157  public static final String JavaDoc[] jjstrLiteralImages = {"", null, null, null, null, null, null, null, null, null, null,
1158      null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1159      null, null, null, null, null, null, null, null, null, null, null, null, "\15\12", "\176", null, null, null, null,
1160      null, null, null, null, "\174\174", "\73", "\56", "\176", "\74", "\74\75", "\76", "\76\75", "\75", "\41\75",
1161      "\74\76", "\50\53\51", "\50", "\52", "\51", "\57", "\53", "\55", "\77", "\40\50\53\51\40", "\54", "\72",
1162      "\56\52", };
1163  public static final String JavaDoc[] lexStateNames = {"DEFAULT", "DESCRIPTION_START_STATE", "DESCRIPTION_STATE",};
1164  public static final int[] jjnewLexState = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1165      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 0, 0,
1166      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1167      -1, -1, };
1168  static final long[] jjtoToken = {0xfff37fffffffff81L, 0x7ffL,};
1169  static final long[] jjtoSkip = {0x7eL, 0x0L,};
1170  protected JavaCharStream input_stream;
1171  private final int[] jjrounds = new int[46];
1172  private final int[] jjstateSet = new int[92];
1173  protected char curChar;
1174
1175  public SqlParserEngineTokenManager(JavaCharStream stream)
1176  {
1177    if (JavaCharStream.staticFlag) throw new Error JavaDoc(
1178        "ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
1179    input_stream = stream;
1180  }
1181
1182  public SqlParserEngineTokenManager(JavaCharStream stream, int lexState)
1183  {
1184    this(stream);
1185    SwitchTo(lexState);
1186  }
1187
1188  public void ReInit(JavaCharStream stream)
1189  {
1190    jjmatchedPos = jjnewStateCnt = 0;
1191    curLexState = defaultLexState;
1192    input_stream = stream;
1193    ReInitRounds();
1194  }
1195
1196  private final void ReInitRounds()
1197  {
1198    int i;
1199    jjround = 0x80000001;
1200    for (i = 46; i-- > 0;)
1201      jjrounds[i] = 0x80000000;
1202  }
1203
1204  public void ReInit(JavaCharStream stream, int lexState)
1205  {
1206    ReInit(stream);
1207    SwitchTo(lexState);
1208  }
1209
1210  public void SwitchTo(int lexState)
1211  {
1212    if (lexState >= 3 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState
1213                                                               + ". State unchanged.",
1214        TokenMgrError.INVALID_LEXICAL_STATE);
1215    else curLexState = lexState;
1216  }
1217
1218  protected Token jjFillToken()
1219  {
1220    Token t = Token.newToken(jjmatchedKind);
1221    t.kind = jjmatchedKind;
1222    String JavaDoc im = jjstrLiteralImages[jjmatchedKind];
1223    t.image = (im == null) ? input_stream.GetImage() : im;
1224    t.beginLine = input_stream.getBeginLine();
1225    t.beginColumn = input_stream.getBeginColumn();
1226    t.endLine = input_stream.getEndLine();
1227    t.endColumn = input_stream.getEndColumn();
1228    return t;
1229  }
1230
1231  int curLexState = 0;
1232  int defaultLexState = 0;
1233  int jjnewStateCnt;
1234  int jjround;
1235  int jjmatchedPos;
1236  int jjmatchedKind;
1237
1238  public Token getNextToken()
1239  {
1240    int kind;
1241    Token specialToken = null;
1242    Token matchedToken;
1243    int curPos = 0;
1244
1245    EOFLoop : for (;;)
1246    {
1247      try
1248      {
1249        curChar = input_stream.BeginToken();
1250      }
1251      catch (java.io.IOException JavaDoc e)
1252      {
1253        jjmatchedKind = 0;
1254        matchedToken = jjFillToken();
1255        return matchedToken;
1256      }
1257
1258      switch (curLexState)
1259      {
1260        case 0 :
1261          try
1262          {
1263            input_stream.backup(0);
1264            while (curChar <= 13 && (0x2600L & (1L << curChar)) != 0L)
1265              curChar = input_stream.BeginToken();
1266          }
1267          catch (java.io.IOException JavaDoc e1)
1268          {
1269            continue EOFLoop;
1270          }
1271          jjmatchedKind = 0x7fffffff;
1272          jjmatchedPos = 0;
1273          curPos = jjMoveStringLiteralDfa0_0();
1274          break;
1275        case 1 :
1276          jjmatchedKind = 0x7fffffff;
1277          jjmatchedPos = 0;
1278          curPos = jjMoveStringLiteralDfa0_1();
1279          break;
1280        case 2 :
1281          jjmatchedKind = 0x7fffffff;
1282          jjmatchedPos = 0;
1283          curPos = jjMoveStringLiteralDfa0_2();
1284          break;
1285      }
1286      if (jjmatchedKind != 0x7fffffff)
1287      {
1288        if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1);
1289        if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1290        {
1291          matchedToken = jjFillToken();
1292          if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind];
1293          return matchedToken;
1294        }
1295        else
1296        {
1297          if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind];
1298          continue EOFLoop;
1299        }
1300      }
1301      int error_line = input_stream.getEndLine();
1302      int error_column = input_stream.getEndColumn();
1303      String JavaDoc error_after = null;
1304      boolean EOFSeen = false;
1305      try
1306      {
1307        input_stream.readChar();
1308        input_stream.backup(1);
1309      }
1310      catch (java.io.IOException JavaDoc e1)
1311      {
1312        EOFSeen = true;
1313        error_after = curPos <= 1 ? "" : input_stream.GetImage();
1314        if (curChar == '\n' || curChar == '\r')
1315        {
1316          error_line++;
1317          error_column = 0;
1318        }
1319        else error_column++;
1320      }
1321      if (!EOFSeen)
1322      {
1323        input_stream.backup(1);
1324        error_after = curPos <= 1 ? "" : input_stream.GetImage();
1325      }
1326      throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar,
1327          TokenMgrError.LEXICAL_ERROR);
1328    }
1329  }
1330
1331}
Popular Tags