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