001/* AnimTimeParserTokenManager.java */
002/* Generated By:JavaCC: Do not edit this line. AnimTimeParserTokenManager.java */
003package com.kitfox.svg.animation.parser;
004import com.kitfox.svg.SVGConst;
005import com.kitfox.svg.animation.TimeBase;
006import com.kitfox.svg.animation.TimeCompound;
007import com.kitfox.svg.animation.TimeDiscrete;
008import com.kitfox.svg.animation.TimeIndefinite;
009import com.kitfox.svg.animation.TimeLookup;
010import com.kitfox.svg.animation.TimeSum;
011import java.io.StringReader;
012import java.util.ArrayList;
013import java.util.logging.Level;
014import java.util.logging.Logger;
015
016/** Token Manager. */
017public class AnimTimeParserTokenManager implements AnimTimeParserConstants {
018
019  /** Debug output. */
020  public  java.io.PrintStream debugStream = System.out;
021  /** Set debug output. */
022  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
023private final int jjStopStringLiteralDfa_0(int pos, long active0){
024   switch (pos)
025   {
026      case 0:
027         if ((active0 & 0x30000L) != 0L)
028            return 6;
029         if ((active0 & 0x80000L) != 0L)
030            return 2;
031         if ((active0 & 0x1400L) != 0L)
032         {
033            jjmatchedKind = 14;
034            return 11;
035         }
036         if ((active0 & 0x800L) != 0L)
037         {
038            jjmatchedKind = 14;
039            return 13;
040         }
041         return -1;
042      case 1:
043         if ((active0 & 0x1c00L) != 0L)
044         {
045            jjmatchedKind = 14;
046            jjmatchedPos = 1;
047            return 11;
048         }
049         return -1;
050      case 2:
051         if ((active0 & 0x1c00L) != 0L)
052         {
053            jjmatchedKind = 14;
054            jjmatchedPos = 2;
055            return 11;
056         }
057         return -1;
058      case 3:
059         if ((active0 & 0x1c00L) != 0L)
060         {
061            jjmatchedKind = 14;
062            jjmatchedPos = 3;
063            return 11;
064         }
065         return -1;
066      case 4:
067         if ((active0 & 0x1c00L) != 0L)
068         {
069            jjmatchedKind = 14;
070            jjmatchedPos = 4;
071            return 11;
072         }
073         return -1;
074      case 5:
075         if ((active0 & 0x1c00L) != 0L)
076         {
077            jjmatchedKind = 14;
078            jjmatchedPos = 5;
079            return 11;
080         }
081         return -1;
082      case 6:
083         if ((active0 & 0x1c00L) != 0L)
084         {
085            jjmatchedKind = 14;
086            jjmatchedPos = 6;
087            return 11;
088         }
089         return -1;
090      case 7:
091         if ((active0 & 0x1c00L) != 0L)
092         {
093            jjmatchedKind = 14;
094            jjmatchedPos = 7;
095            return 11;
096         }
097         return -1;
098      case 8:
099         if ((active0 & 0x800L) != 0L)
100            return 11;
101         if ((active0 & 0x1400L) != 0L)
102         {
103            jjmatchedKind = 14;
104            jjmatchedPos = 8;
105            return 11;
106         }
107         return -1;
108      case 9:
109         if ((active0 & 0x1000L) != 0L)
110         {
111            jjmatchedKind = 14;
112            jjmatchedPos = 9;
113            return 11;
114         }
115         if ((active0 & 0x400L) != 0L)
116            return 11;
117         return -1;
118      case 10:
119         if ((active0 & 0x1000L) != 0L)
120         {
121            jjmatchedKind = 14;
122            jjmatchedPos = 10;
123            return 11;
124         }
125         return -1;
126      case 11:
127         if ((active0 & 0x1000L) != 0L)
128         {
129            jjmatchedKind = 14;
130            jjmatchedPos = 11;
131            return 11;
132         }
133         return -1;
134      default :
135         return -1;
136   }
137}
138private final int jjStartNfa_0(int pos, long active0){
139   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
140}
141private int jjStopAtPos(int pos, int kind)
142{
143   jjmatchedKind = kind;
144   jjmatchedPos = pos;
145   return pos + 1;
146}
147private int jjMoveStringLiteralDfa0_0(){
148   switch(curChar)
149   {
150      case 40:
151         return jjStopAtPos(0, 20);
152      case 41:
153         return jjStopAtPos(0, 21);
154      case 43:
155         return jjStartNfaWithStates_0(0, 16, 6);
156      case 45:
157         return jjStartNfaWithStates_0(0, 17, 6);
158      case 46:
159         return jjStartNfaWithStates_0(0, 19, 2);
160      case 58:
161         return jjStopAtPos(0, 18);
162      case 59:
163         return jjStopAtPos(0, 15);
164      case 105:
165         return jjMoveStringLiteralDfa1_0(0x400L);
166      case 109:
167         return jjMoveStringLiteralDfa1_0(0x800L);
168      case 119:
169         return jjMoveStringLiteralDfa1_0(0x1000L);
170      default :
171         return jjMoveNfa_0(0, 0);
172   }
173}
174private int jjMoveStringLiteralDfa1_0(long active0){
175   try { curChar = input_stream.readChar(); }
176   catch(java.io.IOException e) {
177      jjStopStringLiteralDfa_0(0, active0);
178      return 1;
179   }
180   switch(curChar)
181   {
182      case 104:
183         return jjMoveStringLiteralDfa2_0(active0, 0x1000L);
184      case 110:
185         return jjMoveStringLiteralDfa2_0(active0, 0x400L);
186      case 111:
187         return jjMoveStringLiteralDfa2_0(active0, 0x800L);
188      default :
189         break;
190   }
191   return jjStartNfa_0(0, active0);
192}
193private int jjMoveStringLiteralDfa2_0(long old0, long active0){
194   if (((active0 &= old0)) == 0L)
195      return jjStartNfa_0(0, old0);
196   try { curChar = input_stream.readChar(); }
197   catch(java.io.IOException e) {
198      jjStopStringLiteralDfa_0(1, active0);
199      return 2;
200   }
201   switch(curChar)
202   {
203      case 100:
204         return jjMoveStringLiteralDfa3_0(active0, 0x400L);
205      case 101:
206         return jjMoveStringLiteralDfa3_0(active0, 0x1000L);
207      case 117:
208         return jjMoveStringLiteralDfa3_0(active0, 0x800L);
209      default :
210         break;
211   }
212   return jjStartNfa_0(1, active0);
213}
214private int jjMoveStringLiteralDfa3_0(long old0, long active0){
215   if (((active0 &= old0)) == 0L)
216      return jjStartNfa_0(1, old0);
217   try { curChar = input_stream.readChar(); }
218   catch(java.io.IOException e) {
219      jjStopStringLiteralDfa_0(2, active0);
220      return 3;
221   }
222   switch(curChar)
223   {
224      case 101:
225         return jjMoveStringLiteralDfa4_0(active0, 0x400L);
226      case 110:
227         return jjMoveStringLiteralDfa4_0(active0, 0x1000L);
228      case 115:
229         return jjMoveStringLiteralDfa4_0(active0, 0x800L);
230      default :
231         break;
232   }
233   return jjStartNfa_0(2, active0);
234}
235private int jjMoveStringLiteralDfa4_0(long old0, long active0){
236   if (((active0 &= old0)) == 0L)
237      return jjStartNfa_0(2, old0);
238   try { curChar = input_stream.readChar(); }
239   catch(java.io.IOException e) {
240      jjStopStringLiteralDfa_0(3, active0);
241      return 4;
242   }
243   switch(curChar)
244   {
245      case 78:
246         return jjMoveStringLiteralDfa5_0(active0, 0x1000L);
247      case 101:
248         return jjMoveStringLiteralDfa5_0(active0, 0x800L);
249      case 102:
250         return jjMoveStringLiteralDfa5_0(active0, 0x400L);
251      default :
252         break;
253   }
254   return jjStartNfa_0(3, active0);
255}
256private int jjMoveStringLiteralDfa5_0(long old0, long active0){
257   if (((active0 &= old0)) == 0L)
258      return jjStartNfa_0(3, old0);
259   try { curChar = input_stream.readChar(); }
260   catch(java.io.IOException e) {
261      jjStopStringLiteralDfa_0(4, active0);
262      return 5;
263   }
264   switch(curChar)
265   {
266      case 105:
267         return jjMoveStringLiteralDfa6_0(active0, 0x400L);
268      case 111:
269         return jjMoveStringLiteralDfa6_0(active0, 0x1800L);
270      default :
271         break;
272   }
273   return jjStartNfa_0(4, active0);
274}
275private int jjMoveStringLiteralDfa6_0(long old0, long active0){
276   if (((active0 &= old0)) == 0L)
277      return jjStartNfa_0(4, old0);
278   try { curChar = input_stream.readChar(); }
279   catch(java.io.IOException e) {
280      jjStopStringLiteralDfa_0(5, active0);
281      return 6;
282   }
283   switch(curChar)
284   {
285      case 110:
286         return jjMoveStringLiteralDfa7_0(active0, 0x400L);
287      case 116:
288         return jjMoveStringLiteralDfa7_0(active0, 0x1000L);
289      case 118:
290         return jjMoveStringLiteralDfa7_0(active0, 0x800L);
291      default :
292         break;
293   }
294   return jjStartNfa_0(5, active0);
295}
296private int jjMoveStringLiteralDfa7_0(long old0, long active0){
297   if (((active0 &= old0)) == 0L)
298      return jjStartNfa_0(5, old0);
299   try { curChar = input_stream.readChar(); }
300   catch(java.io.IOException e) {
301      jjStopStringLiteralDfa_0(6, active0);
302      return 7;
303   }
304   switch(curChar)
305   {
306      case 65:
307         return jjMoveStringLiteralDfa8_0(active0, 0x1000L);
308      case 101:
309         return jjMoveStringLiteralDfa8_0(active0, 0x800L);
310      case 105:
311         return jjMoveStringLiteralDfa8_0(active0, 0x400L);
312      default :
313         break;
314   }
315   return jjStartNfa_0(6, active0);
316}
317private int jjMoveStringLiteralDfa8_0(long old0, long active0){
318   if (((active0 &= old0)) == 0L)
319      return jjStartNfa_0(6, old0);
320   try { curChar = input_stream.readChar(); }
321   catch(java.io.IOException e) {
322      jjStopStringLiteralDfa_0(7, active0);
323      return 8;
324   }
325   switch(curChar)
326   {
327      case 99:
328         return jjMoveStringLiteralDfa9_0(active0, 0x1000L);
329      case 114:
330         if ((active0 & 0x800L) != 0L)
331            return jjStartNfaWithStates_0(8, 11, 11);
332         break;
333      case 116:
334         return jjMoveStringLiteralDfa9_0(active0, 0x400L);
335      default :
336         break;
337   }
338   return jjStartNfa_0(7, active0);
339}
340private int jjMoveStringLiteralDfa9_0(long old0, long active0){
341   if (((active0 &= old0)) == 0L)
342      return jjStartNfa_0(7, old0);
343   try { curChar = input_stream.readChar(); }
344   catch(java.io.IOException e) {
345      jjStopStringLiteralDfa_0(8, active0);
346      return 9;
347   }
348   switch(curChar)
349   {
350      case 101:
351         if ((active0 & 0x400L) != 0L)
352            return jjStartNfaWithStates_0(9, 10, 11);
353         break;
354      case 116:
355         return jjMoveStringLiteralDfa10_0(active0, 0x1000L);
356      default :
357         break;
358   }
359   return jjStartNfa_0(8, active0);
360}
361private int jjMoveStringLiteralDfa10_0(long old0, long active0){
362   if (((active0 &= old0)) == 0L)
363      return jjStartNfa_0(8, old0);
364   try { curChar = input_stream.readChar(); }
365   catch(java.io.IOException e) {
366      jjStopStringLiteralDfa_0(9, active0);
367      return 10;
368   }
369   switch(curChar)
370   {
371      case 105:
372         return jjMoveStringLiteralDfa11_0(active0, 0x1000L);
373      default :
374         break;
375   }
376   return jjStartNfa_0(9, active0);
377}
378private int jjMoveStringLiteralDfa11_0(long old0, long active0){
379   if (((active0 &= old0)) == 0L)
380      return jjStartNfa_0(9, old0);
381   try { curChar = input_stream.readChar(); }
382   catch(java.io.IOException e) {
383      jjStopStringLiteralDfa_0(10, active0);
384      return 11;
385   }
386   switch(curChar)
387   {
388      case 118:
389         return jjMoveStringLiteralDfa12_0(active0, 0x1000L);
390      default :
391         break;
392   }
393   return jjStartNfa_0(10, active0);
394}
395private int jjMoveStringLiteralDfa12_0(long old0, long active0){
396   if (((active0 &= old0)) == 0L)
397      return jjStartNfa_0(10, old0);
398   try { curChar = input_stream.readChar(); }
399   catch(java.io.IOException e) {
400      jjStopStringLiteralDfa_0(11, active0);
401      return 12;
402   }
403   switch(curChar)
404   {
405      case 101:
406         if ((active0 & 0x1000L) != 0L)
407            return jjStartNfaWithStates_0(12, 12, 11);
408         break;
409      default :
410         break;
411   }
412   return jjStartNfa_0(11, active0);
413}
414private int jjStartNfaWithStates_0(int pos, int kind, int state)
415{
416   jjmatchedKind = kind;
417   jjmatchedPos = pos;
418   try { curChar = input_stream.readChar(); }
419   catch(java.io.IOException e) { return pos + 1; }
420   return jjMoveNfa_0(state, pos + 1);
421}
422private int jjMoveNfa_0(int startState, int curPos)
423{
424   int startsAt = 0;
425   jjnewStateCnt = 18;
426   int i = 1;
427   jjstateSet[0] = startState;
428   int kind = 0x7fffffff;
429   for (;;)
430   {
431      if (++jjround == 0x7fffffff)
432         ReInitRounds();
433      if (curChar < 64)
434      {
435         long l = 1L << curChar;
436         do
437         {
438            switch(jjstateSet[--i])
439            {
440               case 6:
441                  if ((0x3ff000000000000L & l) != 0L)
442                  {
443                     if (kind > 9)
444                        kind = 9;
445                     { jjCheckNAddStates(0, 3); }
446                  }
447                  else if (curChar == 46)
448                     { jjCheckNAdd(2); }
449                  break;
450               case 13:
451               case 11:
452                  if ((0x3ff200000000000L & l) == 0L)
453                     break;
454                  if (kind > 14)
455                     kind = 14;
456                  { jjCheckNAdd(11); }
457                  break;
458               case 0:
459                  if ((0x3ff000000000000L & l) != 0L)
460                  {
461                     if (kind > 8)
462                        kind = 8;
463                     { jjCheckNAddStates(4, 8); }
464                  }
465                  else if ((0x280000000000L & l) != 0L)
466                     { jjCheckNAddTwoStates(1, 6); }
467                  else if (curChar == 46)
468                     { jjCheckNAdd(2); }
469                  break;
470               case 1:
471                  if (curChar == 46)
472                     { jjCheckNAdd(2); }
473                  break;
474               case 2:
475                  if ((0x3ff000000000000L & l) == 0L)
476                     break;
477                  if (kind > 9)
478                     kind = 9;
479                  { jjCheckNAddTwoStates(2, 3); }
480                  break;
481               case 4:
482                  if ((0x280000000000L & l) != 0L)
483                     { jjCheckNAdd(5); }
484                  break;
485               case 5:
486                  if ((0x3ff000000000000L & l) == 0L)
487                     break;
488                  if (kind > 9)
489                     kind = 9;
490                  { jjCheckNAdd(5); }
491                  break;
492               case 7:
493                  if ((0x3ff000000000000L & l) != 0L)
494                     { jjCheckNAddTwoStates(7, 1); }
495                  break;
496               case 8:
497                  if ((0x3ff000000000000L & l) == 0L)
498                     break;
499                  if (kind > 9)
500                     kind = 9;
501                  { jjCheckNAddTwoStates(8, 3); }
502                  break;
503               case 16:
504                  if ((0x3ff000000000000L & l) == 0L)
505                     break;
506                  if (kind > 8)
507                     kind = 8;
508                  { jjCheckNAddStates(4, 8); }
509                  break;
510               case 17:
511                  if ((0x3ff000000000000L & l) == 0L)
512                     break;
513                  if (kind > 8)
514                     kind = 8;
515                  { jjCheckNAdd(17); }
516                  break;
517               default : break;
518            }
519         } while(i != startsAt);
520      }
521      else if (curChar < 128)
522      {
523         long l = 1L << (curChar & 077);
524         do
525         {
526            switch(jjstateSet[--i])
527            {
528               case 13:
529                  if ((0x7fffffe87fffffeL & l) != 0L)
530                  {
531                     if (kind > 14)
532                        kind = 14;
533                     { jjCheckNAdd(11); }
534                  }
535                  if (curChar == 105)
536                     jjstateSet[jjnewStateCnt++] = 14;
537                  else if (curChar == 115)
538                  {
539                     if (kind > 13)
540                        kind = 13;
541                  }
542                  break;
543               case 0:
544                  if ((0x7fffffe07fffffeL & l) != 0L)
545                  {
546                     if (kind > 14)
547                        kind = 14;
548                     { jjCheckNAdd(11); }
549                  }
550                  if ((0x8010000000000L & l) != 0L)
551                  {
552                     if (kind > 13)
553                        kind = 13;
554                  }
555                  else if (curChar == 109)
556                     { jjAddStates(9, 10); }
557                  break;
558               case 3:
559                  if ((0x2000000020L & l) != 0L)
560                     { jjAddStates(11, 12); }
561                  break;
562               case 9:
563                  if ((0x8010000000000L & l) != 0L && kind > 13)
564                     kind = 13;
565                  break;
566               case 10:
567                  if ((0x7fffffe07fffffeL & l) == 0L)
568                     break;
569                  if (kind > 14)
570                     kind = 14;
571                  { jjCheckNAdd(11); }
572                  break;
573               case 11:
574                  if ((0x7fffffe87fffffeL & l) == 0L)
575                     break;
576                  if (kind > 14)
577                     kind = 14;
578                  { jjCheckNAdd(11); }
579                  break;
580               case 12:
581                  if (curChar == 109)
582                     { jjAddStates(9, 10); }
583                  break;
584               case 14:
585                  if (curChar == 110 && kind > 13)
586                     kind = 13;
587                  break;
588               case 15:
589                  if (curChar == 105)
590                     jjstateSet[jjnewStateCnt++] = 14;
591                  break;
592               default : break;
593            }
594         } while(i != startsAt);
595      }
596      else
597      {
598         int i2 = (curChar & 0xff) >> 6;
599         long l2 = 1L << (curChar & 077);
600         do
601         {
602            switch(jjstateSet[--i])
603            {
604               default : break;
605            }
606         } while(i != startsAt);
607      }
608      if (kind != 0x7fffffff)
609      {
610         jjmatchedKind = kind;
611         jjmatchedPos = curPos;
612         kind = 0x7fffffff;
613      }
614      ++curPos;
615      if ((i = jjnewStateCnt) == (startsAt = 18 - (jjnewStateCnt = startsAt)))
616         return curPos;
617      try { curChar = input_stream.readChar(); }
618      catch(java.io.IOException e) { return curPos; }
619   }
620}
621
622/** Token literal values. */
623public static final String[] jjstrLiteralImages = {
624"", null, null, null, null, null, null, null, null, null, 
625"\151\156\144\145\146\151\156\151\164\145", "\155\157\165\163\145\157\166\145\162", 
626"\167\150\145\156\116\157\164\101\143\164\151\166\145", null, null, "\73", "\53", "\55", "\72", "\56", "\50", "\51", };
627protected Token jjFillToken()
628{
629   final Token t;
630   final String curTokenImage;
631   final int beginLine;
632   final int endLine;
633   final int beginColumn;
634   final int endColumn;
635   String im = jjstrLiteralImages[jjmatchedKind];
636   curTokenImage = (im == null) ? input_stream.GetImage() : im;
637   beginLine = input_stream.getBeginLine();
638   beginColumn = input_stream.getBeginColumn();
639   endLine = input_stream.getEndLine();
640   endColumn = input_stream.getEndColumn();
641   t = Token.newToken(jjmatchedKind);
642   t.kind = jjmatchedKind;
643   t.image = curTokenImage;
644
645   t.beginLine = beginLine;
646   t.endLine = endLine;
647   t.beginColumn = beginColumn;
648   t.endColumn = endColumn;
649
650   return t;
651}
652static final int[] jjnextStates = {
653   7, 1, 8, 3, 17, 7, 1, 8, 3, 13, 15, 4, 5, 
654};
655
656int curLexState = 0;
657int defaultLexState = 0;
658int jjnewStateCnt;
659int jjround;
660int jjmatchedPos;
661int jjmatchedKind;
662
663/** Get the next Token. */
664public Token getNextToken() 
665{
666  Token matchedToken;
667  int curPos = 0;
668
669  EOFLoop :
670  for (;;)
671  {
672   try
673   {
674      curChar = input_stream.BeginToken();
675   }
676   catch(Exception e)
677   {
678      jjmatchedKind = 0;
679      jjmatchedPos = -1;
680      matchedToken = jjFillToken();
681      return matchedToken;
682   }
683
684   try { input_stream.backup(0);
685      while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
686         curChar = input_stream.BeginToken();
687   }
688   catch (java.io.IOException e1) { continue EOFLoop; }
689   jjmatchedKind = 0x7fffffff;
690   jjmatchedPos = 0;
691   curPos = jjMoveStringLiteralDfa0_0();
692   if (jjmatchedKind != 0x7fffffff)
693   {
694      if (jjmatchedPos + 1 < curPos)
695         input_stream.backup(curPos - jjmatchedPos - 1);
696      if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
697      {
698         matchedToken = jjFillToken();
699         return matchedToken;
700      }
701      else
702      {
703         continue EOFLoop;
704      }
705   }
706   int error_line = input_stream.getEndLine();
707   int error_column = input_stream.getEndColumn();
708   String error_after = null;
709   boolean EOFSeen = false;
710   try { input_stream.readChar(); input_stream.backup(1); }
711   catch (java.io.IOException e1) {
712      EOFSeen = true;
713      error_after = curPos <= 1 ? "" : input_stream.GetImage();
714      if (curChar == '\n' || curChar == '\r') {
715         error_line++;
716         error_column = 0;
717      }
718      else
719         error_column++;
720   }
721   if (!EOFSeen) {
722      input_stream.backup(1);
723      error_after = curPos <= 1 ? "" : input_stream.GetImage();
724   }
725   throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
726  }
727}
728
729void SkipLexicalActions(Token matchedToken)
730{
731   switch(jjmatchedKind)
732   {
733      default :
734         break;
735   }
736}
737void MoreLexicalActions()
738{
739   jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
740   switch(jjmatchedKind)
741   {
742      default :
743         break;
744   }
745}
746void TokenLexicalActions(Token matchedToken)
747{
748   switch(jjmatchedKind)
749   {
750      default :
751         break;
752   }
753}
754private void jjCheckNAdd(int state)
755{
756   if (jjrounds[state] != jjround)
757   {
758      jjstateSet[jjnewStateCnt++] = state;
759      jjrounds[state] = jjround;
760   }
761}
762private void jjAddStates(int start, int end)
763{
764   do {
765      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
766   } while (start++ != end);
767}
768private void jjCheckNAddTwoStates(int state1, int state2)
769{
770   jjCheckNAdd(state1);
771   jjCheckNAdd(state2);
772}
773
774private void jjCheckNAddStates(int start, int end)
775{
776   do {
777      jjCheckNAdd(jjnextStates[start]);
778   } while (start++ != end);
779}
780
781    /** Constructor. */
782    public AnimTimeParserTokenManager(SimpleCharStream stream){
783
784      if (SimpleCharStream.staticFlag)
785            throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
786
787    input_stream = stream;
788  }
789
790  /** Constructor. */
791  public AnimTimeParserTokenManager (SimpleCharStream stream, int lexState){
792    ReInit(stream);
793    SwitchTo(lexState);
794  }
795
796  /** Reinitialise parser. */
797  
798  public void ReInit(SimpleCharStream stream)
799  {
800
801
802    jjmatchedPos =
803    jjnewStateCnt =
804    0;
805    curLexState = defaultLexState;
806    input_stream = stream;
807    ReInitRounds();
808  }
809
810  private void ReInitRounds()
811  {
812    int i;
813    jjround = 0x80000001;
814    for (i = 18; i-- > 0;)
815      jjrounds[i] = 0x80000000;
816  }
817
818  /** Reinitialise parser. */
819  public void ReInit(SimpleCharStream stream, int lexState)
820  
821  {
822    ReInit(stream);
823    SwitchTo(lexState);
824  }
825
826  /** Switch to specified lex state. */
827  public void SwitchTo(int lexState)
828  {
829    if (lexState >= 1 || lexState < 0)
830      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
831    else
832      curLexState = lexState;
833  }
834
835
836/** Lexer state names. */
837public static final String[] lexStateNames = {
838   "DEFAULT",
839};
840
841/** Lex State array. */
842public static final int[] jjnewLexState = {
843   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
844};
845static final long[] jjtoToken = {
846   0x3fff01L, 
847};
848static final long[] jjtoSkip = {
849   0x3eL, 
850};
851static final long[] jjtoSpecial = {
852   0x0L, 
853};
854static final long[] jjtoMore = {
855   0x0L, 
856};
857    protected SimpleCharStream  input_stream;
858
859    private final int[] jjrounds = new int[18];
860    private final int[] jjstateSet = new int[2 * 18];
861    private final StringBuilder jjimage = new StringBuilder();
862    private StringBuilder image = jjimage;
863    private int jjimageLen;
864    private int lengthOfMatch;
865    protected int curChar;
866}