KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cayenne > exp > parser > ExpressionParserTokenManager


1 /* Generated By:JJTree&JavaCC: Do not edit this line. ExpressionParserTokenManager.java */
2 /*****************************************************************
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements. See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership. The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License. You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied. See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  ****************************************************************/

20
21
22 package org.apache.cayenne.exp.parser;
23 import java.io.*;
24 import java.util.*;
25 import java.math.*;
26 import org.apache.cayenne.exp.*;
27
28 public class ExpressionParserTokenManager implements ExpressionParserConstants
29 {
30       /** Holds the last value computed by a constant token. */
31     Object JavaDoc literalValue;
32
33       /** Holds the last string literal parsed. */
34     private StringBuffer JavaDoc stringBuffer;
35
36       /** Converts an escape sequence into a character value. */
37     private char escapeChar()
38     {
39         int ofs = image.length() - 1;
40         switch ( image.charAt(ofs) ) {
41             case 'n': return '\n';
42             case 'r': return '\r';
43             case 't': return '\t';
44             case 'b': return '\b';
45             case 'f': return '\f';
46             case '\\': return '\\';
47             case '\'': return '\'';
48             case '\"': return '\"';
49         }
50
51           // Otherwise, it's an octal number. Find the backslash and convert.
52
while ( image.charAt(--ofs) != '\\' )
53           {}
54         int value = 0;
55         while ( ++ofs < image.length() )
56             value = (value << 3) | (image.charAt(ofs) - '0');
57         return (char) value;
58     }
59
60     private Object JavaDoc makeInt()
61     {
62         Object JavaDoc result;
63         String JavaDoc s = image.toString();
64         int base = 10;
65
66         if ( s.charAt(0) == '0' )
67             base = (s.length() > 1 && (s.charAt(1) == 'x' || s.charAt(1) == 'X'))? 16 : 8;
68         if ( base == 16 )
69             s = s.substring(2); // Trim the 0x off the front
70
switch ( s.charAt(s.length()-1) ) {
71             case 'l': case 'L':
72                 result = Long.valueOf( s.substring(0,s.length()-1), base );
73                 break;
74
75             case 'h': case 'H':
76                 result = new BigInteger( s.substring(0,s.length()-1), base );
77                 break;
78
79             default:
80                 result = Integer.valueOf( s, base );
81                 break;
82         }
83         return result;
84     }
85
86     private Object JavaDoc makeFloat()
87     {
88         String JavaDoc s = image.toString();
89         switch ( s.charAt(s.length()-1) ) {
90             case 'f': case 'F':
91                 return Float.valueOf( s );
92
93             case 'b': case 'B':
94                 return new BigDecimal( s.substring(0,s.length()-1) );
95
96             case 'd': case 'D':
97             default:
98                 return Double.valueOf( s );
99         }
100     }
101   public java.io.PrintStream JavaDoc debugStream = System.out;
102   public void setDebugStream(java.io.PrintStream JavaDoc ds) { debugStream = ds; }
103 private final int jjStopStringLiteralDfa_0(int pos, long active0)
104 {
105    switch (pos)
106    {
107       case 0:
108          if ((active0 & 0x8L) != 0L)
109          {
110             jjmatchedKind = 34;
111             return 2;
112          }
113          if ((active0 & 0x604e006L) != 0L)
114          {
115             jjmatchedKind = 34;
116             return 54;
117          }
118          return -1;
119       case 1:
120          if ((active0 & 0x8002L) != 0L)
121             return 54;
122          if ((active0 & 0x604600cL) != 0L)
123          {
124             jjmatchedKind = 34;
125             jjmatchedPos = 1;
126             return 54;
127          }
128          return -1;
129       case 2:
130          if ((active0 & 0xcL) != 0L)
131             return 54;
132          if ((active0 & 0x2046000L) != 0L)
133          {
134             jjmatchedKind = 34;
135             jjmatchedPos = 2;
136             return 54;
137          }
138          return -1;
139       case 3:
140          if ((active0 & 0x6000L) != 0L)
141             return 54;
142          if ((active0 & 0x40000L) != 0L)
143          {
144             if (jjmatchedPos != 3)
145             {
146                jjmatchedKind = 34;
147                jjmatchedPos = 3;
148             }
149             return 54;
150          }
151          return -1;
152       case 4:
153          if ((active0 & 0x44000L) != 0L)
154          {
155             jjmatchedKind = 34;
156             jjmatchedPos = 4;
157             return 54;
158          }
159          return -1;
160       case 5:
161          if ((active0 & 0x44000L) != 0L)
162          {
163             jjmatchedKind = 34;
164             jjmatchedPos = 5;
165             return 54;
166          }
167          return -1;
168       case 6:
169          if ((active0 & 0x4000L) != 0L)
170          {
171             jjmatchedKind = 34;
172             jjmatchedPos = 6;
173             return 54;
174          }
175          if ((active0 & 0x40000L) != 0L)
176             return 54;
177          return -1;
178       case 7:
179          if ((active0 & 0x4000L) != 0L)
180          {
181             jjmatchedKind = 34;
182             jjmatchedPos = 7;
183             return 54;
184          }
185          return -1;
186       case 8:
187          if ((active0 & 0x4000L) != 0L)
188          {
189             jjmatchedKind = 34;
190             jjmatchedPos = 8;
191             return 54;
192          }
193          return -1;
194       case 9:
195          if ((active0 & 0x4000L) != 0L)
196          {
197             jjmatchedKind = 34;
198             jjmatchedPos = 9;
199             return 54;
200          }
201          return -1;
202       case 10:
203          if ((active0 & 0x4000L) != 0L)
204          {
205             jjmatchedKind = 34;
206             jjmatchedPos = 10;
207             return 54;
208          }
209          return -1;
210       case 11:
211          if ((active0 & 0x4000L) != 0L)
212          {
213             jjmatchedKind = 34;
214             jjmatchedPos = 11;
215             return 54;
216          }
217          return -1;
218       case 12:
219          if ((active0 & 0x4000L) != 0L)
220          {
221             jjmatchedKind = 34;
222             jjmatchedPos = 12;
223             return 54;
224          }
225          return -1;
226       default :
227          return -1;
228    }
229 }
230 private final int jjStartNfa_0(int pos, long active0)
231 {
232    return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
233 }
234 private final int jjStopAtPos(int pos, int kind)
235 {
236    jjmatchedKind = kind;
237    jjmatchedPos = pos;
238    return pos + 1;
239 }
240 private final int jjStartNfaWithStates_0(int pos, int kind, int state)
241 {
242    jjmatchedKind = kind;
243    jjmatchedPos = pos;
244    try { curChar = input_stream.readChar(); }
245    catch(java.io.IOException JavaDoc e) { return pos + 1; }
246    return jjMoveNfa_0(state, pos + 1);
247 }
248 private final int jjMoveStringLiteralDfa0_0()
249 {
250    switch(curChar)
251    {
252       case 33:
253          jjmatchedKind = 4;
254          return jjMoveStringLiteralDfa1_0(0x80L);
255       case 34:
256          return jjStopAtPos(0, 39);
257       case 36:
258          return jjStopAtPos(0, 24);
259       case 39:
260          return jjStopAtPos(0, 38);
261       case 40:
262          return jjStopAtPos(0, 16);
263       case 41:
264          return jjStopAtPos(0, 17);
265       case 42:
266          return jjStopAtPos(0, 22);
267       case 43:
268          return jjStopAtPos(0, 20);
269       case 44:
270          return jjStopAtPos(0, 19);
271       case 45:
272          return jjStopAtPos(0, 21);
273       case 47:
274          return jjStopAtPos(0, 23);
275       case 60:
276          jjmatchedKind = 10;
277          return jjMoveStringLiteralDfa1_0(0x300L);
278       case 61:
279          jjmatchedKind = 5;
280          return jjMoveStringLiteralDfa1_0(0x40L);
281       case 62:
282          jjmatchedKind = 11;
283          return jjMoveStringLiteralDfa1_0(0x1000L);
284       case 97:
285          return jjMoveStringLiteralDfa1_0(0x4L);
286       case 98:
287          return jjMoveStringLiteralDfa1_0(0x40000L);
288       case 100:
289          return jjMoveStringLiteralDfa1_0(0x4000000L);
290       case 105:
291          return jjMoveStringLiteralDfa1_0(0x8000L);
292       case 108:
293          return jjMoveStringLiteralDfa1_0(0x6000L);
294       case 110:
295          return jjMoveStringLiteralDfa1_0(0x8L);
296       case 111:
297          return jjMoveStringLiteralDfa1_0(0x2000002L);
298       default :
299          return jjMoveNfa_0(3, 0);
300    }
301 }
302 private final int jjMoveStringLiteralDfa1_0(long active0)
303 {
304    try { curChar = input_stream.readChar(); }
305    catch(java.io.IOException JavaDoc e) {
306       jjStopStringLiteralDfa_0(0, active0);
307       return 1;
308    }
309    switch(curChar)
310    {
311       case 61:
312          if ((active0 & 0x40L) != 0L)
313             return jjStopAtPos(1, 6);
314          else if ((active0 & 0x80L) != 0L)
315             return jjStopAtPos(1, 7);
316          else if ((active0 & 0x200L) != 0L)
317             return jjStopAtPos(1, 9);
318          else if ((active0 & 0x1000L) != 0L)
319             return jjStopAtPos(1, 12);
320          break;
321       case 62:
322          if ((active0 & 0x100L) != 0L)
323             return jjStopAtPos(1, 8);
324          break;
325       case 98:
326          return jjMoveStringLiteralDfa2_0(active0, 0x6000000L);
327       case 101:
328          return jjMoveStringLiteralDfa2_0(active0, 0x40000L);
329       case 105:
330          return jjMoveStringLiteralDfa2_0(active0, 0x6000L);
331       case 110:
332          if ((active0 & 0x8000L) != 0L)
333             return jjStartNfaWithStates_0(1, 15, 54);
334          return jjMoveStringLiteralDfa2_0(active0, 0x4L);
335       case 111:
336          return jjMoveStringLiteralDfa2_0(active0, 0x8L);
337       case 114:
338          if ((active0 & 0x2L) != 0L)
339             return jjStartNfaWithStates_0(1, 1, 54);
340          break;
341       default :
342          break;
343    }
344    return jjStartNfa_0(0, active0);
345 }
346 private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
347 {
348    if (((active0 &= old0)) == 0L)
349       return jjStartNfa_0(0, old0);
350    try { curChar = input_stream.readChar(); }
351    catch(java.io.IOException JavaDoc e) {
352       jjStopStringLiteralDfa_0(1, active0);
353       return 2;
354    }
355    switch(curChar)
356    {
357       case 58:
358          if ((active0 & 0x4000000L) != 0L)
359             return jjStopAtPos(2, 26);
360          break;
361       case 100:
362          if ((active0 & 0x4L) != 0L)
363             return jjStartNfaWithStates_0(2, 2, 54);
364          break;
365       case 106:
366          return jjMoveStringLiteralDfa3_0(active0, 0x2000000L);
367       case 107:
368          return jjMoveStringLiteralDfa3_0(active0, 0x6000L);
369       case 116:
370          if ((active0 & 0x8L) != 0L)
371             return jjStartNfaWithStates_0(2, 3, 54);
372          return jjMoveStringLiteralDfa3_0(active0, 0x40000L);
373       default :
374          break;
375    }
376    return jjStartNfa_0(1, active0);
377 }
378 private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
379 {
380    if (((active0 &= old0)) == 0L)
381       return jjStartNfa_0(1, old0);
382    try { curChar = input_stream.readChar(); }
383    catch(java.io.IOException JavaDoc e) {
384       jjStopStringLiteralDfa_0(2, active0);
385       return 3;
386    }
387    switch(curChar)
388    {
389       case 58:
390          if ((active0 & 0x2000000L) != 0L)
391             return jjStopAtPos(3, 25);
392          break;
393       case 101:
394          if ((active0 & 0x2000L) != 0L)
395          {
396             jjmatchedKind = 13;
397             jjmatchedPos = 3;
398          }
399          return jjMoveStringLiteralDfa4_0(active0, 0x4000L);
400       case 119:
401          return jjMoveStringLiteralDfa4_0(active0, 0x40000L);
402       default :
403          break;
404    }
405    return jjStartNfa_0(2, active0);
406 }
407 private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
408 {
409    if (((active0 &= old0)) == 0L)
410       return jjStartNfa_0(2, old0);
411    try { curChar = input_stream.readChar(); }
412    catch(java.io.IOException JavaDoc e) {
413       jjStopStringLiteralDfa_0(3, active0);
414       return 4;
415    }
416    switch(curChar)
417    {
418       case 73:
419          return jjMoveStringLiteralDfa5_0(active0, 0x4000L);
420       case 101:
421          return jjMoveStringLiteralDfa5_0(active0, 0x40000L);
422       default :
423          break;
424    }
425    return jjStartNfa_0(3, active0);
426 }
427 private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
428 {
429    if (((active0 &= old0)) == 0L)
430       return jjStartNfa_0(3, old0);
431    try { curChar = input_stream.readChar(); }
432    catch(java.io.IOException JavaDoc e) {
433       jjStopStringLiteralDfa_0(4, active0);
434       return 5;
435    }
436    switch(curChar)
437    {
438       case 101:
439          return jjMoveStringLiteralDfa6_0(active0, 0x40000L);
440       case 103:
441          return jjMoveStringLiteralDfa6_0(active0, 0x4000L);
442       default :
443          break;
444    }
445    return jjStartNfa_0(4, active0);
446 }
447 private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
448 {
449    if (((active0 &= old0)) == 0L)
450       return jjStartNfa_0(4, old0);
451    try { curChar = input_stream.readChar(); }
452    catch(java.io.IOException JavaDoc e) {
453       jjStopStringLiteralDfa_0(5, active0);
454       return 6;
455    }
456    switch(curChar)
457    {
458       case 110:
459          if ((active0 & 0x40000L) != 0L)
460             return jjStartNfaWithStates_0(6, 18, 54);
461          return jjMoveStringLiteralDfa7_0(active0, 0x4000L);
462       default :
463          break;
464    }
465    return jjStartNfa_0(5, active0);
466 }
467 private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
468 {
469    if (((active0 &= old0)) == 0L)
470       return jjStartNfa_0(5, old0);
471    try { curChar = input_stream.readChar(); }
472    catch(java.io.IOException JavaDoc e) {
473       jjStopStringLiteralDfa_0(6, active0);
474       return 7;
475    }
476    switch(curChar)
477    {
478       case 111:
479          return jjMoveStringLiteralDfa8_0(active0, 0x4000L);
480       default :
481          break;
482    }
483    return jjStartNfa_0(6, active0);
484 }
485 private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
486 {
487    if (((active0 &= old0)) == 0L)
488       return jjStartNfa_0(6, old0);
489    try { curChar = input_stream.readChar(); }
490    catch(java.io.IOException JavaDoc e) {
491       jjStopStringLiteralDfa_0(7, active0);
492       return 8;
493    }
494    switch(curChar)
495    {
496       case 114:
497          return jjMoveStringLiteralDfa9_0(active0, 0x4000L);
498       default :
499          break;
500    }
501    return jjStartNfa_0(7, active0);
502 }
503 private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
504 {
505    if (((active0 &= old0)) == 0L)
506       return jjStartNfa_0(7, old0);
507    try { curChar = input_stream.readChar(); }
508    catch(java.io.IOException JavaDoc e) {
509       jjStopStringLiteralDfa_0(8, active0);
510       return 9;
511    }
512    switch(curChar)
513    {
514       case 101:
515          return jjMoveStringLiteralDfa10_0(active0, 0x4000L);
516       default :
517          break;
518    }
519    return jjStartNfa_0(8, active0);
520 }
521 private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
522 {
523    if (((active0 &= old0)) == 0L)
524       return jjStartNfa_0(8, old0);
525    try { curChar = input_stream.readChar(); }
526    catch(java.io.IOException JavaDoc e) {
527       jjStopStringLiteralDfa_0(9, active0);
528       return 10;
529    }
530    switch(curChar)
531    {
532       case 67:
533          return jjMoveStringLiteralDfa11_0(active0, 0x4000L);
534       default :
535          break;
536    }
537    return jjStartNfa_0(9, active0);
538 }
539 private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
540 {
541    if (((active0 &= old0)) == 0L)
542       return jjStartNfa_0(9, old0);
543    try { curChar = input_stream.readChar(); }
544    catch(java.io.IOException JavaDoc e) {
545       jjStopStringLiteralDfa_0(10, active0);
546       return 11;
547    }
548    switch(curChar)
549    {
550       case 97:
551          return jjMoveStringLiteralDfa12_0(active0, 0x4000L);
552       default :
553          break;
554    }
555    return jjStartNfa_0(10, active0);
556 }
557 private final int jjMoveStringLiteralDfa12_0(long old0, long active0)
558 {
559    if (((active0 &= old0)) == 0L)
560       return jjStartNfa_0(10, old0);
561    try { curChar = input_stream.readChar(); }
562    catch(java.io.IOException JavaDoc e) {
563       jjStopStringLiteralDfa_0(11, active0);
564       return 12;
565    }
566    switch(curChar)
567    {
568       case 115:
569          return jjMoveStringLiteralDfa13_0(active0, 0x4000L);
570       default :
571          break;
572    }
573    return jjStartNfa_0(11, active0);
574 }
575 private final int jjMoveStringLiteralDfa13_0(long old0, long active0)
576 {
577    if (((active0 &= old0)) == 0L)
578       return jjStartNfa_0(11, old0);
579    try { curChar = input_stream.readChar(); }
580    catch(java.io.IOException JavaDoc e) {
581       jjStopStringLiteralDfa_0(12, active0);
582       return 13;
583    }
584    switch(curChar)
585    {
586       case 101:
587          if ((active0 & 0x4000L) != 0L)
588             return jjStartNfaWithStates_0(13, 14, 54);
589          break;
590       default :
591          break;
592    }
593    return jjStartNfa_0(12, active0);
594 }
595 private final void jjCheckNAdd(int state)
596 {
597    if (jjrounds[state] != jjround)
598    {
599       jjstateSet[jjnewStateCnt++] = state;
600       jjrounds[state] = jjround;
601    }
602 }
603 private final void jjAddStates(int start, int end)
604 {
605    do {
606       jjstateSet[jjnewStateCnt++] = jjnextStates[start];
607    } while (start++ != end);
608 }
609 private final void jjCheckNAddTwoStates(int state1, int state2)
610 {
611    jjCheckNAdd(state1);
612    jjCheckNAdd(state2);
613 }
614 private final void jjCheckNAddStates(int start, int end)
615 {
616    do {
617       jjCheckNAdd(jjnextStates[start]);
618    } while (start++ != end);
619 }
620 private final void jjCheckNAddStates(int start)
621 {
622    jjCheckNAdd(jjnextStates[start]);
623    jjCheckNAdd(jjnextStates[start + 1]);
624 }
625 private final int jjMoveNfa_0(int startState, int curPos)
626 {
627    int[] nextStates;
628    int startsAt = 0;
629    jjnewStateCnt = 54;
630    int i = 1;
631    jjstateSet[0] = startState;
632    int j, kind = 0x7fffffff;
633    for (;;)
634    {
635       if (++jjround == 0x7fffffff)
636          ReInitRounds();
637       if (curChar < 64)
638       {
639          long l = 1L << curChar;
640          MatchLoop: do
641          {
642             switch(jjstateSet[--i])
643             {
644                case 54:
645                   if ((0x3ff000000000000L & l) != 0L)
646                   {
647                      if (kind > 35)
648                         kind = 35;
649                      jjCheckNAdd(53);
650                   }
651                   else if (curChar == 46)
652                      jjstateSet[jjnewStateCnt++] = 51;
653                   if ((0x3ff000000000000L & l) != 0L)
654                   {
655                      if (kind > 34)
656                         kind = 34;
657                      jjCheckNAddTwoStates(49, 50);
658                   }
659                   break;
660                case 2:
661                   if ((0x3ff000000000000L & l) != 0L)
662                   {
663                      if (kind > 35)
664                         kind = 35;
665                      jjCheckNAdd(53);
666                   }
667                   else if (curChar == 46)
668                      jjstateSet[jjnewStateCnt++] = 51;
669                   if ((0x3ff000000000000L & l) != 0L)
670                   {
671                      if (kind > 34)
672                         kind = 34;
673                      jjCheckNAddTwoStates(49, 50);
674                   }
675                   break;
676                case 3:
677                   if ((0x3ff000000000000L & l) != 0L)
678                      jjCheckNAddStates(0, 5);
679                   else if (curChar == 46)
680                      jjCheckNAdd(30);
681                   if ((0x3fe000000000000L & l) != 0L)
682                   {
683                      if (kind > 46)
684                         kind = 46;
685                      jjCheckNAddTwoStates(27, 28);
686                   }
687                   else if (curChar == 48)
688                   {
689                      if (kind > 46)
690                         kind = 46;
691                      jjCheckNAddStates(6, 8);
692                   }
693                   break;
694                case 26:
695                   if ((0x3fe000000000000L & l) == 0L)
696                      break;
697                   if (kind > 46)
698                      kind = 46;
699                   jjCheckNAddTwoStates(27, 28);
700                   break;
701                case 27:
702                   if ((0x3ff000000000000L & l) == 0L)
703                      break;
704                   if (kind > 46)
705                      kind = 46;
706                   jjCheckNAddTwoStates(27, 28);
707                   break;
708                case 29:
709                   if (curChar == 46)
710                      jjCheckNAdd(30);
711                   break;
712                case 30:
713                   if ((0x3ff000000000000L & l) == 0L)
714                      break;
715                   if (kind > 47)
716                      kind = 47;
717                   jjCheckNAddStates(9, 11);
718                   break;
719                case 32:
720                   if ((0x280000000000L & l) != 0L)
721                      jjCheckNAdd(33);
722                   break;
723                case 33:
724                   if ((0x3ff000000000000L & l) == 0L)
725                      break;
726                   if (kind > 47)
727                      kind = 47;
728                   jjCheckNAddTwoStates(33, 34);
729                   break;
730                case 35:
731                   if ((0x3ff000000000000L & l) != 0L)
732                      jjCheckNAddStates(0, 5);
733                   break;
734                case 36:
735                   if ((0x3ff000000000000L & l) != 0L)
736                      jjCheckNAddTwoStates(36, 37);
737                   break;
738                case 37:
739                   if (curChar != 46)
740                      break;
741                   if (kind > 47)
742                      kind = 47;
743                   jjCheckNAddStates(12, 14);
744                   break;
745                case 38:
746                   if ((0x3ff000000000000L & l) == 0L)
747                      break;
748                   if (kind > 47)
749                      kind = 47;
750                   jjCheckNAddStates(12, 14);
751                   break;
752                case 39:
753                   if ((0x3ff000000000000L & l) != 0L)
754                      jjCheckNAddTwoStates(39, 40);
755                   break;
756                case 41:
757                   if ((0x280000000000L & l) != 0L)
758                      jjCheckNAdd(42);
759                   break;
760                case 42:
761                   if ((0x3ff000000000000L & l) == 0L)
762                      break;
763                   if (kind > 47)
764                      kind = 47;
765                   jjCheckNAddTwoStates(42, 34);
766                   break;
767                case 43:
768                   if ((0x3ff000000000000L & l) != 0L)
769                      jjCheckNAddTwoStates(43, 34);
770                   break;
771                case 44:
772                   if (curChar != 48)
773                      break;
774                   if (kind > 46)
775                      kind = 46;
776                   jjCheckNAddStates(6, 8);
777                   break;
778                case 45:
779                   if ((0xff000000000000L & l) == 0L)
780                      break;
781                   if (kind > 46)
782                      kind = 46;
783                   jjCheckNAddTwoStates(45, 28);
784                   break;
785                case 47:
786                   if ((0x3ff000000000000L & l) == 0L)
787                      break;
788                   if (kind > 46)
789                      kind = 46;
790                   jjCheckNAddTwoStates(47, 28);
791                   break;
792                case 49:
793                   if ((0x3ff000000000000L & l) == 0L)
794                      break;
795                   if (kind > 34)
796                      kind = 34;
797                   jjCheckNAddTwoStates(49, 50);
798                   break;
799                case 50:
800                   if (curChar == 46)
801                      jjstateSet[jjnewStateCnt++] = 51;
802                   break;
803                case 52:
804                   if ((0x3ff000000000000L & l) == 0L)
805                      break;
806                   if (kind > 34)
807                      kind = 34;
808                   jjCheckNAddTwoStates(50, 52);
809                   break;
810                case 53:
811                   if ((0x3ff000000000000L & l) == 0L)
812                      break;
813                   if (kind > 35)
814                      kind = 35;
815                   jjCheckNAdd(53);
816                   break;
817                default : break;
818             }
819          } while(i != startsAt);
820       }
821       else if (curChar < 128)
822       {
823          long l = 1L << (curChar & 077);
824          MatchLoop: do
825          {
826             switch(jjstateSet[--i])
827             {
828                case 54:
829                   if ((0x7fffffe87fffffeL & l) != 0L)
830                   {
831                      if (kind > 35)
832                         kind = 35;
833                      jjCheckNAdd(53);
834                   }
835                   if ((0x7fffffe87fffffeL & l) != 0L)
836                   {
837                      if (kind > 34)
838                         kind = 34;
839                      jjCheckNAddTwoStates(49, 50);
840                   }
841                   break;
842                case 2:
843                   if ((0x7fffffe87fffffeL & l) != 0L)
844                   {
845                      if (kind > 35)
846                         kind = 35;
847                      jjCheckNAdd(53);
848                   }
849                   if ((0x7fffffe87fffffeL & l) != 0L)
850                   {
851                      if (kind > 34)
852                         kind = 34;
853                      jjCheckNAddTwoStates(49, 50);
854                   }
855                   if (curChar == 117)
856                      jjstateSet[jjnewStateCnt++] = 1;
857                   break;
858                case 3:
859                   if ((0x7fffffe87fffffeL & l) != 0L)
860                   {
861                      if (kind > 34)
862                         kind = 34;
863                      jjCheckNAddStates(15, 17);
864                   }
865                   if (curChar == 70)
866                      jjstateSet[jjnewStateCnt++] = 24;
867                   else if (curChar == 102)
868                      jjstateSet[jjnewStateCnt++] = 19;
869                   else if (curChar == 84)
870                      jjstateSet[jjnewStateCnt++] = 14;
871                   else if (curChar == 116)
872                      jjstateSet[jjnewStateCnt++] = 10;
873                   else if (curChar == 78)
874                      jjstateSet[jjnewStateCnt++] = 6;
875                   else if (curChar == 110)
876                      jjstateSet[jjnewStateCnt++] = 2;
877                   break;
878                case 0:
879                   if (curChar == 108 && kind > 31)
880                      kind = 31;
881                   break;
882                case 1:
883                   if (curChar == 108)
884                      jjstateSet[jjnewStateCnt++] = 0;
885                   break;
886                case 4:
887                   if (curChar == 76 && kind > 31)
888                      kind = 31;
889                   break;
890                case 5:
891                   if (curChar == 76)
892                      jjstateSet[jjnewStateCnt++] = 4;
893                   break;
894                case 6:
895                   if (curChar == 85)
896                      jjstateSet[jjnewStateCnt++] = 5;
897                   break;
898                case 7:
899                   if (curChar == 78)
900                      jjstateSet[jjnewStateCnt++] = 6;
901                   break;
902                case 8:
903                   if (curChar == 101 && kind > 32)
904                      kind = 32;
905                   break;
906                case 9:
907                   if (curChar == 117)
908                      jjstateSet[jjnewStateCnt++] = 8;
909                   break;
910                case 10:
911                   if (curChar == 114)
912                      jjstateSet[jjnewStateCnt++] = 9;
913                   break;
914                case 11:
915                   if (curChar == 116)
916                      jjstateSet[jjnewStateCnt++] = 10;
917                   break;
918                case 12:
919                   if (curChar == 69 && kind > 32)
920                      kind = 32;
921                   break;
922                case 13:
923                   if (curChar == 85)
924                      jjstateSet[jjnewStateCnt++] = 12;
925                   break;
926                case 14:
927                   if (curChar == 82)
928                      jjstateSet[jjnewStateCnt++] = 13;
929                   break;
930                case 15:
931                   if (curChar == 84)
932                      jjstateSet[jjnewStateCnt++] = 14;
933                   break;
934                case 16:
935                   if (curChar == 101 && kind > 33)
936                      kind = 33;
937                   break;
938                case 17:
939                   if (curChar == 115)
940                      jjstateSet[jjnewStateCnt++] = 16;
941                   break;
942                case 18:
943                   if (curChar == 108)
944                      jjstateSet[jjnewStateCnt++] = 17;
945                   break;
946                case 19:
947                   if (curChar == 97)
948                      jjstateSet[jjnewStateCnt++] = 18;
949                   break;
950                case 20:
951                   if (curChar == 102)
952                      jjstateSet[jjnewStateCnt++] = 19;
953                   break;
954                case 21:
955                   if (curChar == 69 && kind > 33)
956                      kind = 33;
957                   break;
958                case 22:
959                   if (curChar == 83)
960                      jjstateSet[jjnewStateCnt++] = 21;
961                   break;
962                case 23:
963                   if (curChar == 76)
964                      jjstateSet[jjnewStateCnt++] = 22;
965                   break;
966                case 24:
967                   if (curChar == 65)
968                      jjstateSet[jjnewStateCnt++] = 23;
969                   break;
970                case 25:
971                   if (curChar == 70)
972                      jjstateSet[jjnewStateCnt++] = 24;
973                   break;
974                case 28:
975                   if ((0x110000001100L & l) != 0L && kind > 46)
976                      kind = 46;
977                   break;
978                case 31:
979                   if ((0x2000000020L & l) != 0L)
980                      jjAddStates(18, 19);
981                   break;
982                case 34:
983                   if ((0x5400000054L & l) != 0L && kind > 47)
984                      kind = 47;
985                   break;
986                case 40:
987                   if ((0x2000000020L & l) != 0L)
988                      jjAddStates(20, 21);
989                   break;
990                case 46:
991                   if ((0x100000001000000L & l) != 0L)
992                      jjCheckNAdd(47);
993                   break;
994                case 47:
995                   if ((0x7e0000007eL & l) == 0L)
996                      break;
997                   if (kind > 46)
998                      kind = 46;
999                   jjCheckNAddTwoStates(47, 28);
1000                  break;
1001               case 48:
1002                  if ((0x7fffffe87fffffeL & l) == 0L)
1003                     break;
1004                  if (kind > 34)
1005                     kind = 34;
1006                  jjCheckNAddStates(15, 17);
1007                  break;
1008               case 49:
1009                  if ((0x7fffffe87fffffeL & l) == 0L)
1010                     break;
1011                  if (kind > 34)
1012                     kind = 34;
1013                  jjCheckNAddTwoStates(49, 50);
1014                  break;
1015               case 51:
1016               case 52:
1017                  if ((0x7fffffe87fffffeL & l) == 0L)
1018                     break;
1019                  if (kind > 34)
1020                     kind = 34;
1021                  jjCheckNAddTwoStates(50, 52);
1022                  break;
1023               case 53:
1024                  if ((0x7fffffe87fffffeL & l) == 0L)
1025                     break;
1026                  if (kind > 35)
1027                     kind = 35;
1028                  jjCheckNAdd(53);
1029                  break;
1030               default : break;
1031            }
1032         } while(i != startsAt);
1033      }
1034      else
1035      {
1036         int hiByte = (int)(curChar >> 8);
1037         int i1 = hiByte >> 6;
1038         long l1 = 1L << (hiByte & 077);
1039         int i2 = (curChar & 0xff) >> 6;
1040         long l2 = 1L << (curChar & 077);
1041         MatchLoop: do
1042         {
1043            switch(jjstateSet[--i])
1044            {
1045               default : break;
1046            }
1047         } while(i != startsAt);
1048      }
1049      if (kind != 0x7fffffff)
1050      {
1051         jjmatchedKind = kind;
1052         jjmatchedPos = curPos;
1053         kind = 0x7fffffff;
1054      }
1055      ++curPos;
1056      if ((i = jjnewStateCnt) == (startsAt = 54 - (jjnewStateCnt = startsAt)))
1057         return curPos;
1058      try { curChar = input_stream.readChar(); }
1059      catch(java.io.IOException JavaDoc e) { return curPos; }
1060   }
1061}
1062private final int jjStopStringLiteralDfa_1(int pos, long active0)
1063{
1064   switch (pos)
1065   {
1066      default :
1067         return -1;
1068   }
1069}
1070private final int jjStartNfa_1(int pos, long active0)
1071{
1072   return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
1073}
1074private final int jjStartNfaWithStates_1(int pos, int kind, int state)
1075{
1076   jjmatchedKind = kind;
1077   jjmatchedPos = pos;
1078   try { curChar = input_stream.readChar(); }
1079   catch(java.io.IOException JavaDoc e) { return pos + 1; }
1080   return jjMoveNfa_1(state, pos + 1);
1081}
1082private final int jjMoveStringLiteralDfa0_1()
1083{
1084   switch(curChar)
1085   {
1086      case 39:
1087         return jjStopAtPos(0, 42);
1088      default :
1089         return jjMoveNfa_1(0, 0);
1090   }
1091}
1092static final long[] jjbitVec0 = {
1093   0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
1094};
1095static final long[] jjbitVec2 = {
1096   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
1097};
1098private final int jjMoveNfa_1(int startState, int curPos)
1099{
1100   int[] nextStates;
1101   int startsAt = 0;
1102   jjnewStateCnt = 6;
1103   int i = 1;
1104   jjstateSet[0] = startState;
1105   int j, kind = 0x7fffffff;
1106   for (;;)
1107   {
1108      if (++jjround == 0x7fffffff)
1109         ReInitRounds();
1110      if (curChar < 64)
1111      {
1112         long l = 1L << curChar;
1113         MatchLoop: do
1114         {
1115            switch(jjstateSet[--i])
1116            {
1117               case 0:
1118                  if ((0xffffff7fffffffffL & l) != 0L && kind > 41)
1119                     kind = 41;
1120                  break;
1121               case 1:
1122                  if ((0x8400000000L & l) != 0L && kind > 40)
1123                     kind = 40;
1124                  break;
1125               case 2:
1126                  if ((0xf000000000000L & l) != 0L)
1127                     jjstateSet[jjnewStateCnt++] = 3;
1128                  break;
1129               case 3:
1130                  if ((0xff000000000000L & l) == 0L)
1131                     break;
1132                  if (kind > 40)
1133                     kind = 40;
1134                  jjstateSet[jjnewStateCnt++] = 4;
1135                  break;
1136               case 4:
1137                  if ((0xff000000000000L & l) != 0L && kind > 40)
1138                     kind = 40;
1139                  break;
1140               default : break;
1141            }
1142         } while(i != startsAt);
1143      }
1144      else if (curChar < 128)
1145      {
1146         long l = 1L << (curChar & 077);
1147         MatchLoop: do
1148         {
1149            switch(jjstateSet[--i])
1150            {
1151               case 0:
1152                  if ((0xffffffffefffffffL & l) != 0L)
1153                  {
1154                     if (kind > 41)
1155                        kind = 41;
1156                  }
1157                  else if (curChar == 92)
1158                     jjAddStates(22, 24);
1159                  break;
1160               case 1:
1161                  if ((0x14404510000000L & l) != 0L && kind > 40)
1162                     kind = 40;
1163                  break;
1164               case 5:
1165                  if ((0xffffffffefffffffL & l) != 0L && kind > 41)
1166                     kind = 41;
1167                  break;
1168               default : break;
1169            }
1170         } while(i != startsAt);
1171      }
1172      else
1173      {
1174         int hiByte = (int)(curChar >> 8);
1175         int i1 = hiByte >> 6;
1176         long l1 = 1L << (hiByte & 077);
1177         int i2 = (curChar & 0xff) >> 6;
1178         long l2 = 1L << (curChar & 077);
1179         MatchLoop: do
1180         {
1181            switch(jjstateSet[--i])
1182            {
1183               case 0:
1184                  if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 41)
1185                     kind = 41;
1186                  break;
1187               default : break;
1188            }
1189         } while(i != startsAt);
1190      }
1191      if (kind != 0x7fffffff)
1192      {
1193         jjmatchedKind = kind;
1194         jjmatchedPos = curPos;
1195         kind = 0x7fffffff;
1196      }
1197      ++curPos;
1198      if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt)))
1199         return curPos;
1200      try { curChar = input_stream.readChar(); }
1201      catch(java.io.IOException JavaDoc e) { return curPos; }
1202   }
1203}
1204private final int jjStopStringLiteralDfa_2(int pos, long active0)
1205{
1206   switch (pos)
1207   {
1208      default :
1209         return -1;
1210   }
1211}
1212private final int jjStartNfa_2(int pos, long active0)
1213{
1214   return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
1215}
1216private final int jjStartNfaWithStates_2(int pos, int kind, int state)
1217{
1218   jjmatchedKind = kind;
1219   jjmatchedPos = pos;
1220   try { curChar = input_stream.readChar(); }
1221   catch(java.io.IOException JavaDoc e) { return pos + 1; }
1222   return jjMoveNfa_2(state, pos + 1);
1223}
1224private final int jjMoveStringLiteralDfa0_2()
1225{
1226   switch(curChar)
1227   {
1228      case 34:
1229         return jjStopAtPos(0, 45);
1230      default :
1231         return jjMoveNfa_2(0, 0);
1232   }
1233}
1234private final int jjMoveNfa_2(int startState, int curPos)
1235{
1236   int[] nextStates;
1237   int startsAt = 0;
1238   jjnewStateCnt = 6;
1239   int i = 1;
1240   jjstateSet[0] = startState;
1241   int j, kind = 0x7fffffff;
1242   for (;;)
1243   {
1244      if (++jjround == 0x7fffffff)
1245         ReInitRounds();
1246      if (curChar < 64)
1247      {
1248         long l = 1L << curChar;
1249         MatchLoop: do
1250         {
1251            switch(jjstateSet[--i])
1252            {
1253               case 0:
1254                  if ((0xfffffffbffffffffL & l) != 0L && kind > 44)
1255                     kind = 44;
1256                  break;
1257               case 1:
1258                  if ((0x8400000000L & l) != 0L && kind > 43)
1259                     kind = 43;
1260                  break;
1261               case 2:
1262                  if ((0xf000000000000L & l) != 0L)
1263                     jjstateSet[jjnewStateCnt++] = 3;
1264                  break;
1265               case 3:
1266                  if ((0xff000000000000L & l) == 0L)
1267                     break;
1268                  if (kind > 43)
1269                     kind = 43;
1270                  jjstateSet[jjnewStateCnt++] = 4;
1271                  break;
1272               case 4:
1273                  if ((0xff000000000000L & l) != 0L && kind > 43)
1274                     kind = 43;
1275                  break;
1276               default : break;
1277            }
1278         } while(i != startsAt);
1279      }
1280      else if (curChar < 128)
1281      {
1282         long l = 1L << (curChar & 077);
1283         MatchLoop: do
1284         {
1285            switch(jjstateSet[--i])
1286            {
1287               case 0:
1288                  if ((0xffffffffefffffffL & l) != 0L)
1289                  {
1290                     if (kind > 44)
1291                        kind = 44;
1292                  }
1293                  else if (curChar == 92)
1294                     jjAddStates(22, 24);
1295                  break;
1296               case 1:
1297                  if ((0x14404510000000L & l) != 0L && kind > 43)
1298                     kind = 43;
1299                  break;
1300               case 5:
1301                  if ((0xffffffffefffffffL & l) != 0L && kind > 44)
1302                     kind = 44;
1303                  break;
1304               default : break;
1305            }
1306         } while(i != startsAt);
1307      }
1308      else
1309      {
1310         int hiByte = (int)(curChar >> 8);
1311         int i1 = hiByte >> 6;
1312         long l1 = 1L << (hiByte & 077);
1313         int i2 = (curChar & 0xff) >> 6;
1314         long l2 = 1L << (curChar & 077);
1315         MatchLoop: do
1316         {
1317            switch(jjstateSet[--i])
1318            {
1319               case 0:
1320                  if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 44)
1321                     kind = 44;
1322                  break;
1323               default : break;
1324            }
1325         } while(i != startsAt);
1326      }
1327      if (kind != 0x7fffffff)
1328      {
1329         jjmatchedKind = kind;
1330         jjmatchedPos = curPos;
1331         kind = 0x7fffffff;
1332      }
1333      ++curPos;
1334      if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt)))
1335         return curPos;
1336      try { curChar = input_stream.readChar(); }
1337      catch(java.io.IOException JavaDoc e) { return curPos; }
1338   }
1339}
1340static final int[] jjnextStates = {
1341   36, 37, 39, 40, 43, 34, 45, 46, 28, 30, 31, 34, 38, 31, 34, 49,
1342   50, 53, 32, 33, 41, 42, 1, 2, 3,
1343};
1344private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
1345{
1346   switch(hiByte)
1347   {
1348      case 0:
1349         return ((jjbitVec2[i2] & l2) != 0L);
1350      default :
1351         if ((jjbitVec0[i1] & l1) != 0L)
1352            return true;
1353         return false;
1354   }
1355}
1356public static final String JavaDoc[] jjstrLiteralImages = {
1357"", "\157\162", "\141\156\144", "\156\157\164", "\41", "\75", "\75\75",
1358"\41\75", "\74\76", "\74\75", "\74", "\76", "\76\75", "\154\151\153\145",
1359"\154\151\153\145\111\147\156\157\162\145\103\141\163\145", "\151\156", "\50", "\51", "\142\145\164\167\145\145\156", "\54", "\53", "\55",
1360"\52", "\57", "\44", "\157\142\152\72", "\144\142\72", null, null, null, null, null,
1361null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1362null, null, null, null, null, null, };
1363public static final String JavaDoc[] lexStateNames = {
1364   "DEFAULT",
1365   "WithinSingleQuoteLiteral",
1366   "WithinDoubleQuoteLiteral",
1367};
1368public static final int[] jjnewLexState = {
1369   -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,
1370   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, -1, -1, 0, -1, -1, 0, -1, -1, -1, -1,
1371   -1, -1,
1372};
1373static final long[] jjtoToken = {
1374   0xe40f87ffffffL,
1375};
1376static final long[] jjtoSkip = {
1377   0x78000000L,
1378};
1379static final long[] jjtoMore = {
1380   0x1bc000000000L,
1381};
1382protected JavaCharStream input_stream;
1383private final int[] jjrounds = new int[54];
1384private final int[] jjstateSet = new int[108];
1385StringBuffer JavaDoc image;
1386int jjimageLen;
1387int lengthOfMatch;
1388protected char curChar;
1389public ExpressionParserTokenManager(JavaCharStream stream){
1390   if (JavaCharStream.staticFlag)
1391      throw new Error JavaDoc("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
1392   input_stream = stream;
1393}
1394public ExpressionParserTokenManager(JavaCharStream stream, int lexState){
1395   this(stream);
1396   SwitchTo(lexState);
1397}
1398public void ReInit(JavaCharStream stream)
1399{
1400   jjmatchedPos = jjnewStateCnt = 0;
1401   curLexState = defaultLexState;
1402   input_stream = stream;
1403   ReInitRounds();
1404}
1405private final void ReInitRounds()
1406{
1407   int i;
1408   jjround = 0x80000001;
1409   for (i = 54; i-- > 0;)
1410      jjrounds[i] = 0x80000000;
1411}
1412public void ReInit(JavaCharStream stream, int lexState)
1413{
1414   ReInit(stream);
1415   SwitchTo(lexState);
1416}
1417public void SwitchTo(int lexState)
1418{
1419   if (lexState >= 3 || lexState < 0)
1420      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1421   else
1422      curLexState = lexState;
1423}
1424
1425protected Token jjFillToken()
1426{
1427   Token t = Token.newToken(jjmatchedKind);
1428   t.kind = jjmatchedKind;
1429   String JavaDoc im = jjstrLiteralImages[jjmatchedKind];
1430   t.image = (im == null) ? input_stream.GetImage() : im;
1431   t.beginLine = input_stream.getBeginLine();
1432   t.beginColumn = input_stream.getBeginColumn();
1433   t.endLine = input_stream.getEndLine();
1434   t.endColumn = input_stream.getEndColumn();
1435   return t;
1436}
1437
1438int curLexState = 0;
1439int defaultLexState = 0;
1440int jjnewStateCnt;
1441int jjround;
1442int jjmatchedPos;
1443int jjmatchedKind;
1444
1445public Token getNextToken()
1446{
1447  int kind;
1448  Token specialToken = null;
1449  Token matchedToken;
1450  int curPos = 0;
1451
1452  EOFLoop :
1453  for (;;)
1454  {
1455   try
1456   {
1457      curChar = input_stream.BeginToken();
1458   }
1459   catch(java.io.IOException JavaDoc e)
1460   {
1461      jjmatchedKind = 0;
1462      matchedToken = jjFillToken();
1463      return matchedToken;
1464   }
1465   image = null;
1466   jjimageLen = 0;
1467
1468   for (;;)
1469   {
1470     switch(curLexState)
1471     {
1472       case 0:
1473         try { input_stream.backup(0);
1474            while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
1475               curChar = input_stream.BeginToken();
1476         }
1477         catch (java.io.IOException JavaDoc e1) { continue EOFLoop; }
1478         jjmatchedKind = 0x7fffffff;
1479         jjmatchedPos = 0;
1480         curPos = jjMoveStringLiteralDfa0_0();
1481         break;
1482       case 1:
1483         jjmatchedKind = 0x7fffffff;
1484         jjmatchedPos = 0;
1485         curPos = jjMoveStringLiteralDfa0_1();
1486         break;
1487       case 2:
1488         jjmatchedKind = 0x7fffffff;
1489         jjmatchedPos = 0;
1490         curPos = jjMoveStringLiteralDfa0_2();
1491         break;
1492     }
1493     if (jjmatchedKind != 0x7fffffff)
1494     {
1495        if (jjmatchedPos + 1 < curPos)
1496           input_stream.backup(curPos - jjmatchedPos - 1);
1497        if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1498        {
1499           matchedToken = jjFillToken();
1500           TokenLexicalActions(matchedToken);
1501       if (jjnewLexState[jjmatchedKind] != -1)
1502         curLexState = jjnewLexState[jjmatchedKind];
1503           return matchedToken;
1504        }
1505        else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1506        {
1507         if (jjnewLexState[jjmatchedKind] != -1)
1508           curLexState = jjnewLexState[jjmatchedKind];
1509           continue EOFLoop;
1510        }
1511        MoreLexicalActions();
1512      if (jjnewLexState[jjmatchedKind] != -1)
1513        curLexState = jjnewLexState[jjmatchedKind];
1514        curPos = 0;
1515        jjmatchedKind = 0x7fffffff;
1516        try {
1517           curChar = input_stream.readChar();
1518           continue;
1519        }
1520        catch (java.io.IOException JavaDoc e1) { }
1521     }
1522     int error_line = input_stream.getEndLine();
1523     int error_column = input_stream.getEndColumn();
1524     String JavaDoc error_after = null;
1525     boolean EOFSeen = false;
1526     try { input_stream.readChar(); input_stream.backup(1); }
1527     catch (java.io.IOException JavaDoc e1) {
1528        EOFSeen = true;
1529        error_after = curPos <= 1 ? "" : input_stream.GetImage();
1530        if (curChar == '\n' || curChar == '\r') {
1531           error_line++;
1532           error_column = 0;
1533        }
1534        else
1535           error_column++;
1536     }
1537     if (!EOFSeen) {
1538        input_stream.backup(1);
1539        error_after = curPos <= 1 ? "" : input_stream.GetImage();
1540     }
1541     throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1542   }
1543  }
1544}
1545
1546void MoreLexicalActions()
1547{
1548   jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
1549   switch(jjmatchedKind)
1550   {
1551      case 38 :
1552         if (image == null)
1553            image = new StringBuffer JavaDoc();
1554         image.append(input_stream.GetSuffix(jjimageLen));
1555         jjimageLen = 0;
1556           stringBuffer = new StringBuffer JavaDoc();
1557         break;
1558      case 39 :
1559         if (image == null)
1560            image = new StringBuffer JavaDoc();
1561         image.append(input_stream.GetSuffix(jjimageLen));
1562         jjimageLen = 0;
1563            stringBuffer = new StringBuffer JavaDoc();
1564         break;
1565      case 40 :
1566         if (image == null)
1567            image = new StringBuffer JavaDoc();
1568         image.append(input_stream.GetSuffix(jjimageLen));
1569         jjimageLen = 0;
1570          stringBuffer.append( escapeChar() );
1571         break;
1572      case 41 :
1573         if (image == null)
1574            image = new StringBuffer JavaDoc();
1575         image.append(input_stream.GetSuffix(jjimageLen));
1576         jjimageLen = 0;
1577          stringBuffer.append( image.charAt(image.length()-1) );
1578         break;
1579      case 43 :
1580         if (image == null)
1581            image = new StringBuffer JavaDoc();
1582         image.append(input_stream.GetSuffix(jjimageLen));
1583         jjimageLen = 0;
1584          stringBuffer.append( escapeChar() );
1585         break;
1586      case 44 :
1587         if (image == null)
1588            image = new StringBuffer JavaDoc();
1589         image.append(input_stream.GetSuffix(jjimageLen));
1590         jjimageLen = 0;
1591          stringBuffer.append( image.charAt(image.length()-1) );
1592         break;
1593      default :
1594         break;
1595   }
1596}
1597void TokenLexicalActions(Token matchedToken)
1598{
1599   switch(jjmatchedKind)
1600   {
1601      case 42 :
1602        if (image == null)
1603            image = new StringBuffer JavaDoc();
1604            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
1605          literalValue = stringBuffer.toString();
1606         break;
1607      case 45 :
1608        if (image == null)
1609            image = new StringBuffer JavaDoc();
1610            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
1611          literalValue = stringBuffer.toString();
1612         break;
1613      case 46 :
1614        if (image == null)
1615            image = new StringBuffer JavaDoc();
1616            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
1617          literalValue = makeInt();
1618         break;
1619      case 47 :
1620        if (image == null)
1621            image = new StringBuffer JavaDoc();
1622            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
1623          literalValue = makeFloat();
1624         break;
1625      default :
1626         break;
1627   }
1628}
1629}
1630
Popular Tags