KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > genimen > djeneric > repository > oql > core > DjOqlParserEngineTokenManager


1 /* Generated By:JJTree&JavaCC: Do not edit this line. DjOqlParserEngineTokenManager.java */
2 package com.genimen.djeneric.repository.oql.core;
3
4 public class DjOqlParserEngineTokenManager implements DjOqlParserEngineConstants
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)
14   {
15     switch (pos)
16     {
17       case 0 :
18         if ((active0 & 0x4000000000140L) != 0L) return 2;
19         if ((active0 & 0x800000000L) != 0L) return 8;
20         if ((active0 & 0x1fe00000L) != 0L)
21         {
22           jjmatchedKind = 29;
23           return 28;
24         }
25         return -1;
26       case 1 :
27         if ((active0 & 0x100L) != 0L) return 0;
28         if ((active0 & 0x8800000L) != 0L) return 28;
29         if ((active0 & 0x17600000L) != 0L)
30         {
31           jjmatchedKind = 29;
32           jjmatchedPos = 1;
33           return 28;
34         }
35         return -1;
36       case 2 :
37         if ((active0 & 0x6600000L) != 0L)
38         {
39           jjmatchedKind = 29;
40           jjmatchedPos = 2;
41           return 28;
42         }
43         if ((active0 & 0x11000000L) != 0L) return 28;
44         return -1;
45       case 3 :
46         if ((active0 & 0x2600000L) != 0L) return 28;
47         if ((active0 & 0x4000000L) != 0L)
48         {
49           jjmatchedKind = 29;
50           jjmatchedPos = 3;
51           return 28;
52         }
53         return -1;
54       default :
55         return -1;
56     }
57   }
58
59   private final int jjStartNfa_0(int pos, long active0)
60   {
61     return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
62   }
63
64   private final int jjStopAtPos(int pos, int kind)
65   {
66     jjmatchedKind = kind;
67     jjmatchedPos = pos;
68     return pos + 1;
69   }
70
71   private final int jjStartNfaWithStates_0(int pos, int kind, int state)
72   {
73     jjmatchedKind = kind;
74     jjmatchedPos = pos;
75     try
76     {
77       curChar = input_stream.readChar();
78     }
79     catch (java.io.IOException JavaDoc e)
80     {
81       return pos + 1;
82     }
83     return jjMoveNfa_0(state, pos + 1);
84   }
85
86   private final int jjMoveStringLiteralDfa0_0()
87   {
88     switch (curChar)
89     {
90       case 9 :
91         return jjStopAtPos(0, 2);
92       case 10 :
93         return jjStopAtPos(0, 3);
94       case 12 :
95         return jjStopAtPos(0, 5);
96       case 13 :
97         return jjStopAtPos(0, 4);
98       case 32 :
99         return jjStopAtPos(0, 1);
100       case 33 :
101         jjmatchedKind = 38;
102         return jjMoveStringLiteralDfa1_0(0x100000000000L);
103       case 37 :
104         return jjStopAtPos(0, 51);
105       case 38 :
106         return jjMoveStringLiteralDfa1_0(0x400000000000L);
107       case 40 :
108         return jjStopAtPos(0, 32);
109       case 41 :
110         return jjStopAtPos(0, 33);
111       case 42 :
112         return jjStopAtPos(0, 49);
113       case 43 :
114         return jjStopAtPos(0, 47);
115       case 44 :
116         return jjStopAtPos(0, 34);
117       case 45 :
118         return jjStopAtPos(0, 48);
119       case 46 :
120         return jjStartNfaWithStates_0(0, 35, 8);
121       case 47 :
122         jjmatchedKind = 50;
123         return jjMoveStringLiteralDfa1_0(0x140L);
124       case 58 :
125         return jjStopAtPos(0, 39);
126       case 59 :
127         return jjStopAtPos(0, 52);
128       case 60 :
129         jjmatchedKind = 37;
130         return jjMoveStringLiteralDfa1_0(0x40000000000L);
131       case 61 :
132         jjmatchedKind = 41;
133         return jjMoveStringLiteralDfa1_0(0x10000000000L);
134       case 62 :
135         jjmatchedKind = 36;
136         return jjMoveStringLiteralDfa1_0(0x80000000000L);
137       case 97 :
138         return jjMoveStringLiteralDfa1_0(0x10000000L);
139       case 102 :
140         return jjMoveStringLiteralDfa1_0(0x4000000L);
141       case 105 :
142         return jjMoveStringLiteralDfa1_0(0x800000L);
143       case 108 :
144         return jjMoveStringLiteralDfa1_0(0x200000L);
145       case 110 :
146         return jjMoveStringLiteralDfa1_0(0x1400000L);
147       case 111 :
148         return jjMoveStringLiteralDfa1_0(0x8000000L);
149       case 116 :
150         return jjMoveStringLiteralDfa1_0(0x2000000L);
151       case 124 :
152         return jjMoveStringLiteralDfa1_0(0x200000000000L);
153       default :
154         return jjMoveNfa_0(3, 0);
155     }
156   }
157
158   private final int jjMoveStringLiteralDfa1_0(long active0)
159   {
160     try
161     {
162       curChar = input_stream.readChar();
163     }
164     catch (java.io.IOException JavaDoc e)
165     {
166       jjStopStringLiteralDfa_0(0, active0);
167       return 1;
168     }
169     switch (curChar)
170     {
171       case 38 :
172         if ((active0 & 0x400000000000L) != 0L) return jjStopAtPos(1, 46);
173         break;
174       case 42 :
175         if ((active0 & 0x100L) != 0L) return jjStartNfaWithStates_0(1, 8, 0);
176         break;
177       case 47 :
178         if ((active0 & 0x40L) != 0L) return jjStopAtPos(1, 6);
179         break;
180       case 61 :
181         if ((active0 & 0x10000000000L) != 0L) return jjStopAtPos(1, 40);
182         else if ((active0 & 0x40000000000L) != 0L) return jjStopAtPos(1, 42);
183         else if ((active0 & 0x80000000000L) != 0L) return jjStopAtPos(1, 43);
184         else if ((active0 & 0x100000000000L) != 0L) return jjStopAtPos(1, 44);
185         break;
186       case 97 :
187         return jjMoveStringLiteralDfa2_0(active0, 0x4000000L);
188       case 105 :
189         return jjMoveStringLiteralDfa2_0(active0, 0x200000L);
190       case 110 :
191         return jjMoveStringLiteralDfa2_0(active0, 0x10000000L);
192       case 111 :
193         return jjMoveStringLiteralDfa2_0(active0, 0x1000000L);
194       case 114 :
195         if ((active0 & 0x8000000L) != 0L) return jjStartNfaWithStates_0(1, 27, 28);
196         return jjMoveStringLiteralDfa2_0(active0, 0x2000000L);
197       case 115 :
198         if ((active0 & 0x800000L) != 0L) return jjStartNfaWithStates_0(1, 23, 28);
199         break;
200       case 117 :
201         return jjMoveStringLiteralDfa2_0(active0, 0x400000L);
202       case 124 :
203         if ((active0 & 0x200000000000L) != 0L) return jjStopAtPos(1, 45);
204         break;
205       default :
206         break;
207     }
208     return jjStartNfa_0(0, active0);
209   }
210
211   private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
212   {
213     if (((active0 &= old0)) == 0L) return jjStartNfa_0(0, old0);
214     try
215     {
216       curChar = input_stream.readChar();
217     }
218     catch (java.io.IOException JavaDoc e)
219     {
220       jjStopStringLiteralDfa_0(1, active0);
221       return 2;
222     }
223     switch (curChar)
224     {
225       case 100 :
226         if ((active0 & 0x10000000L) != 0L) return jjStartNfaWithStates_0(2, 28, 28);
227         break;
228       case 107 :
229         return jjMoveStringLiteralDfa3_0(active0, 0x200000L);
230       case 108 :
231         return jjMoveStringLiteralDfa3_0(active0, 0x4400000L);
232       case 116 :
233         if ((active0 & 0x1000000L) != 0L) return jjStartNfaWithStates_0(2, 24, 28);
234         break;
235       case 117 :
236         return jjMoveStringLiteralDfa3_0(active0, 0x2000000L);
237       default :
238         break;
239     }
240     return jjStartNfa_0(1, active0);
241   }
242
243   private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
244   {
245     if (((active0 &= old0)) == 0L) return jjStartNfa_0(1, old0);
246     try
247     {
248       curChar = input_stream.readChar();
249     }
250     catch (java.io.IOException JavaDoc e)
251     {
252       jjStopStringLiteralDfa_0(2, active0);
253       return 3;
254     }
255     switch (curChar)
256     {
257       case 101 :
258         if ((active0 & 0x200000L) != 0L) return jjStartNfaWithStates_0(3, 21, 28);
259         else if ((active0 & 0x2000000L) != 0L) return jjStartNfaWithStates_0(3, 25, 28);
260         break;
261       case 108 :
262         if ((active0 & 0x400000L) != 0L) return jjStartNfaWithStates_0(3, 22, 28);
263         break;
264       case 115 :
265         return jjMoveStringLiteralDfa4_0(active0, 0x4000000L);
266       default :
267         break;
268     }
269     return jjStartNfa_0(2, active0);
270   }
271
272   private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
273   {
274     if (((active0 &= old0)) == 0L) return jjStartNfa_0(2, old0);
275     try
276     {
277       curChar = input_stream.readChar();
278     }
279     catch (java.io.IOException JavaDoc e)
280     {
281       jjStopStringLiteralDfa_0(3, active0);
282       return 4;
283     }
284     switch (curChar)
285     {
286       case 101 :
287         if ((active0 & 0x4000000L) != 0L) return jjStartNfaWithStates_0(4, 26, 28);
288         break;
289       default :
290         break;
291     }
292     return jjStartNfa_0(3, active0);
293   }
294
295   private final void jjCheckNAdd(int state)
296   {
297     if (jjrounds[state] != jjround)
298     {
299       jjstateSet[jjnewStateCnt++] = state;
300       jjrounds[state] = jjround;
301     }
302   }
303
304   private final void jjAddStates(int start, int end)
305   {
306     do
307     {
308       jjstateSet[jjnewStateCnt++] = jjnextStates[start];
309     }
310     while (start++ != end);
311   }
312
313   private final void jjCheckNAddTwoStates(int state1, int state2)
314   {
315     jjCheckNAdd(state1);
316     jjCheckNAdd(state2);
317   }
318
319   private final void jjCheckNAddStates(int start, int end)
320   {
321     do
322     {
323       jjCheckNAdd(jjnextStates[start]);
324     }
325     while (start++ != end);
326   }
327
328   private final void jjCheckNAddStates(int start)
329   {
330     jjCheckNAdd(jjnextStates[start]);
331     jjCheckNAdd(jjnextStates[start + 1]);
332   }
333
334   static final long[] jjbitVec0 = {0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL};
335   static final long[] jjbitVec2 = {0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL};
336   static final long[] jjbitVec3 = {0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L};
337   static final long[] jjbitVec4 = {0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL};
338   static final long[] jjbitVec5 = {0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL};
339   static final long[] jjbitVec6 = {0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L};
340   static final long[] jjbitVec7 = {0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L};
341   static final long[] jjbitVec8 = {0x3fffffffffffL, 0x0L, 0x0L, 0x0L};
342
343   private final int jjMoveNfa_0(int startState, int curPos)
344   {
345     int[] nextStates;
346     int startsAt = 0;
347     jjnewStateCnt = 48;
348     int i = 1;
349     jjstateSet[0] = startState;
350     int j, kind = 0x7fffffff;
351     for (;;)
352     {
353       if (++jjround == 0x7fffffff) ReInitRounds();
354       if (curChar < 64)
355       {
356         long l = 1L << curChar;
357         MatchLoop : do
358         {
359           switch (jjstateSet[--i])
360           {
361             case 3 :
362               if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 6);
363               else if (curChar == 36)
364               {
365                 if (kind > 29) kind = 29;
366                 jjCheckNAdd(28);
367               }
368               else if (curChar == 34) jjCheckNAddStates(7, 9);
369               else if (curChar == 39) jjAddStates(10, 11);
370               else if (curChar == 46) jjCheckNAdd(8);
371               else if (curChar == 47) jjstateSet[jjnewStateCnt++] = 2;
372               if ((0x3fe000000000000L & l) != 0L)
373               {
374                 if (kind > 13) kind = 13;
375                 jjCheckNAddTwoStates(5, 6);
376               }
377               else if (curChar == 48)
378               {
379                 if (kind > 13) kind = 13;
380                 jjCheckNAddStates(12, 14);
381               }
382               break;
383             case 0 :
384               if (curChar == 42) jjstateSet[jjnewStateCnt++] = 1;
385               break;
386             case 1 :
387               if ((0xffff7fffffffffffL & l) != 0L && kind > 7) kind = 7;
388               break;
389             case 2 :
390               if (curChar == 42) jjstateSet[jjnewStateCnt++] = 0;
391               break;
392             case 4 :
393               if ((0x3fe000000000000L & l) == 0L) break;
394               if (kind > 13) kind = 13;
395               jjCheckNAddTwoStates(5, 6);
396               break;
397             case 5 :
398               if ((0x3ff000000000000L & l) == 0L) break;
399               if (kind > 13) kind = 13;
400               jjCheckNAddTwoStates(5, 6);
401               break;
402             case 7 :
403               if (curChar == 46) jjCheckNAdd(8);
404               break;
405             case 8 :
406               if ((0x3ff000000000000L & l) == 0L) break;
407               if (kind > 17) kind = 17;
408               jjCheckNAddStates(15, 17);
409               break;
410             case 10 :
411               if ((0x280000000000L & l) != 0L) jjCheckNAdd(11);
412               break;
413             case 11 :
414               if ((0x3ff000000000000L & l) == 0L) break;
415               if (kind > 17) kind = 17;
416               jjCheckNAddTwoStates(11, 12);
417               break;
418             case 13 :
419               if (curChar == 39) jjAddStates(10, 11);
420               break;
421             case 14 :
422               if ((0xffffff7fffffdbffL & l) != 0L) jjCheckNAdd(15);
423               break;
424             case 15 :
425               if (curChar == 39 && kind > 19) kind = 19;
426               break;
427             case 17 :
428               if ((0x8400000000L & l) != 0L) jjCheckNAdd(15);
429               break;
430             case 18 :
431               if (curChar == 34) jjCheckNAddStates(7, 9);
432               break;
433             case 19 :
434               if ((0xfffffffbffffdbffL & l) != 0L) jjCheckNAddStates(7, 9);
435               break;
436             case 21 :
437               if ((0x8400000000L & l) != 0L) jjCheckNAddStates(7, 9);
438               break;
439             case 22 :
440               if (curChar == 34 && kind > 20) kind = 20;
441               break;
442             case 23 :
443               if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(18, 21);
444               break;
445             case 24 :
446               if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(7, 9);
447               break;
448             case 25 :
449               if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 26;
450               break;
451             case 26 :
452               if ((0xff000000000000L & l) != 0L) jjCheckNAdd(24);
453               break;
454             case 27 :
455               if (curChar != 36) break;
456               if (kind > 29) kind = 29;
457               jjCheckNAdd(28);
458               break;
459             case 28 :
460               if ((0x3ff001000000000L & l) == 0L) break;
461               if (kind > 29) kind = 29;
462               jjCheckNAdd(28);
463               break;
464             case 29 :
465               if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 6);
466               break;
467             case 30 :
468               if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(30, 31);
469               break;
470             case 31 :
471               if (curChar != 46) break;
472               if (kind > 17) kind = 17;
473               jjCheckNAddStates(22, 24);
474               break;
475             case 32 :
476               if ((0x3ff000000000000L & l) == 0L) break;
477               if (kind > 17) kind = 17;
478               jjCheckNAddStates(22, 24);
479               break;
480             case 34 :
481               if ((0x280000000000L & l) != 0L) jjCheckNAdd(35);
482               break;
483             case 35 :
484               if ((0x3ff000000000000L & l) == 0L) break;
485               if (kind > 17) kind = 17;
486               jjCheckNAddTwoStates(35, 12);
487               break;
488             case 36 :
489               if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(36, 37);
490               break;
491             case 38 :
492               if ((0x280000000000L & l) != 0L) jjCheckNAdd(39);
493               break;
494             case 39 :
495               if ((0x3ff000000000000L & l) == 0L) break;
496               if (kind > 17) kind = 17;
497               jjCheckNAddTwoStates(39, 12);
498               break;
499             case 40 :
500               if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(25, 27);
501               break;
502             case 42 :
503               if ((0x280000000000L & l) != 0L) jjCheckNAdd(43);
504               break;
505             case 43 :
506               if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(43, 12);
507               break;
508             case 44 :
509               if (curChar != 48) break;
510               if (kind > 13) kind = 13;
511               jjCheckNAddStates(12, 14);
512               break;
513             case 46 :
514               if ((0x3ff000000000000L & l) == 0L) break;
515               if (kind > 13) kind = 13;
516               jjCheckNAddTwoStates(46, 6);
517               break;
518             case 47 :
519               if ((0xff000000000000L & l) == 0L) break;
520               if (kind > 13) kind = 13;
521               jjCheckNAddTwoStates(47, 6);
522               break;
523             default :
524               break;
525           }
526         }
527         while (i != startsAt);
528       }
529       else if (curChar < 128)
530       {
531         long l = 1L << (curChar & 077);
532         MatchLoop : do
533         {
534           switch (jjstateSet[--i])
535           {
536             case 3 :
537             case 28 :
538               if ((0x7fffffe87fffffeL & l) == 0L) break;
539               if (kind > 29) kind = 29;
540               jjCheckNAdd(28);
541               break;
542             case 1 :
543               if (kind > 7) kind = 7;
544               break;
545             case 6 :
546               if ((0x100000001000L & l) != 0L && kind > 13) kind = 13;
547               break;
548             case 9 :
549               if ((0x2000000020L & l) != 0L) jjAddStates(28, 29);
550               break;
551             case 12 :
552               if ((0x5000000050L & l) != 0L && kind > 17) kind = 17;
553               break;
554             case 14 :
555               if ((0xffffffffefffffffL & l) != 0L) jjCheckNAdd(15);
556               break;
557             case 16 :
558               if (curChar == 92) jjstateSet[jjnewStateCnt++] = 17;
559               break;
560             case 17 :
561               if ((0x14404410000000L & l) != 0L) jjCheckNAdd(15);
562               break;
563             case 19 :
564               if ((0xffffffffefffffffL & l) != 0L) jjCheckNAddStates(7, 9);
565               break;
566             case 20 :
567               if (curChar == 92) jjAddStates(30, 32);
568               break;
569             case 21 :
570               if ((0x14404410000000L & l) != 0L) jjCheckNAddStates(7, 9);
571               break;
572             case 33 :
573               if ((0x2000000020L & l) != 0L) jjAddStates(33, 34);
574               break;
575             case 37 :
576               if ((0x2000000020L & l) != 0L) jjAddStates(35, 36);
577               break;
578             case 41 :
579               if ((0x2000000020L & l) != 0L) jjAddStates(37, 38);
580               break;
581             case 45 :
582               if ((0x100000001000000L & l) != 0L) jjCheckNAdd(46);
583               break;
584             case 46 :
585               if ((0x7e0000007eL & l) == 0L) break;
586               if (kind > 13) kind = 13;
587               jjCheckNAddTwoStates(46, 6);
588               break;
589             default :
590               break;
591           }
592         }
593         while (i != startsAt);
594       }
595       else
596       {
597         int hiByte = (int) (curChar >> 8);
598         int i1 = hiByte >> 6;
599         long l1 = 1L << (hiByte & 077);
600         int i2 = (curChar & 0xff) >> 6;
601         long l2 = 1L << (curChar & 077);
602         MatchLoop : do
603         {
604           switch (jjstateSet[--i])
605           {
606             case 3 :
607             case 28 :
608               if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break;
609               if (kind > 29) kind = 29;
610               jjCheckNAdd(28);
611               break;
612             case 1 :
613               if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 7) kind = 7;
614               break;
615             case 14 :
616               if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjstateSet[jjnewStateCnt++] = 15;
617               break;
618             case 19 :
619               if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(7, 9);
620               break;
621             default :
622               break;
623           }
624         }
625         while (i != startsAt);
626       }
627       if (kind != 0x7fffffff)
628       {
629         jjmatchedKind = kind;
630         jjmatchedPos = curPos;
631         kind = 0x7fffffff;
632       }
633       ++curPos;
634       if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos;
635       try
636       {
637         curChar = input_stream.readChar();
638       }
639       catch (java.io.IOException JavaDoc e)
640       {
641         return curPos;
642       }
643     }
644   }
645
646   private final int jjMoveStringLiteralDfa0_3()
647   {
648     switch (curChar)
649     {
650       case 42 :
651         return jjMoveStringLiteralDfa1_3(0x800L);
652       default :
653         return 1;
654     }
655   }
656
657   private final int jjMoveStringLiteralDfa1_3(long active0)
658   {
659     try
660     {
661       curChar = input_stream.readChar();
662     }
663     catch (java.io.IOException JavaDoc e)
664     {
665       return 1;
666     }
667     switch (curChar)
668     {
669       case 47 :
670         if ((active0 & 0x800L) != 0L) return jjStopAtPos(1, 11);
671         break;
672       default :
673         return 2;
674     }
675     return 2;
676   }
677
678   private final int jjMoveStringLiteralDfa0_1()
679   {
680     return jjMoveNfa_1(0, 0);
681   }
682
683   private final int jjMoveNfa_1(int startState, int curPos)
684   {
685     int[] nextStates;
686     int startsAt = 0;
687     jjnewStateCnt = 3;
688     int i = 1;
689     jjstateSet[0] = startState;
690     int j, kind = 0x7fffffff;
691     for (;;)
692     {
693       if (++jjround == 0x7fffffff) ReInitRounds();
694       if (curChar < 64)
695       {
696         long l = 1L << curChar;
697         MatchLoop : do
698         {
699           switch (jjstateSet[--i])
700           {
701             case 0 :
702               if ((0x2400L & l) != 0L)
703               {
704                 if (kind > 9) kind = 9;
705               }
706               if (curChar == 13) jjstateSet[jjnewStateCnt++] = 1;
707               break;
708             case 1 :
709               if (curChar == 10 && kind > 9) kind = 9;
710               break;
711             case 2 :
712               if (curChar == 13) jjstateSet[jjnewStateCnt++] = 1;
713               break;
714             default :
715               break;
716           }
717         }
718         while (i != startsAt);
719       }
720       else if (curChar < 128)
721       {
722         long l = 1L << (curChar & 077);
723         MatchLoop : do
724         {
725           switch (jjstateSet[--i])
726           {
727             default :
728               break;
729           }
730         }
731         while (i != startsAt);
732       }
733       else
734       {
735         int hiByte = (int) (curChar >> 8);
736         int i1 = hiByte >> 6;
737         long l1 = 1L << (hiByte & 077);
738         int i2 = (curChar & 0xff) >> 6;
739         long l2 = 1L << (curChar & 077);
740         MatchLoop : do
741         {
742           switch (jjstateSet[--i])
743           {
744             default :
745               break;
746           }
747         }
748         while (i != startsAt);
749       }
750       if (kind != 0x7fffffff)
751       {
752         jjmatchedKind = kind;
753         jjmatchedPos = curPos;
754         kind = 0x7fffffff;
755       }
756       ++curPos;
757       if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) return curPos;
758       try
759       {
760         curChar = input_stream.readChar();
761       }
762       catch (java.io.IOException JavaDoc e)
763       {
764         return curPos;
765       }
766     }
767   }
768
769   private final int jjMoveStringLiteralDfa0_2()
770   {
771     switch (curChar)
772     {
773       case 42 :
774         return jjMoveStringLiteralDfa1_2(0x400L);
775       default :
776         return 1;
777     }
778   }
779
780   private final int jjMoveStringLiteralDfa1_2(long active0)
781   {
782     try
783     {
784       curChar = input_stream.readChar();
785     }
786     catch (java.io.IOException JavaDoc e)
787     {
788       return 1;
789     }
790     switch (curChar)
791     {
792       case 47 :
793         if ((active0 & 0x400L) != 0L) return jjStopAtPos(1, 10);
794         break;
795       default :
796         return 2;
797     }
798     return 2;
799   }
800
801   static final int[] jjnextStates = {30, 31, 36, 37, 40, 41, 12, 19, 20, 22, 14, 16, 45, 47, 6, 8, 9, 12, 19, 20, 24,
802       22, 32, 33, 12, 40, 41, 12, 10, 11, 21, 23, 25, 34, 35, 38, 39, 42, 43,};
803
804   private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
805   {
806     switch (hiByte)
807     {
808       case 0 :
809         return ((jjbitVec2[i2] & l2) != 0L);
810       default :
811         if ((jjbitVec0[i1] & l1) != 0L) return true;
812         return false;
813     }
814   }
815
816   private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
817   {
818     switch (hiByte)
819     {
820       case 0 :
821         return ((jjbitVec4[i2] & l2) != 0L);
822       case 48 :
823         return ((jjbitVec5[i2] & l2) != 0L);
824       case 49 :
825         return ((jjbitVec6[i2] & l2) != 0L);
826       case 51 :
827         return ((jjbitVec7[i2] & l2) != 0L);
828       case 61 :
829         return ((jjbitVec8[i2] & l2) != 0L);
830       default :
831         if ((jjbitVec3[i1] & l1) != 0L) return true;
832         return false;
833     }
834   }
835
836   public static final String JavaDoc[] jjstrLiteralImages = {"", null, null, null, null, null, null, null, null, null, null,
837       null, null, null, null, null, null, null, null, null, null, "\154\151\153\145", "\156\165\154\154", "\151\163",
838       "\156\157\164", "\164\162\165\145", "\146\141\154\163\145", "\157\162", "\141\156\144", null, null, null, "\50",
839       "\51", "\54", "\56", "\76", "\74", "\41", "\72", "\75\75", "\75", "\74\75", "\76\75", "\41\75", "\174\174",
840       "\46\46", "\53", "\55", "\52", "\57", "\45", "\73",};
841   public static final String JavaDoc[] lexStateNames = {"DEFAULT", "IN_SINGLE_LINE_COMMENT", "IN_FORMAL_COMMENT",
842       "IN_MULTI_LINE_COMMENT", };
843   public static final int[] jjnewLexState = {-1, -1, -1, -1, -1, -1, 1, 2, 3, 0, 0, 0, -1, -1, -1, -1, -1, -1,
844       -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,
845       -1, -1, -1, -1, -1, -1, -1, };
846   static final long[] jjtoToken = {0x1fffff3ffa2001L,};
847   static final long[] jjtoSkip = {0xe3eL,};
848   static final long[] jjtoSpecial = {0xe3eL,};
849   static final long[] jjtoMore = {0x11c0L,};
850   protected JavaCharStream input_stream;
851   private final int[] jjrounds = new int[48];
852   private final int[] jjstateSet = new int[96];
853   StringBuffer JavaDoc image;
854   int jjimageLen;
855   int lengthOfMatch;
856   protected char curChar;
857
858   public DjOqlParserEngineTokenManager(JavaCharStream stream)
859   {
860     if (JavaCharStream.staticFlag) throw new Error JavaDoc(
861         "ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
862     input_stream = stream;
863   }
864
865   public DjOqlParserEngineTokenManager(JavaCharStream stream, int lexState)
866   {
867     this(stream);
868     SwitchTo(lexState);
869   }
870
871   public void ReInit(JavaCharStream stream)
872   {
873     jjmatchedPos = jjnewStateCnt = 0;
874     curLexState = defaultLexState;
875     input_stream = stream;
876     ReInitRounds();
877   }
878
879   private final void ReInitRounds()
880   {
881     int i;
882     jjround = 0x80000001;
883     for (i = 48; i-- > 0;)
884       jjrounds[i] = 0x80000000;
885   }
886
887   public void ReInit(JavaCharStream stream, int lexState)
888   {
889     ReInit(stream);
890     SwitchTo(lexState);
891   }
892
893   public void SwitchTo(int lexState)
894   {
895     if (lexState >= 4 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState
896                                                                + ". State unchanged.",
897         TokenMgrError.INVALID_LEXICAL_STATE);
898     else curLexState = lexState;
899   }
900
901   protected Token jjFillToken()
902   {
903     Token t = Token.newToken(jjmatchedKind);
904     t.kind = jjmatchedKind;
905     String JavaDoc im = jjstrLiteralImages[jjmatchedKind];
906     t.image = (im == null) ? input_stream.GetImage() : im;
907     t.beginLine = input_stream.getBeginLine();
908     t.beginColumn = input_stream.getBeginColumn();
909     t.endLine = input_stream.getEndLine();
910     t.endColumn = input_stream.getEndColumn();
911     return t;
912   }
913
914   int curLexState = 0;
915   int defaultLexState = 0;
916   int jjnewStateCnt;
917   int jjround;
918   int jjmatchedPos;
919   int jjmatchedKind;
920
921   public Token getNextToken()
922   {
923     int kind;
924     Token specialToken = null;
925     Token matchedToken;
926     int curPos = 0;
927
928     EOFLoop : for (;;)
929     {
930       try
931       {
932         curChar = input_stream.BeginToken();
933       }
934       catch (java.io.IOException JavaDoc e)
935       {
936         jjmatchedKind = 0;
937         matchedToken = jjFillToken();
938         matchedToken.specialToken = specialToken;
939         return matchedToken;
940       }
941       image = null;
942       jjimageLen = 0;
943
944       for (;;)
945       {
946         switch (curLexState)
947         {
948           case 0 :
949             jjmatchedKind = 0x7fffffff;
950             jjmatchedPos = 0;
951             curPos = jjMoveStringLiteralDfa0_0();
952             break;
953           case 1 :
954             jjmatchedKind = 0x7fffffff;
955             jjmatchedPos = 0;
956             curPos = jjMoveStringLiteralDfa0_1();
957             if (jjmatchedPos == 0 && jjmatchedKind > 12)
958             {
959               jjmatchedKind = 12;
960             }
961             break;
962           case 2 :
963             jjmatchedKind = 0x7fffffff;
964             jjmatchedPos = 0;
965             curPos = jjMoveStringLiteralDfa0_2();
966             if (jjmatchedPos == 0 && jjmatchedKind > 12)
967             {
968               jjmatchedKind = 12;
969             }
970             break;
971           case 3 :
972             jjmatchedKind = 0x7fffffff;
973             jjmatchedPos = 0;
974             curPos = jjMoveStringLiteralDfa0_3();
975             if (jjmatchedPos == 0 && jjmatchedKind > 12)
976             {
977               jjmatchedKind = 12;
978             }
979             break;
980         }
981         if (jjmatchedKind != 0x7fffffff)
982         {
983           if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1);
984           if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
985           {
986             matchedToken = jjFillToken();
987             matchedToken.specialToken = specialToken;
988             if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind];
989             return matchedToken;
990           }
991           else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
992           {
993             if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
994             {
995               matchedToken = jjFillToken();
996               if (specialToken == null) specialToken = matchedToken;
997               else
998               {
999                 matchedToken.specialToken = specialToken;
1000                specialToken = (specialToken.next = matchedToken);
1001              }
1002              SkipLexicalActions(matchedToken);
1003            }
1004            else SkipLexicalActions(null);
1005            if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind];
1006            continue EOFLoop;
1007          }
1008          MoreLexicalActions();
1009          if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind];
1010          curPos = 0;
1011          jjmatchedKind = 0x7fffffff;
1012          try
1013          {
1014            curChar = input_stream.readChar();
1015            continue;
1016          }
1017          catch (java.io.IOException JavaDoc e1)
1018          {
1019          }
1020        }
1021        int error_line = input_stream.getEndLine();
1022        int error_column = input_stream.getEndColumn();
1023        String JavaDoc error_after = null;
1024        boolean EOFSeen = false;
1025        try
1026        {
1027          input_stream.readChar();
1028          input_stream.backup(1);
1029        }
1030        catch (java.io.IOException JavaDoc e1)
1031        {
1032          EOFSeen = true;
1033          error_after = curPos <= 1 ? "" : input_stream.GetImage();
1034          if (curChar == '\n' || curChar == '\r')
1035          {
1036            error_line++;
1037            error_column = 0;
1038          }
1039          else error_column++;
1040        }
1041        if (!EOFSeen)
1042        {
1043          input_stream.backup(1);
1044          error_after = curPos <= 1 ? "" : input_stream.GetImage();
1045        }
1046        throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar,
1047            TokenMgrError.LEXICAL_ERROR);
1048      }
1049    }
1050  }
1051
1052  void SkipLexicalActions(Token matchedToken)
1053  {
1054    switch (jjmatchedKind)
1055    {
1056      default :
1057        break;
1058    }
1059  }
1060
1061  void MoreLexicalActions()
1062  {
1063    jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
1064    switch (jjmatchedKind)
1065    {
1066      case 7 :
1067        if (image == null) image = new StringBuffer JavaDoc(new String JavaDoc(input_stream.GetSuffix(jjimageLen)));
1068        else image.append(input_stream.GetSuffix(jjimageLen));
1069        jjimageLen = 0;
1070        input_stream.backup(1);
1071        break;
1072      default :
1073        break;
1074    }
1075  }
1076}
Popular Tags