KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* Generated By:JJTree&JavaCC: Do not edit this line. ExpressionParserTokenManager.java */
2 /* ====================================================================
3  *
4  * The ObjectStyle Group Software License, version 1.1
5  * ObjectStyle Group - http://objectstyle.org/
6  *
7  * Copyright (c) 2002-2005, Andrei (Andrus) Adamchik and individual authors
8  * of the software. All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  *
14  * 1. Redistributions of source code must retain the above copyright
15  * notice, this list of conditions and the following disclaimer.
16  *
17  * 2. Redistributions in binary form must reproduce the above copyright
18  * notice, this list of conditions and the following disclaimer in
19  * the documentation and/or other materials provided with the
20  * distribution.
21  *
22  * 3. The end-user documentation included with the redistribution, if any,
23  * must include the following acknowlegement:
24  * "This product includes software developed by independent contributors
25  * and hosted on ObjectStyle Group web site (http://objectstyle.org/)."
26  * Alternately, this acknowlegement may appear in the software itself,
27  * if and wherever such third-party acknowlegements normally appear.
28  *
29  * 4. The names "ObjectStyle Group" and "Cayenne" must not be used to endorse
30  * or promote products derived from this software without prior written
31  * permission. For written permission, email
32  * "andrus at objectstyle dot org".
33  *
34  * 5. Products derived from this software may not be called "ObjectStyle"
35  * or "Cayenne", nor may "ObjectStyle" or "Cayenne" appear in their
36  * names without prior written permission.
37  *
38  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
39  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
40  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
41  * DISCLAIMED. IN NO EVENT SHALL THE OBJECTSTYLE GROUP OR
42  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
44  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
45  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
46  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
47  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
48  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
49  * SUCH DAMAGE.
50  * ====================================================================
51  *
52  * This software consists of voluntary contributions made by many
53  * individuals and hosted on ObjectStyle Group web site. For more
54  * information on the ObjectStyle Group, please see
55  * <http://objectstyle.org/>.
56  *
57  * Some parts of the parser are based on OGNL parser,
58  * copyright (c) 2002, Drew Davidson and Luke Blanshard
59  */

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