KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > aspectwerkz > annotation > expression > ast > AnnotationParserTokenManager


1 /* Generated By:JJTree&JavaCC: Do not edit this line. AnnotationParserTokenManager.java */
2 /**************************************************************************************
3  * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
4  * http://aspectwerkz.codehaus.org *
5  * ---------------------------------------------------------------------------------- *
6  * The software in this package is published under the terms of the LGPL license *
7  * a copy of which has been included with this distribution in the license.txt file. *
8  **************************************************************************************/

9 package org.codehaus.aspectwerkz.annotation.expression.ast;
10 import java.lang.reflect.Modifier JavaDoc;
11 import java.io.Reader JavaDoc;
12 import java.io.StringReader JavaDoc;
13
14 public class AnnotationParserTokenManager implements AnnotationParserConstants
15 {
16   public static java.io.PrintStream JavaDoc debugStream = System.out;
17   public static void setDebugStream(java.io.PrintStream JavaDoc ds) { debugStream = ds; }
18 private static final int jjStopStringLiteralDfa_0(int pos, long active0)
19 {
20    switch (pos)
21    {
22       case 0:
23          if ((active0 & 0x8L) != 0L)
24             return 5;
25          return -1;
26       default :
27          return -1;
28    }
29 }
30 private static final int jjStartNfa_0(int pos, long active0)
31 {
32    return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
33 }
34 static private final int jjStopAtPos(int pos, int kind)
35 {
36    jjmatchedKind = kind;
37    jjmatchedPos = pos;
38    return pos + 1;
39 }
40 static private final int jjStartNfaWithStates_0(int pos, int kind, int state)
41 {
42    jjmatchedKind = kind;
43    jjmatchedPos = pos;
44    try { curChar = input_stream.readChar(); }
45    catch(java.io.IOException JavaDoc e) { return pos + 1; }
46    return jjMoveNfa_0(state, pos + 1);
47 }
48 static private final int jjMoveStringLiteralDfa0_0()
49 {
50    switch(curChar)
51    {
52       case 10:
53          return jjStopAtPos(0, 13);
54       case 13:
55          return jjMoveStringLiteralDfa1_0(0x4000000L);
56       case 40:
57          return jjStopAtPos(0, 14);
58       case 41:
59          return jjStopAtPos(0, 15);
60       case 44:
61          return jjStopAtPos(0, 18);
62       case 46:
63          return jjStartNfaWithStates_0(0, 3, 5);
64       case 61:
65          return jjStopAtPos(0, 19);
66       case 123:
67          return jjStopAtPos(0, 16);
68       case 125:
69          return jjStopAtPos(0, 17);
70       default :
71          return jjMoveNfa_0(0, 0);
72    }
73 }
74 static private final int jjMoveStringLiteralDfa1_0(long active0)
75 {
76    try { curChar = input_stream.readChar(); }
77    catch(java.io.IOException JavaDoc e) {
78       jjStopStringLiteralDfa_0(0, active0);
79       return 1;
80    }
81    switch(curChar)
82    {
83       case 10:
84          if ((active0 & 0x4000000L) != 0L)
85             return jjStopAtPos(1, 26);
86          break;
87       default :
88          break;
89    }
90    return jjStartNfa_0(0, active0);
91 }
92 static private final void jjCheckNAdd(int state)
93 {
94    if (jjrounds[state] != jjround)
95    {
96       jjstateSet[jjnewStateCnt++] = state;
97       jjrounds[state] = jjround;
98    }
99 }
100 static private final void jjAddStates(int start, int end)
101 {
102    do {
103       jjstateSet[jjnewStateCnt++] = jjnextStates[start];
104    } while (start++ != end);
105 }
106 static private final void jjCheckNAddTwoStates(int state1, int state2)
107 {
108    jjCheckNAdd(state1);
109    jjCheckNAdd(state2);
110 }
111 static private final void jjCheckNAddStates(int start, int end)
112 {
113    do {
114       jjCheckNAdd(jjnextStates[start]);
115    } while (start++ != end);
116 }
117 static private final void jjCheckNAddStates(int start)
118 {
119    jjCheckNAdd(jjnextStates[start]);
120    jjCheckNAdd(jjnextStates[start + 1]);
121 }
122 static final long[] jjbitVec0 = {
123    0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
124 };
125 static private final int jjMoveNfa_0(int startState, int curPos)
126 {
127    int[] nextStates;
128    int startsAt = 0;
129    jjnewStateCnt = 97;
130    int i = 1;
131    jjstateSet[0] = startState;
132    int j, kind = 0x7fffffff;
133    for (;;)
134    {
135       if (++jjround == 0x7fffffff)
136          ReInitRounds();
137       if (curChar < 64)
138       {
139          long l = 1L << curChar;
140          MatchLoop: do
141          {
142             switch(jjstateSet[--i])
143             {
144                case 0:
145                   if ((0x3ff081800000000L & l) != 0L)
146                   {
147                      if (kind > 22)
148                         kind = 22;
149                      jjCheckNAddStates(0, 6);
150                   }
151                   else if (curChar == 39)
152                      jjAddStates(7, 9);
153                   else if (curChar == 34)
154                      jjCheckNAddStates(10, 13);
155                   else if (curChar == 46)
156                      jjCheckNAdd(5);
157                   else if (curChar == 45)
158                      jjstateSet[jjnewStateCnt++] = 1;
159                   if ((0x3ff000000000000L & l) != 0L)
160                      jjCheckNAddStates(14, 20);
161                   if ((0x3fe000000000000L & l) != 0L)
162                   {
163                      if (kind > 4)
164                         kind = 4;
165                      jjCheckNAddTwoStates(2, 3);
166                   }
167                   else if (curChar == 48)
168                   {
169                      if (kind > 4)
170                         kind = 4;
171                      jjCheckNAddStates(21, 23);
172                   }
173                   break;
174                case 1:
175                   if ((0x3fe000000000000L & l) == 0L)
176                      break;
177                   if (kind > 4)
178                      kind = 4;
179                   jjCheckNAddTwoStates(2, 3);
180                   break;
181                case 2:
182                   if ((0x3ff000000000000L & l) == 0L)
183                      break;
184                   if (kind > 4)
185                      kind = 4;
186                   jjCheckNAddTwoStates(2, 3);
187                   break;
188                case 4:
189                   if (curChar == 46)
190                      jjCheckNAdd(5);
191                   break;
192                case 5:
193                   if ((0x3ff000000000000L & l) == 0L)
194                      break;
195                   if (kind > 7)
196                      kind = 7;
197                   jjCheckNAddStates(24, 26);
198                   break;
199                case 7:
200                   if ((0x280000000000L & l) != 0L)
201                      jjCheckNAdd(8);
202                   break;
203                case 8:
204                   if ((0x3ff000000000000L & l) == 0L)
205                      break;
206                   if (kind > 7)
207                      kind = 7;
208                   jjCheckNAddTwoStates(8, 9);
209                   break;
210                case 26:
211                   if (curChar == 34)
212                      jjCheckNAddStates(10, 13);
213                   break;
214                case 27:
215                   if ((0xfffffffbffffdbffL & l) != 0L)
216                      jjCheckNAddStates(10, 13);
217                   break;
218                case 29:
219                   if ((0x8400000000L & l) != 0L)
220                      jjCheckNAddStates(10, 13);
221                   break;
222                case 31:
223                   if ((0x3ff000000000000L & l) != 0L)
224                      jjstateSet[jjnewStateCnt++] = 32;
225                   break;
226                case 32:
227                   if ((0x3ff000000000000L & l) != 0L)
228                      jjstateSet[jjnewStateCnt++] = 33;
229                   break;
230                case 33:
231                   if ((0x3ff000000000000L & l) != 0L)
232                      jjstateSet[jjnewStateCnt++] = 34;
233                   break;
234                case 34:
235                   if ((0x3ff000000000000L & l) != 0L)
236                      jjCheckNAddStates(10, 13);
237                   break;
238                case 36:
239                   if (curChar == 34 && kind > 11)
240                      kind = 11;
241                   break;
242                case 37:
243                   if ((0xff000000000000L & l) != 0L)
244                      jjCheckNAddStates(27, 31);
245                   break;
246                case 38:
247                   if ((0xff000000000000L & l) != 0L)
248                      jjCheckNAddStates(10, 13);
249                   break;
250                case 39:
251                   if ((0xf000000000000L & l) != 0L)
252                      jjstateSet[jjnewStateCnt++] = 40;
253                   break;
254                case 40:
255                   if ((0xff000000000000L & l) != 0L)
256                      jjCheckNAdd(38);
257                   break;
258                case 41:
259                   if (curChar == 39)
260                      jjAddStates(7, 9);
261                   break;
262                case 42:
263                   if ((0xffffff7fffffdbffL & l) != 0L)
264                      jjCheckNAdd(43);
265                   break;
266                case 43:
267                   if (curChar == 39 && kind > 12)
268                      kind = 12;
269                   break;
270                case 45:
271                   if ((0x8400000000L & l) != 0L)
272                      jjCheckNAdd(43);
273                   break;
274                case 46:
275                   if ((0xff000000000000L & l) != 0L)
276                      jjCheckNAddTwoStates(47, 43);
277                   break;
278                case 47:
279                   if ((0xff000000000000L & l) != 0L)
280                      jjCheckNAdd(43);
281                   break;
282                case 48:
283                   if ((0xf000000000000L & l) != 0L)
284                      jjstateSet[jjnewStateCnt++] = 49;
285                   break;
286                case 49:
287                   if ((0xff000000000000L & l) != 0L)
288                      jjCheckNAdd(47);
289                   break;
290                case 51:
291                   if ((0x3ff000000000000L & l) != 0L)
292                      jjstateSet[jjnewStateCnt++] = 52;
293                   break;
294                case 52:
295                   if ((0x3ff000000000000L & l) != 0L)
296                      jjstateSet[jjnewStateCnt++] = 53;
297                   break;
298                case 53:
299                   if ((0x3ff000000000000L & l) != 0L)
300                      jjstateSet[jjnewStateCnt++] = 54;
301                   break;
302                case 54:
303                   if ((0x3ff000000000000L & l) != 0L)
304                      jjCheckNAdd(43);
305                   break;
306                case 57:
307                   if ((0x3ff081800000000L & l) == 0L)
308                      break;
309                   if (kind > 21)
310                      kind = 21;
311                   jjCheckNAddTwoStates(57, 58);
312                   break;
313                case 58:
314                   if (curChar == 46)
315                      jjCheckNAdd(59);
316                   break;
317                case 59:
318                   if ((0x3ff081800000000L & l) == 0L)
319                      break;
320                   if (kind > 21)
321                      kind = 21;
322                   jjCheckNAddTwoStates(58, 59);
323                   break;
324                case 60:
325                   if ((0x3ff000000000000L & l) != 0L)
326                      jjCheckNAddStates(14, 20);
327                   break;
328                case 61:
329                   if ((0x3ff000000000000L & l) != 0L)
330                      jjCheckNAddTwoStates(61, 62);
331                   break;
332                case 62:
333                   if (curChar != 46)
334                      break;
335                   if (kind > 7)
336                      kind = 7;
337                   jjCheckNAddStates(32, 34);
338                   break;
339                case 63:
340                   if ((0x3ff000000000000L & l) == 0L)
341                      break;
342                   if (kind > 7)
343                      kind = 7;
344                   jjCheckNAddStates(32, 34);
345                   break;
346                case 65:
347                   if ((0x280000000000L & l) != 0L)
348                      jjCheckNAdd(66);
349                   break;
350                case 66:
351                   if ((0x3ff000000000000L & l) == 0L)
352                      break;
353                   if (kind > 7)
354                      kind = 7;
355                   jjCheckNAddTwoStates(66, 9);
356                   break;
357                case 67:
358                   if ((0x3ff000000000000L & l) != 0L)
359                      jjCheckNAddTwoStates(67, 68);
360                   break;
361                case 69:
362                   if ((0x280000000000L & l) != 0L)
363                      jjCheckNAdd(70);
364                   break;
365                case 70:
366                   if ((0x3ff000000000000L & l) == 0L)
367                      break;
368                   if (kind > 7)
369                      kind = 7;
370                   jjCheckNAddTwoStates(70, 9);
371                   break;
372                case 71:
373                   if ((0x3ff000000000000L & l) != 0L)
374                      jjCheckNAddStates(35, 37);
375                   break;
376                case 73:
377                   if ((0x280000000000L & l) != 0L)
378                      jjCheckNAdd(74);
379                   break;
380                case 74:
381                   if ((0x3ff000000000000L & l) != 0L)
382                      jjCheckNAddTwoStates(74, 9);
383                   break;
384                case 75:
385                   if (curChar != 48)
386                      break;
387                   if (kind > 4)
388                      kind = 4;
389                   jjCheckNAddStates(21, 23);
390                   break;
391                case 77:
392                   if ((0x3ff000000000000L & l) == 0L)
393                      break;
394                   if (kind > 5)
395                      kind = 5;
396                   jjAddStates(38, 39);
397                   break;
398                case 79:
399                   if ((0xff000000000000L & l) == 0L)
400                      break;
401                   if (kind > 6)
402                      kind = 6;
403                   jjCheckNAddTwoStates(79, 80);
404                   break;
405                case 81:
406                   if ((0x3ff081800000000L & l) == 0L)
407                      break;
408                   if (kind > 22)
409                      kind = 22;
410                   jjCheckNAddStates(0, 6);
411                   break;
412                case 82:
413                   if ((0x3ff081800000000L & l) == 0L)
414                      break;
415                   if (kind > 22)
416                      kind = 22;
417                   jjCheckNAdd(82);
418                   break;
419                case 83:
420                   if ((0x3ff081800000000L & l) == 0L)
421                      break;
422                   if (kind > 23)
423                      kind = 23;
424                   jjCheckNAddStates(40, 43);
425                   break;
426                case 84:
427                   if (curChar == 46)
428                      jjCheckNAdd(85);
429                   break;
430                case 85:
431                   if ((0x3ff081800000000L & l) == 0L)
432                      break;
433                   if (kind > 23)
434                      kind = 23;
435                   jjCheckNAddStates(44, 47);
436                   break;
437                case 93:
438                   if (curChar == 46)
439                      jjstateSet[jjnewStateCnt++] = 92;
440                   break;
441                case 94:
442                   if ((0x3ff081800000000L & l) == 0L)
443                      break;
444                   if (kind > 24)
445                      kind = 24;
446                   jjCheckNAddTwoStates(94, 95);
447                   break;
448                case 95:
449                   if (curChar == 46)
450                      jjCheckNAdd(96);
451                   break;
452                case 96:
453                   if ((0x3ff081800000000L & l) == 0L)
454                      break;
455                   if (kind > 24)
456                      kind = 24;
457                   jjCheckNAddTwoStates(95, 96);
458                   break;
459                default : break;
460             }
461          } while(i != startsAt);
462       }
463       else if (curChar < 128)
464       {
465          long l = 1L << (curChar & 077);
466          MatchLoop: do
467          {
468             switch(jjstateSet[--i])
469             {
470                case 0:
471                   if ((0x7fffffe87fffffeL & l) != 0L)
472                   {
473                      if (kind > 22)
474                         kind = 22;
475                      jjCheckNAddStates(0, 6);
476                   }
477                   else if (curChar == 64)
478                      jjCheckNAdd(57);
479                   if (curChar == 70)
480                      jjstateSet[jjnewStateCnt++] = 24;
481                   else if (curChar == 84)
482                      jjstateSet[jjnewStateCnt++] = 20;
483                   else if (curChar == 102)
484                      jjstateSet[jjnewStateCnt++] = 16;
485                   else if (curChar == 116)
486                      jjstateSet[jjnewStateCnt++] = 12;
487                   break;
488                case 3:
489                   if ((0x100000001000L & l) != 0L && kind > 4)
490                      kind = 4;
491                   break;
492                case 6:
493                   if ((0x2000000020L & l) != 0L)
494                      jjAddStates(48, 49);
495                   break;
496                case 9:
497                   if ((0x5000000050L & l) != 0L && kind > 7)
498                      kind = 7;
499                   break;
500                case 10:
501                   if (curChar == 101 && kind > 10)
502                      kind = 10;
503                   break;
504                case 11:
505                   if (curChar == 117)
506                      jjCheckNAdd(10);
507                   break;
508                case 12:
509                   if (curChar == 114)
510                      jjstateSet[jjnewStateCnt++] = 11;
511                   break;
512                case 13:
513                   if (curChar == 116)
514                      jjstateSet[jjnewStateCnt++] = 12;
515                   break;
516                case 14:
517                   if (curChar == 115)
518                      jjCheckNAdd(10);
519                   break;
520                case 15:
521                   if (curChar == 108)
522                      jjstateSet[jjnewStateCnt++] = 14;
523                   break;
524                case 16:
525                   if (curChar == 97)
526                      jjstateSet[jjnewStateCnt++] = 15;
527                   break;
528                case 17:
529                   if (curChar == 102)
530                      jjstateSet[jjnewStateCnt++] = 16;
531                   break;
532                case 18:
533                   if (curChar == 69 && kind > 10)
534                      kind = 10;
535                   break;
536                case 19:
537                   if (curChar == 85)
538                      jjCheckNAdd(18);
539                   break;
540                case 20:
541                   if (curChar == 82)
542                      jjstateSet[jjnewStateCnt++] = 19;
543                   break;
544                case 21:
545                   if (curChar == 84)
546                      jjstateSet[jjnewStateCnt++] = 20;
547                   break;
548                case 22:
549                   if (curChar == 83)
550                      jjCheckNAdd(18);
551                   break;
552                case 23:
553                   if (curChar == 76)
554                      jjstateSet[jjnewStateCnt++] = 22;
555                   break;
556                case 24:
557                   if (curChar == 65)
558                      jjstateSet[jjnewStateCnt++] = 23;
559                   break;
560                case 25:
561                   if (curChar == 70)
562                      jjstateSet[jjnewStateCnt++] = 24;
563                   break;
564                case 27:
565                   if ((0xffffffffefffffffL & l) != 0L)
566                      jjCheckNAddStates(10, 13);
567                   break;
568                case 28:
569                   if (curChar == 92)
570                      jjAddStates(50, 52);
571                   break;
572                case 29:
573                   if ((0x14404410000000L & l) != 0L)
574                      jjCheckNAddStates(10, 13);
575                   break;
576                case 30:
577                   if (curChar == 117)
578                      jjstateSet[jjnewStateCnt++] = 31;
579                   break;
580                case 31:
581                   if ((0x7e0000007eL & l) != 0L)
582                      jjstateSet[jjnewStateCnt++] = 32;
583                   break;
584                case 32:
585                   if ((0x7e0000007eL & l) != 0L)
586                      jjstateSet[jjnewStateCnt++] = 33;
587                   break;
588                case 33:
589                   if ((0x7e0000007eL & l) != 0L)
590                      jjstateSet[jjnewStateCnt++] = 34;
591                   break;
592                case 34:
593                   if ((0x7e0000007eL & l) != 0L)
594                      jjCheckNAddStates(10, 13);
595                   break;
596                case 35:
597                   if (curChar == 92)
598                      jjstateSet[jjnewStateCnt++] = 30;
599                   break;
600                case 42:
601                   if ((0xffffffffefffffffL & l) != 0L)
602                      jjCheckNAdd(43);
603                   break;
604                case 44:
605                   if (curChar == 92)
606                      jjAddStates(53, 55);
607                   break;
608                case 45:
609                   if ((0x14404410000000L & l) != 0L)
610                      jjCheckNAdd(43);
611                   break;
612                case 50:
613                   if (curChar == 117)
614                      jjstateSet[jjnewStateCnt++] = 51;
615                   break;
616                case 51:
617                   if ((0x7e0000007eL & l) != 0L)
618                      jjstateSet[jjnewStateCnt++] = 52;
619                   break;
620                case 52:
621                   if ((0x7e0000007eL & l) != 0L)
622                      jjstateSet[jjnewStateCnt++] = 53;
623                   break;
624                case 53:
625                   if ((0x7e0000007eL & l) != 0L)
626                      jjstateSet[jjnewStateCnt++] = 54;
627                   break;
628                case 54:
629                   if ((0x7e0000007eL & l) != 0L)
630                      jjCheckNAdd(43);
631                   break;
632                case 55:
633                   if (curChar == 92)
634                      jjstateSet[jjnewStateCnt++] = 50;
635                   break;
636                case 56:
637                   if (curChar == 64)
638                      jjCheckNAdd(57);
639                   break;
640                case 57:
641                   if ((0x7fffffe87fffffeL & l) == 0L)
642                      break;
643                   if (kind > 21)
644                      kind = 21;
645                   jjCheckNAddTwoStates(57, 58);
646                   break;
647                case 59:
648                   if ((0x7fffffe87fffffeL & l) == 0L)
649                      break;
650                   if (kind > 21)
651                      kind = 21;
652                   jjCheckNAddTwoStates(58, 59);
653                   break;
654                case 64:
655                   if ((0x2000000020L & l) != 0L)
656                      jjAddStates(56, 57);
657                   break;
658                case 68:
659                   if ((0x2000000020L & l) != 0L)
660                      jjAddStates(58, 59);
661                   break;
662                case 72:
663                   if ((0x2000000020L & l) != 0L)
664                      jjAddStates(60, 61);
665                   break;
666                case 76:
667                   if ((0x100000001000000L & l) != 0L)
668                      jjCheckNAdd(77);
669                   break;
670                case 77:
671                   if ((0x7e0000007eL & l) == 0L)
672                      break;
673                   if (kind > 5)
674                      kind = 5;
675                   jjCheckNAddTwoStates(77, 78);
676                   break;
677                case 78:
678                   if ((0x100000001000L & l) != 0L && kind > 5)
679                      kind = 5;
680                   break;
681                case 80:
682                   if ((0x100000001000L & l) != 0L && kind > 6)
683                      kind = 6;
684                   break;
685                case 81:
686                   if ((0x7fffffe87fffffeL & l) == 0L)
687                      break;
688                   if (kind > 22)
689                      kind = 22;
690                   jjCheckNAddStates(0, 6);
691                   break;
692                case 82:
693                   if ((0x7fffffe87fffffeL & l) == 0L)
694                      break;
695                   if (kind > 22)
696                      kind = 22;
697                   jjCheckNAdd(82);
698                   break;
699                case 83:
700                   if ((0x7fffffe87fffffeL & l) == 0L)
701                      break;
702                   if (kind > 23)
703                      kind = 23;
704                   jjCheckNAddStates(40, 43);
705                   break;
706                case 85:
707                   if ((0x7fffffe87fffffeL & l) == 0L)
708                      break;
709                   if (kind > 23)
710                      kind = 23;
711                   jjCheckNAddStates(44, 47);
712                   break;
713                case 86:
714                   if (curChar == 93)
715                      jjCheckNAddTwoStates(87, 93);
716                   break;
717                case 87:
718                   if (curChar == 91)
719                      jjstateSet[jjnewStateCnt++] = 86;
720                   break;
721                case 88:
722                   if (curChar == 115 && kind > 23)
723                      kind = 23;
724                   break;
725                case 89:
726                   if (curChar == 115)
727                      jjstateSet[jjnewStateCnt++] = 88;
728                   break;
729                case 90:
730                   if (curChar == 97)
731                      jjstateSet[jjnewStateCnt++] = 89;
732                   break;
733                case 91:
734                   if (curChar == 108)
735                      jjstateSet[jjnewStateCnt++] = 90;
736                   break;
737                case 92:
738                   if (curChar == 99)
739                      jjstateSet[jjnewStateCnt++] = 91;
740                   break;
741                case 94:
742                   if ((0x7fffffe87fffffeL & l) == 0L)
743                      break;
744                   if (kind > 24)
745                      kind = 24;
746                   jjCheckNAddTwoStates(94, 95);
747                   break;
748                case 96:
749                   if ((0x7fffffe87fffffeL & l) == 0L)
750                      break;
751                   if (kind > 24)
752                      kind = 24;
753                   jjCheckNAddTwoStates(95, 96);
754                   break;
755                default : break;
756             }
757          } while(i != startsAt);
758       }
759       else
760       {
761          int i2 = (curChar & 0xff) >> 6;
762          long l2 = 1L << (curChar & 077);
763          MatchLoop: do
764          {
765             switch(jjstateSet[--i])
766             {
767                case 27:
768                   if ((jjbitVec0[i2] & l2) != 0L)
769                      jjAddStates(10, 13);
770                   break;
771                case 42:
772                   if ((jjbitVec0[i2] & l2) != 0L)
773                      jjstateSet[jjnewStateCnt++] = 43;
774                   break;
775                default : break;
776             }
777          } while(i != startsAt);
778       }
779       if (kind != 0x7fffffff)
780       {
781          jjmatchedKind = kind;
782          jjmatchedPos = curPos;
783          kind = 0x7fffffff;
784       }
785       ++curPos;
786       if ((i = jjnewStateCnt) == (startsAt = 97 - (jjnewStateCnt = startsAt)))
787          return curPos;
788       try { curChar = input_stream.readChar(); }
789       catch(java.io.IOException JavaDoc e) { return curPos; }
790    }
791 }
792 static final int[] jjnextStates = {
793    82, 83, 84, 87, 93, 94, 95, 42, 44, 55, 27, 28, 35, 36, 61, 62,
794    67, 68, 71, 72, 9, 76, 79, 80, 5, 6, 9, 27, 28, 38, 35, 36,
795    63, 64, 9, 71, 72, 9, 77, 78, 83, 84, 87, 93, 84, 85, 87, 93,
796    7, 8, 29, 37, 39, 45, 46, 48, 65, 66, 69, 70, 73, 74,
797 };
798 public static final String JavaDoc[] jjstrLiteralImages = {
799 "", null, null, "\56", null, null, null, null, null, null, null, null, null,
800 "\12", "\50", "\51", "\173", "\175", "\54", "\75", null, null, null, null, null, null,
801 "\15\12", };
802 public static final String JavaDoc[] lexStateNames = {
803    "DEFAULT",
804 };
805 static final long[] jjtoToken = {
806    0x5effcf9L,
807 };
808 static final long[] jjtoSkip = {
809    0x6L,
810 };
811 static protected SimpleCharStream input_stream;
812 static private final int[] jjrounds = new int[97];
813 static private final int[] jjstateSet = new int[194];
814 static protected char curChar;
815 public AnnotationParserTokenManager(SimpleCharStream stream)
816 {
817    if (input_stream != null)
818       throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);
819    input_stream = stream;
820 }
821 public AnnotationParserTokenManager(SimpleCharStream stream, int lexState)
822 {
823    this(stream);
824    SwitchTo(lexState);
825 }
826 static public void ReInit(SimpleCharStream stream)
827 {
828    jjmatchedPos = jjnewStateCnt = 0;
829    curLexState = defaultLexState;
830    input_stream = stream;
831    ReInitRounds();
832 }
833 static private final void ReInitRounds()
834 {
835    int i;
836    jjround = 0x80000001;
837    for (i = 97; i-- > 0;)
838       jjrounds[i] = 0x80000000;
839 }
840 static public void ReInit(SimpleCharStream stream, int lexState)
841 {
842    ReInit(stream);
843    SwitchTo(lexState);
844 }
845 static public void SwitchTo(int lexState)
846 {
847    if (lexState >= 1 || lexState < 0)
848       throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
849    else
850       curLexState = lexState;
851 }
852
853 static protected Token jjFillToken()
854 {
855    Token t = Token.newToken(jjmatchedKind);
856    t.kind = jjmatchedKind;
857    String JavaDoc im = jjstrLiteralImages[jjmatchedKind];
858    t.image = (im == null) ? input_stream.GetImage() : im;
859    t.beginLine = input_stream.getBeginLine();
860    t.beginColumn = input_stream.getBeginColumn();
861    t.endLine = input_stream.getEndLine();
862    t.endColumn = input_stream.getEndColumn();
863    return t;
864 }
865
866 static int curLexState = 0;
867 static int defaultLexState = 0;
868 static int jjnewStateCnt;
869 static int jjround;
870 static int jjmatchedPos;
871 static int jjmatchedKind;
872
873 public static Token getNextToken()
874 {
875   int kind;
876   Token specialToken = null;
877   Token matchedToken;
878   int curPos = 0;
879
880   EOFLoop :
881   for (;;)
882   {
883    try
884    {
885       curChar = input_stream.BeginToken();
886    }
887    catch(java.io.IOException JavaDoc e)
888    {
889       jjmatchedKind = 0;
890       matchedToken = jjFillToken();
891       return matchedToken;
892    }
893
894    try { input_stream.backup(0);
895       while (curChar <= 32 && (0x100000200L & (1L << curChar)) != 0L)
896          curChar = input_stream.BeginToken();
897    }
898    catch (java.io.IOException JavaDoc e1) { continue EOFLoop; }
899    jjmatchedKind = 0x7fffffff;
900    jjmatchedPos = 0;
901    curPos = jjMoveStringLiteralDfa0_0();
902    if (jjmatchedKind != 0x7fffffff)
903    {
904       if (jjmatchedPos + 1 < curPos)
905          input_stream.backup(curPos - jjmatchedPos - 1);
906       if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
907       {
908          matchedToken = jjFillToken();
909          return matchedToken;
910       }
911       else
912       {
913          continue EOFLoop;
914       }
915    }
916    int error_line = input_stream.getEndLine();
917    int error_column = input_stream.getEndColumn();
918    String JavaDoc error_after = null;
919    boolean EOFSeen = false;
920    try { input_stream.readChar(); input_stream.backup(1); }
921    catch (java.io.IOException JavaDoc e1) {
922       EOFSeen = true;
923       error_after = curPos <= 1 ? "" : input_stream.GetImage();
924       if (curChar == '\n' || curChar == '\r') {
925          error_line++;
926          error_column = 0;
927       }
928       else
929          error_column++;
930    }
931    if (!EOFSeen) {
932       input_stream.backup(1);
933       error_after = curPos <= 1 ? "" : input_stream.GetImage();
934    }
935    throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
936   }
937 }
938
939 }
940
Popular Tags