KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > el > parser > ELParserTokenManager


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