001    /**
002     *   GRANITE DATA SERVICES
003     *   Copyright (C) 2006-2013 GRANITE DATA SERVICES S.A.S.
004     *
005     *   This file is part of the Granite Data Services Platform.
006     *
007     *   Granite Data Services is free software; you can redistribute it and/or
008     *   modify it under the terms of the GNU Lesser General Public
009     *   License as published by the Free Software Foundation; either
010     *   version 2.1 of the License, or (at your option) any later version.
011     *
012     *   Granite Data Services is distributed in the hope that it will be useful,
013     *   but WITHOUT ANY WARRANTY; without even the implied warranty of
014     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
015     *   General Public License for more details.
016     *
017     *   You should have received a copy of the GNU Lesser General Public
018     *   License along with this library; if not, write to the Free Software
019     *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
020     *   USA, or see <http://www.gnu.org/licenses/>.
021     */
022    /* Generated By:JavaCC: Do not edit this line. SelectorParserTokenManager.java */
023    /**
024     *
025     * Licensed to the Apache Software Foundation (ASF) under one or more
026     * contributor license agreements.  See the NOTICE file distributed with
027     * this work for additional information regarding copyright ownership.
028     * The ASF licenses this file to You under the Apache License, Version 2.0
029     * (the "License"); you may not use this file except in compliance with
030     * the License.  You may obtain a copy of the License at
031     *
032     * http://www.apache.org/licenses/LICENSE-2.0
033     *
034     * Unless required by applicable law or agreed to in writing, software
035     * distributed under the License is distributed on an "AS IS" BASIS,
036     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
037     * See the License for the specific language governing permissions and
038     * limitations under the License.
039     */
040    
041    package org.granite.gravity.selector;
042    
043    @SuppressWarnings({"unused"})
044    public class SelectorParserTokenManager implements SelectorParserConstants
045    {
046      public  java.io.PrintStream debugStream = System.out;
047      public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
048    private final int jjStopAtPos(int pos, int kind)
049    {
050       jjmatchedKind = kind;
051       jjmatchedPos = pos;
052       return pos + 1;
053    }
054    private final int jjMoveStringLiteralDfa0_0()
055    {
056       switch(curChar)
057       {
058          case 9:
059             jjmatchedKind = 2;
060             return jjMoveNfa_0(5, 0);
061          case 10:
062             jjmatchedKind = 3;
063             return jjMoveNfa_0(5, 0);
064          case 12:
065             jjmatchedKind = 5;
066             return jjMoveNfa_0(5, 0);
067          case 13:
068             jjmatchedKind = 4;
069             return jjMoveNfa_0(5, 0);
070          case 32:
071             jjmatchedKind = 1;
072             return jjMoveNfa_0(5, 0);
073          case 37:
074             jjmatchedKind = 41;
075             return jjMoveNfa_0(5, 0);
076          case 40:
077             jjmatchedKind = 34;
078             return jjMoveNfa_0(5, 0);
079          case 41:
080             jjmatchedKind = 36;
081             return jjMoveNfa_0(5, 0);
082          case 42:
083             jjmatchedKind = 39;
084             return jjMoveNfa_0(5, 0);
085          case 43:
086             jjmatchedKind = 37;
087             return jjMoveNfa_0(5, 0);
088          case 44:
089             jjmatchedKind = 35;
090             return jjMoveNfa_0(5, 0);
091          case 45:
092             jjmatchedKind = 38;
093             return jjMoveNfa_0(5, 0);
094          case 47:
095             jjmatchedKind = 40;
096             return jjMoveNfa_0(5, 0);
097          case 60:
098             jjmatchedKind = 32;
099             return jjMoveStringLiteralDfa1_0(0x220000000L);
100          case 61:
101             jjmatchedKind = 28;
102             return jjMoveNfa_0(5, 0);
103          case 62:
104             jjmatchedKind = 30;
105             return jjMoveStringLiteralDfa1_0(0x80000000L);
106          case 65:
107             return jjMoveStringLiteralDfa1_0(0x200L);
108          case 66:
109             return jjMoveStringLiteralDfa1_0(0x800L);
110          case 69:
111             return jjMoveStringLiteralDfa1_0(0x2000L);
112          case 70:
113             return jjMoveStringLiteralDfa1_0(0x20000L);
114          case 73:
115             return jjMoveStringLiteralDfa1_0(0xc000L);
116          case 76:
117             return jjMoveStringLiteralDfa1_0(0x1000L);
118          case 78:
119             return jjMoveStringLiteralDfa1_0(0x40100L);
120          case 79:
121             return jjMoveStringLiteralDfa1_0(0x400L);
122          case 84:
123             return jjMoveStringLiteralDfa1_0(0x10000L);
124          case 88:
125             return jjMoveStringLiteralDfa1_0(0x180000L);
126          case 97:
127             return jjMoveStringLiteralDfa1_0(0x200L);
128          case 98:
129             return jjMoveStringLiteralDfa1_0(0x800L);
130          case 101:
131             return jjMoveStringLiteralDfa1_0(0x2000L);
132          case 102:
133             return jjMoveStringLiteralDfa1_0(0x20000L);
134          case 105:
135             return jjMoveStringLiteralDfa1_0(0xc000L);
136          case 108:
137             return jjMoveStringLiteralDfa1_0(0x1000L);
138          case 110:
139             return jjMoveStringLiteralDfa1_0(0x40100L);
140          case 111:
141             return jjMoveStringLiteralDfa1_0(0x400L);
142          case 116:
143             return jjMoveStringLiteralDfa1_0(0x10000L);
144          case 120:
145             return jjMoveStringLiteralDfa1_0(0x180000L);
146          default :
147             return jjMoveNfa_0(5, 0);
148       }
149    }
150    private final int jjMoveStringLiteralDfa1_0(long active0)
151    {
152       try { curChar = input_stream.readChar(); }
153       catch(java.io.IOException e) {
154       return jjMoveNfa_0(5, 0);
155       }
156       switch(curChar)
157       {
158          case 61:
159             if ((active0 & 0x80000000L) != 0L)
160             {
161                jjmatchedKind = 31;
162                jjmatchedPos = 1;
163             }
164             else if ((active0 & 0x200000000L) != 0L)
165             {
166                jjmatchedKind = 33;
167                jjmatchedPos = 1;
168             }
169             break;
170          case 62:
171             if ((active0 & 0x20000000L) != 0L)
172             {
173                jjmatchedKind = 29;
174                jjmatchedPos = 1;
175             }
176             break;
177          case 65:
178             return jjMoveStringLiteralDfa2_0(active0, 0x20000L);
179          case 69:
180             return jjMoveStringLiteralDfa2_0(active0, 0x800L);
181          case 73:
182             return jjMoveStringLiteralDfa2_0(active0, 0x1000L);
183          case 78:
184             if ((active0 & 0x4000L) != 0L)
185             {
186                jjmatchedKind = 14;
187                jjmatchedPos = 1;
188             }
189             return jjMoveStringLiteralDfa2_0(active0, 0x200L);
190          case 79:
191             return jjMoveStringLiteralDfa2_0(active0, 0x100L);
192          case 80:
193             return jjMoveStringLiteralDfa2_0(active0, 0x80000L);
194          case 81:
195             return jjMoveStringLiteralDfa2_0(active0, 0x100000L);
196          case 82:
197             if ((active0 & 0x400L) != 0L)
198             {
199                jjmatchedKind = 10;
200                jjmatchedPos = 1;
201             }
202             return jjMoveStringLiteralDfa2_0(active0, 0x10000L);
203          case 83:
204             if ((active0 & 0x8000L) != 0L)
205             {
206                jjmatchedKind = 15;
207                jjmatchedPos = 1;
208             }
209             return jjMoveStringLiteralDfa2_0(active0, 0x2000L);
210          case 85:
211             return jjMoveStringLiteralDfa2_0(active0, 0x40000L);
212          case 97:
213             return jjMoveStringLiteralDfa2_0(active0, 0x20000L);
214          case 101:
215             return jjMoveStringLiteralDfa2_0(active0, 0x800L);
216          case 105:
217             return jjMoveStringLiteralDfa2_0(active0, 0x1000L);
218          case 110:
219             if ((active0 & 0x4000L) != 0L)
220             {
221                jjmatchedKind = 14;
222                jjmatchedPos = 1;
223             }
224             return jjMoveStringLiteralDfa2_0(active0, 0x200L);
225          case 111:
226             return jjMoveStringLiteralDfa2_0(active0, 0x100L);
227          case 112:
228             return jjMoveStringLiteralDfa2_0(active0, 0x80000L);
229          case 113:
230             return jjMoveStringLiteralDfa2_0(active0, 0x100000L);
231          case 114:
232             if ((active0 & 0x400L) != 0L)
233             {
234                jjmatchedKind = 10;
235                jjmatchedPos = 1;
236             }
237             return jjMoveStringLiteralDfa2_0(active0, 0x10000L);
238          case 115:
239             if ((active0 & 0x8000L) != 0L)
240             {
241                jjmatchedKind = 15;
242                jjmatchedPos = 1;
243             }
244             return jjMoveStringLiteralDfa2_0(active0, 0x2000L);
245          case 117:
246             return jjMoveStringLiteralDfa2_0(active0, 0x40000L);
247          default :
248             break;
249       }
250       return jjMoveNfa_0(5, 1);
251    }
252    private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
253    {
254       if (((active0 &= old0)) == 0L)
255          return jjMoveNfa_0(5, 1);
256       try { curChar = input_stream.readChar(); }
257       catch(java.io.IOException e) {
258       return jjMoveNfa_0(5, 1);
259       }
260       switch(curChar)
261       {
262          case 65:
263             return jjMoveStringLiteralDfa3_0(active0, 0x80000L);
264          case 67:
265             return jjMoveStringLiteralDfa3_0(active0, 0x2000L);
266          case 68:
267             if ((active0 & 0x200L) != 0L)
268             {
269                jjmatchedKind = 9;
270                jjmatchedPos = 2;
271             }
272             break;
273          case 75:
274             return jjMoveStringLiteralDfa3_0(active0, 0x1000L);
275          case 76:
276             return jjMoveStringLiteralDfa3_0(active0, 0x60000L);
277          case 84:
278             if ((active0 & 0x100L) != 0L)
279             {
280                jjmatchedKind = 8;
281                jjmatchedPos = 2;
282             }
283             return jjMoveStringLiteralDfa3_0(active0, 0x800L);
284          case 85:
285             return jjMoveStringLiteralDfa3_0(active0, 0x110000L);
286          case 97:
287             return jjMoveStringLiteralDfa3_0(active0, 0x80000L);
288          case 99:
289             return jjMoveStringLiteralDfa3_0(active0, 0x2000L);
290          case 100:
291             if ((active0 & 0x200L) != 0L)
292             {
293                jjmatchedKind = 9;
294                jjmatchedPos = 2;
295             }
296             break;
297          case 107:
298             return jjMoveStringLiteralDfa3_0(active0, 0x1000L);
299          case 108:
300             return jjMoveStringLiteralDfa3_0(active0, 0x60000L);
301          case 116:
302             if ((active0 & 0x100L) != 0L)
303             {
304                jjmatchedKind = 8;
305                jjmatchedPos = 2;
306             }
307             return jjMoveStringLiteralDfa3_0(active0, 0x800L);
308          case 117:
309             return jjMoveStringLiteralDfa3_0(active0, 0x110000L);
310          default :
311             break;
312       }
313       return jjMoveNfa_0(5, 2);
314    }
315    private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
316    {
317       if (((active0 &= old0)) == 0L)
318          return jjMoveNfa_0(5, 2);
319       try { curChar = input_stream.readChar(); }
320       catch(java.io.IOException e) {
321       return jjMoveNfa_0(5, 2);
322       }
323       switch(curChar)
324       {
325          case 65:
326             return jjMoveStringLiteralDfa4_0(active0, 0x2000L);
327          case 69:
328             if ((active0 & 0x1000L) != 0L)
329             {
330                jjmatchedKind = 12;
331                jjmatchedPos = 3;
332             }
333             else if ((active0 & 0x10000L) != 0L)
334             {
335                jjmatchedKind = 16;
336                jjmatchedPos = 3;
337             }
338             return jjMoveStringLiteralDfa4_0(active0, 0x100000L);
339          case 76:
340             if ((active0 & 0x40000L) != 0L)
341             {
342                jjmatchedKind = 18;
343                jjmatchedPos = 3;
344             }
345             break;
346          case 83:
347             return jjMoveStringLiteralDfa4_0(active0, 0x20000L);
348          case 84:
349             return jjMoveStringLiteralDfa4_0(active0, 0x80000L);
350          case 87:
351             return jjMoveStringLiteralDfa4_0(active0, 0x800L);
352          case 97:
353             return jjMoveStringLiteralDfa4_0(active0, 0x2000L);
354          case 101:
355             if ((active0 & 0x1000L) != 0L)
356             {
357                jjmatchedKind = 12;
358                jjmatchedPos = 3;
359             }
360             else if ((active0 & 0x10000L) != 0L)
361             {
362                jjmatchedKind = 16;
363                jjmatchedPos = 3;
364             }
365             return jjMoveStringLiteralDfa4_0(active0, 0x100000L);
366          case 108:
367             if ((active0 & 0x40000L) != 0L)
368             {
369                jjmatchedKind = 18;
370                jjmatchedPos = 3;
371             }
372             break;
373          case 115:
374             return jjMoveStringLiteralDfa4_0(active0, 0x20000L);
375          case 116:
376             return jjMoveStringLiteralDfa4_0(active0, 0x80000L);
377          case 119:
378             return jjMoveStringLiteralDfa4_0(active0, 0x800L);
379          default :
380             break;
381       }
382       return jjMoveNfa_0(5, 3);
383    }
384    private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
385    {
386       if (((active0 &= old0)) == 0L)
387          return jjMoveNfa_0(5, 3);
388       try { curChar = input_stream.readChar(); }
389       catch(java.io.IOException e) {
390       return jjMoveNfa_0(5, 3);
391       }
392       switch(curChar)
393       {
394          case 69:
395             if ((active0 & 0x20000L) != 0L)
396             {
397                jjmatchedKind = 17;
398                jjmatchedPos = 4;
399             }
400             return jjMoveStringLiteralDfa5_0(active0, 0x800L);
401          case 72:
402             if ((active0 & 0x80000L) != 0L)
403             {
404                jjmatchedKind = 19;
405                jjmatchedPos = 4;
406             }
407             break;
408          case 80:
409             return jjMoveStringLiteralDfa5_0(active0, 0x2000L);
410          case 82:
411             return jjMoveStringLiteralDfa5_0(active0, 0x100000L);
412          case 101:
413             if ((active0 & 0x20000L) != 0L)
414             {
415                jjmatchedKind = 17;
416                jjmatchedPos = 4;
417             }
418             return jjMoveStringLiteralDfa5_0(active0, 0x800L);
419          case 104:
420             if ((active0 & 0x80000L) != 0L)
421             {
422                jjmatchedKind = 19;
423                jjmatchedPos = 4;
424             }
425             break;
426          case 112:
427             return jjMoveStringLiteralDfa5_0(active0, 0x2000L);
428          case 114:
429             return jjMoveStringLiteralDfa5_0(active0, 0x100000L);
430          default :
431             break;
432       }
433       return jjMoveNfa_0(5, 4);
434    }
435    private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
436    {
437       if (((active0 &= old0)) == 0L)
438          return jjMoveNfa_0(5, 4);
439       try { curChar = input_stream.readChar(); }
440       catch(java.io.IOException e) {
441       return jjMoveNfa_0(5, 4);
442       }
443       switch(curChar)
444       {
445          case 69:
446             if ((active0 & 0x2000L) != 0L)
447             {
448                jjmatchedKind = 13;
449                jjmatchedPos = 5;
450             }
451             return jjMoveStringLiteralDfa6_0(active0, 0x800L);
452          case 89:
453             if ((active0 & 0x100000L) != 0L)
454             {
455                jjmatchedKind = 20;
456                jjmatchedPos = 5;
457             }
458             break;
459          case 101:
460             if ((active0 & 0x2000L) != 0L)
461             {
462                jjmatchedKind = 13;
463                jjmatchedPos = 5;
464             }
465             return jjMoveStringLiteralDfa6_0(active0, 0x800L);
466          case 121:
467             if ((active0 & 0x100000L) != 0L)
468             {
469                jjmatchedKind = 20;
470                jjmatchedPos = 5;
471             }
472             break;
473          default :
474             break;
475       }
476       return jjMoveNfa_0(5, 5);
477    }
478    private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
479    {
480       if (((active0 &= old0)) == 0L)
481          return jjMoveNfa_0(5, 5);
482       try { curChar = input_stream.readChar(); }
483       catch(java.io.IOException e) {
484       return jjMoveNfa_0(5, 5);
485       }
486       switch(curChar)
487       {
488          case 78:
489             if ((active0 & 0x800L) != 0L)
490             {
491                jjmatchedKind = 11;
492                jjmatchedPos = 6;
493             }
494             break;
495          case 110:
496             if ((active0 & 0x800L) != 0L)
497             {
498                jjmatchedKind = 11;
499                jjmatchedPos = 6;
500             }
501             break;
502          default :
503             break;
504       }
505       return jjMoveNfa_0(5, 6);
506    }
507    private final void jjCheckNAdd(int state)
508    {
509       if (jjrounds[state] != jjround)
510       {
511          jjstateSet[jjnewStateCnt++] = state;
512          jjrounds[state] = jjround;
513       }
514    }
515    private final void jjAddStates(int start, int end)
516    {
517       do {
518          jjstateSet[jjnewStateCnt++] = jjnextStates[start];
519       } while (start++ != end);
520    }
521    private final void jjCheckNAddTwoStates(int state1, int state2)
522    {
523       jjCheckNAdd(state1);
524       jjCheckNAdd(state2);
525    }
526    private final void jjCheckNAddStates(int start, int end)
527    {
528       do {
529          jjCheckNAdd(jjnextStates[start]);
530       } while (start++ != end);
531    }
532    private final void jjCheckNAddStates(int start)
533    {
534       jjCheckNAdd(jjnextStates[start]);
535       jjCheckNAdd(jjnextStates[start + 1]);
536    }
537    static final long[] jjbitVec0 = {
538       0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
539    };
540    static final long[] jjbitVec2 = {
541       0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
542    };
543    private final int jjMoveNfa_0(int startState, int curPos)
544    {
545       int strKind = jjmatchedKind;
546       int strPos = jjmatchedPos;
547       int seenUpto;
548       input_stream.backup(seenUpto = curPos + 1);
549       try { curChar = input_stream.readChar(); }
550       catch(java.io.IOException e) { throw new Error("Internal Error"); }
551       curPos = 0;
552       int[] nextStates;
553       int startsAt = 0;
554       jjnewStateCnt = 43;
555       int i = 1;
556       jjstateSet[0] = startState;
557       int j, kind = 0x7fffffff;
558       for (;;)
559       {
560          if (++jjround == 0x7fffffff)
561             ReInitRounds();
562          if (curChar < 64)
563          {
564             long l = 1L << curChar;
565             MatchLoop: do
566             {
567                switch(jjstateSet[--i])
568                {
569                   case 5:
570                      if ((0x3ff000000000000L & l) != 0L)
571                         jjCheckNAddStates(0, 3);
572                      else if (curChar == 36)
573                      {
574                         if (kind > 27)
575                            kind = 27;
576                         jjCheckNAdd(27);
577                      }
578                      else if (curChar == 39)
579                         jjCheckNAddStates(4, 6);
580                      else if (curChar == 46)
581                         jjCheckNAdd(17);
582                      else if (curChar == 47)
583                         jjstateSet[jjnewStateCnt++] = 6;
584                      else if (curChar == 45)
585                         jjstateSet[jjnewStateCnt++] = 0;
586                      if ((0x3fe000000000000L & l) != 0L)
587                      {
588                         if (kind > 21)
589                            kind = 21;
590                         jjCheckNAddTwoStates(14, 15);
591                      }
592                      else if (curChar == 48)
593                      {
594                         if (kind > 23)
595                            kind = 23;
596                         jjCheckNAddTwoStates(40, 42);
597                      }
598                      break;
599                   case 0:
600                      if (curChar == 45)
601                         jjCheckNAddStates(7, 9);
602                      break;
603                   case 1:
604                      if ((0xffffffffffffdbffL & l) != 0L)
605                         jjCheckNAddStates(7, 9);
606                      break;
607                   case 2:
608                      if ((0x2400L & l) != 0L && kind > 6)
609                         kind = 6;
610                      break;
611                   case 3:
612                      if (curChar == 10 && kind > 6)
613                         kind = 6;
614                      break;
615                   case 4:
616                      if (curChar == 13)
617                         jjstateSet[jjnewStateCnt++] = 3;
618                      break;
619                   case 6:
620                      if (curChar == 42)
621                         jjCheckNAddTwoStates(7, 8);
622                      break;
623                   case 7:
624                      if ((0xfffffbffffffffffL & l) != 0L)
625                         jjCheckNAddTwoStates(7, 8);
626                      break;
627                   case 8:
628                      if (curChar == 42)
629                         jjCheckNAddStates(10, 12);
630                      break;
631                   case 9:
632                      if ((0xffff7bffffffffffL & l) != 0L)
633                         jjCheckNAddTwoStates(10, 8);
634                      break;
635                   case 10:
636                      if ((0xfffffbffffffffffL & l) != 0L)
637                         jjCheckNAddTwoStates(10, 8);
638                      break;
639                   case 11:
640                      if (curChar == 47 && kind > 7)
641                         kind = 7;
642                      break;
643                   case 12:
644                      if (curChar == 47)
645                         jjstateSet[jjnewStateCnt++] = 6;
646                      break;
647                   case 13:
648                      if ((0x3fe000000000000L & l) == 0L)
649                         break;
650                      if (kind > 21)
651                         kind = 21;
652                      jjCheckNAddTwoStates(14, 15);
653                      break;
654                   case 14:
655                      if ((0x3ff000000000000L & l) == 0L)
656                         break;
657                      if (kind > 21)
658                         kind = 21;
659                      jjCheckNAddTwoStates(14, 15);
660                      break;
661                   case 16:
662                      if (curChar == 46)
663                         jjCheckNAdd(17);
664                      break;
665                   case 17:
666                      if ((0x3ff000000000000L & l) == 0L)
667                         break;
668                      if (kind > 24)
669                         kind = 24;
670                      jjCheckNAddTwoStates(17, 18);
671                      break;
672                   case 19:
673                      if ((0x280000000000L & l) != 0L)
674                         jjCheckNAdd(20);
675                      break;
676                   case 20:
677                      if ((0x3ff000000000000L & l) == 0L)
678                         break;
679                      if (kind > 24)
680                         kind = 24;
681                      jjCheckNAdd(20);
682                      break;
683                   case 21:
684                   case 22:
685                      if (curChar == 39)
686                         jjCheckNAddStates(4, 6);
687                      break;
688                   case 23:
689                      if (curChar == 39)
690                         jjstateSet[jjnewStateCnt++] = 22;
691                      break;
692                   case 24:
693                      if ((0xffffff7fffffffffL & l) != 0L)
694                         jjCheckNAddStates(4, 6);
695                      break;
696                   case 25:
697                      if (curChar == 39 && kind > 26)
698                         kind = 26;
699                      break;
700                   case 26:
701                      if (curChar != 36)
702                         break;
703                      if (kind > 27)
704                         kind = 27;
705                      jjCheckNAdd(27);
706                      break;
707                   case 27:
708                      if ((0x3ff001000000000L & l) == 0L)
709                         break;
710                      if (kind > 27)
711                         kind = 27;
712                      jjCheckNAdd(27);
713                      break;
714                   case 28:
715                      if ((0x3ff000000000000L & l) != 0L)
716                         jjCheckNAddStates(0, 3);
717                      break;
718                   case 29:
719                      if ((0x3ff000000000000L & l) != 0L)
720                         jjCheckNAddTwoStates(29, 30);
721                      break;
722                   case 30:
723                      if (curChar != 46)
724                         break;
725                      if (kind > 24)
726                         kind = 24;
727                      jjCheckNAddTwoStates(31, 32);
728                      break;
729                   case 31:
730                      if ((0x3ff000000000000L & l) == 0L)
731                         break;
732                      if (kind > 24)
733                         kind = 24;
734                      jjCheckNAddTwoStates(31, 32);
735                      break;
736                   case 33:
737                      if ((0x280000000000L & l) != 0L)
738                         jjCheckNAdd(34);
739                      break;
740                   case 34:
741                      if ((0x3ff000000000000L & l) == 0L)
742                         break;
743                      if (kind > 24)
744                         kind = 24;
745                      jjCheckNAdd(34);
746                      break;
747                   case 35:
748                      if ((0x3ff000000000000L & l) != 0L)
749                         jjCheckNAddTwoStates(35, 36);
750                      break;
751                   case 37:
752                      if ((0x280000000000L & l) != 0L)
753                         jjCheckNAdd(38);
754                      break;
755                   case 38:
756                      if ((0x3ff000000000000L & l) == 0L)
757                         break;
758                      if (kind > 24)
759                         kind = 24;
760                      jjCheckNAdd(38);
761                      break;
762                   case 39:
763                      if (curChar != 48)
764                         break;
765                      if (kind > 23)
766                         kind = 23;
767                      jjCheckNAddTwoStates(40, 42);
768                      break;
769                   case 41:
770                      if ((0x3ff000000000000L & l) == 0L)
771                         break;
772                      if (kind > 22)
773                         kind = 22;
774                      jjstateSet[jjnewStateCnt++] = 41;
775                      break;
776                   case 42:
777                      if ((0xff000000000000L & l) == 0L)
778                         break;
779                      if (kind > 23)
780                         kind = 23;
781                      jjCheckNAdd(42);
782                      break;
783                   default : break;
784                }
785             } while(i != startsAt);
786          }
787          else if (curChar < 128)
788          {
789             long l = 1L << (curChar & 077);
790             MatchLoop: do
791             {
792                switch(jjstateSet[--i])
793                {
794                   case 5:
795                   case 27:
796                      if ((0x7fffffe87fffffeL & l) == 0L)
797                         break;
798                      if (kind > 27)
799                         kind = 27;
800                      jjCheckNAdd(27);
801                      break;
802                   case 1:
803                      jjAddStates(7, 9);
804                      break;
805                   case 7:
806                      jjCheckNAddTwoStates(7, 8);
807                      break;
808                   case 9:
809                   case 10:
810                      jjCheckNAddTwoStates(10, 8);
811                      break;
812                   case 15:
813                      if ((0x100000001000L & l) != 0L && kind > 21)
814                         kind = 21;
815                      break;
816                   case 18:
817                      if ((0x2000000020L & l) != 0L)
818                         jjAddStates(13, 14);
819                      break;
820                   case 24:
821                      jjAddStates(4, 6);
822                      break;
823                   case 32:
824                      if ((0x2000000020L & l) != 0L)
825                         jjAddStates(15, 16);
826                      break;
827                   case 36:
828                      if ((0x2000000020L & l) != 0L)
829                         jjAddStates(17, 18);
830                      break;
831                   case 40:
832                      if ((0x100000001000000L & l) != 0L)
833                         jjCheckNAdd(41);
834                      break;
835                   case 41:
836                      if ((0x7e0000007eL & l) == 0L)
837                         break;
838                      if (kind > 22)
839                         kind = 22;
840                      jjCheckNAdd(41);
841                      break;
842                   default : break;
843                }
844             } while(i != startsAt);
845          }
846          else
847          {
848             int hiByte = (curChar >> 8);
849             int i1 = hiByte >> 6;
850             long l1 = 1L << (hiByte & 077);
851             int i2 = (curChar & 0xff) >> 6;
852             long l2 = 1L << (curChar & 077);
853             MatchLoop: do
854             {
855                switch(jjstateSet[--i])
856                {
857                   case 1:
858                      if (jjCanMove_0(hiByte, i1, i2, l1, l2))
859                         jjAddStates(7, 9);
860                      break;
861                   case 7:
862                      if (jjCanMove_0(hiByte, i1, i2, l1, l2))
863                         jjCheckNAddTwoStates(7, 8);
864                      break;
865                   case 9:
866                   case 10:
867                      if (jjCanMove_0(hiByte, i1, i2, l1, l2))
868                         jjCheckNAddTwoStates(10, 8);
869                      break;
870                   case 24:
871                      if (jjCanMove_0(hiByte, i1, i2, l1, l2))
872                         jjAddStates(4, 6);
873                      break;
874                   default : break;
875                }
876             } while(i != startsAt);
877          }
878          if (kind != 0x7fffffff)
879          {
880             jjmatchedKind = kind;
881             jjmatchedPos = curPos;
882             kind = 0x7fffffff;
883          }
884          ++curPos;
885          if ((i = jjnewStateCnt) == (startsAt = 43 - (jjnewStateCnt = startsAt)))
886             break;
887          try { curChar = input_stream.readChar(); }
888          catch(java.io.IOException e) { break; }
889       }
890       if (jjmatchedPos > strPos)
891          return curPos;
892    
893       int toRet = Math.max(curPos, seenUpto);
894    
895       if (curPos < toRet)
896          for (i = toRet - Math.min(curPos, seenUpto); i-- > 0; )
897             try { curChar = input_stream.readChar(); }
898             catch(java.io.IOException e) { throw new Error("Internal Error : Please send a bug report."); }
899    
900       if (jjmatchedPos < strPos)
901       {
902          jjmatchedKind = strKind;
903          jjmatchedPos = strPos;
904       }
905       else if (jjmatchedPos == strPos && jjmatchedKind > strKind)
906          jjmatchedKind = strKind;
907    
908       return toRet;
909    }
910    static final int[] jjnextStates = {
911       29, 30, 35, 36, 23, 24, 25, 1, 2, 4, 8, 9, 11, 19, 20, 33,
912       34, 37, 38,
913    };
914    private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
915    {
916       switch(hiByte)
917       {
918          case 0:
919             return ((jjbitVec2[i2] & l2) != 0L);
920          default :
921             if ((jjbitVec0[i1] & l1) != 0L)
922                return true;
923             return false;
924       }
925    }
926    public static final String[] jjstrLiteralImages = {
927    "", null, null, null, null, null, null, null, null, null, null, null, null,
928    null, null, null, null, null, null, null, null, null, null, null, null, null, null,
929    null, "\75", "\74\76", "\76", "\76\75", "\74", "\74\75", "\50", "\54", "\51", "\53",
930    "\55", "\52", "\57", "\45", };
931    public static final String[] lexStateNames = {
932       "DEFAULT",
933    };
934    static final long[] jjtoToken = {
935       0x3fffdffff01L,
936    };
937    static final long[] jjtoSkip = {
938       0xfeL,
939    };
940    static final long[] jjtoSpecial = {
941       0x3eL,
942    };
943    protected SimpleCharStream input_stream;
944    private final int[] jjrounds = new int[43];
945    private final int[] jjstateSet = new int[86];
946    protected char curChar;
947    public SelectorParserTokenManager(SimpleCharStream stream){
948       if (SimpleCharStream.staticFlag)
949          throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
950       input_stream = stream;
951    }
952    public SelectorParserTokenManager(SimpleCharStream stream, int lexState){
953       this(stream);
954       SwitchTo(lexState);
955    }
956    public void ReInit(SimpleCharStream stream)
957    {
958       jjmatchedPos = jjnewStateCnt = 0;
959       curLexState = defaultLexState;
960       input_stream = stream;
961       ReInitRounds();
962    }
963    private final void ReInitRounds()
964    {
965       int i;
966       jjround = 0x80000001;
967       for (i = 43; i-- > 0;)
968          jjrounds[i] = 0x80000000;
969    }
970    public void ReInit(SimpleCharStream stream, int lexState)
971    {
972       ReInit(stream);
973       SwitchTo(lexState);
974    }
975    public void SwitchTo(int lexState)
976    {
977       if (lexState >= 1 || lexState < 0)
978          throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
979       curLexState = lexState;
980    }
981    
982    protected Token jjFillToken()
983    {
984       Token t = Token.newToken(jjmatchedKind);
985       t.kind = jjmatchedKind;
986       String im = jjstrLiteralImages[jjmatchedKind];
987       t.image = (im == null) ? input_stream.GetImage() : im;
988       t.beginLine = input_stream.getBeginLine();
989       t.beginColumn = input_stream.getBeginColumn();
990       t.endLine = input_stream.getEndLine();
991       t.endColumn = input_stream.getEndColumn();
992       return t;
993    }
994    
995    int curLexState = 0;
996    int defaultLexState = 0;
997    int jjnewStateCnt;
998    int jjround;
999    int jjmatchedPos;
1000    int jjmatchedKind;
1001    
1002    public Token getNextToken()
1003    {
1004      int kind;
1005      Token specialToken = null;
1006      Token matchedToken;
1007      int curPos = 0;
1008    
1009      EOFLoop :
1010      for (;;)
1011      {
1012       try
1013       {
1014          curChar = input_stream.BeginToken();
1015       }
1016       catch(java.io.IOException e)
1017       {
1018          jjmatchedKind = 0;
1019          matchedToken = jjFillToken();
1020          matchedToken.specialToken = specialToken;
1021          return matchedToken;
1022       }
1023    
1024       jjmatchedKind = 0x7fffffff;
1025       jjmatchedPos = 0;
1026       curPos = jjMoveStringLiteralDfa0_0();
1027       if (jjmatchedKind != 0x7fffffff)
1028       {
1029          if (jjmatchedPos + 1 < curPos)
1030             input_stream.backup(curPos - jjmatchedPos - 1);
1031          if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1032          {
1033             matchedToken = jjFillToken();
1034             matchedToken.specialToken = specialToken;
1035             return matchedToken;
1036          }
1037             if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1038             {
1039                matchedToken = jjFillToken();
1040                if (specialToken == null)
1041                   specialToken = matchedToken;
1042                else
1043                {
1044                   matchedToken.specialToken = specialToken;
1045                   specialToken = (specialToken.next = matchedToken);
1046                }
1047             }
1048             continue EOFLoop;
1049       }
1050       int error_line = input_stream.getEndLine();
1051       int error_column = input_stream.getEndColumn();
1052       String error_after = null;
1053       boolean EOFSeen = false;
1054       try { input_stream.readChar(); input_stream.backup(1); }
1055       catch (java.io.IOException e1) {
1056          EOFSeen = true;
1057          error_after = curPos <= 1 ? "" : input_stream.GetImage();
1058          if (curChar == '\n' || curChar == '\r') {
1059             error_line++;
1060             error_column = 0;
1061          }
1062          else
1063             error_column++;
1064       }
1065       if (!EOFSeen) {
1066          input_stream.backup(1);
1067          error_after = curPos <= 1 ? "" : input_stream.GetImage();
1068       }
1069       throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1070      }
1071    }
1072    
1073    }