1/* Generated By:JJTree&JavaCC: Do not edit this line. AddressListParserTokenManager.java */
2/*
3 *  Copyright 2004 the mime4j project
4 *
5 *  Licensed under the Apache License, Version 2.0 (the "License");
6 *  you may not use this file except in compliance with the License.
7 *  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *  Unless required by applicable law or agreed to in writing, software
12 *  distributed under the License is distributed on an "AS IS" BASIS,
13 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *  See the License for the specific language governing permissions and
15 *  limitations under the License.
16 */
17package org.apache.james.mime4j.field.address.parser;
18
19public class AddressListParserTokenManager implements AddressListParserConstants
20{
21        // Keeps track of how many levels of comment nesting
22        // we've encountered.  This is only used when the 2nd
23        // level is reached, for example ((this)), not (this).
24        // This is because the outermost level must be treated
25        // specially anyway, because the outermost ")" has a
26        // different token type than inner ")" instances.
27        static int commentNest;
28  public  java.io.PrintStream debugStream = System.out;
29  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
30private final int jjStopStringLiteralDfa_0(int pos, long active0)
31{
32   switch (pos)
33   {
34      default :
35         return -1;
36   }
37}
38private final int jjStartNfa_0(int pos, long active0)
39{
40   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
41}
42private final int jjStopAtPos(int pos, int kind)
43{
44   jjmatchedKind = kind;
45   jjmatchedPos = pos;
46   return pos + 1;
47}
48private final int jjStartNfaWithStates_0(int pos, int kind, int state)
49{
50   jjmatchedKind = kind;
51   jjmatchedPos = pos;
52   try { curChar = input_stream.readChar(); }
53   catch(java.io.IOException e) { return pos + 1; }
54   return jjMoveNfa_0(state, pos + 1);
55}
56private final int jjMoveStringLiteralDfa0_0()
57{
58   switch(curChar)
59   {
60      case 10:
61         return jjStopAtPos(0, 2);
62      case 13:
63         return jjStopAtPos(0, 1);
64      case 34:
65         return jjStopAtPos(0, 28);
66      case 40:
67         return jjStopAtPos(0, 19);
68      case 44:
69         return jjStopAtPos(0, 3);
70      case 46:
71         return jjStopAtPos(0, 9);
72      case 58:
73         return jjStopAtPos(0, 4);
74      case 59:
75         return jjStopAtPos(0, 5);
76      case 60:
77         return jjStopAtPos(0, 6);
78      case 62:
79         return jjStopAtPos(0, 7);
80      case 64:
81         return jjStopAtPos(0, 8);
82      case 91:
83         return jjStopAtPos(0, 15);
84      default :
85         return jjMoveNfa_0(1, 0);
86   }
87}
88private final void jjCheckNAdd(int state)
89{
90   if (jjrounds[state] != jjround)
91   {
92      jjstateSet[jjnewStateCnt++] = state;
93      jjrounds[state] = jjround;
94   }
95}
96private final void jjAddStates(int start, int end)
97{
98   do {
99      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
100   } while (start++ != end);
101}
102private final void jjCheckNAddTwoStates(int state1, int state2)
103{
104   jjCheckNAdd(state1);
105   jjCheckNAdd(state2);
106}
107private final void jjCheckNAddStates(int start, int end)
108{
109   do {
110      jjCheckNAdd(jjnextStates[start]);
111   } while (start++ != end);
112}
113private final void jjCheckNAddStates(int start)
114{
115   jjCheckNAdd(jjnextStates[start]);
116   jjCheckNAdd(jjnextStates[start + 1]);
117}
118private final int jjMoveNfa_0(int startState, int curPos)
119{
120   int[] nextStates;
121   int startsAt = 0;
122   jjnewStateCnt = 3;
123   int i = 1;
124   jjstateSet[0] = startState;
125   int j, kind = 0x7fffffff;
126   for (;;)
127   {
128      if (++jjround == 0x7fffffff)
129         ReInitRounds();
130      if (curChar < 64)
131      {
132         long l = 1L << curChar;
133         MatchLoop: do
134         {
135            switch(jjstateSet[--i])
136            {
137               case 1:
138                  if ((0xa3ffacfa00000000L & l) != 0L)
139                  {
140                     if (kind > 14)
141                        kind = 14;
142                     jjCheckNAdd(2);
143                  }
144                  else if ((0x100000200L & l) != 0L)
145                  {
146                     if (kind > 10)
147                        kind = 10;
148                     jjCheckNAdd(0);
149                  }
150                  break;
151               case 0:
152                  if ((0x100000200L & l) == 0L)
153                     break;
154                  kind = 10;
155                  jjCheckNAdd(0);
156                  break;
157               case 2:
158                  if ((0xa3ffecfa00000000L & l) == 0L)
159                     break;
160                  if (kind > 14)
161                     kind = 14;
162                  jjCheckNAdd(2);
163                  break;
164               default : break;
165            }
166         } while(i != startsAt);
167      }
168      else if (curChar < 128)
169      {
170         long l = 1L << (curChar & 077);
171         MatchLoop: do
172         {
173            switch(jjstateSet[--i])
174            {
175               case 1:
176               case 2:
177                  if ((0x7fffffffc7fffffeL & l) == 0L)
178                     break;
179                  if (kind > 14)
180                     kind = 14;
181                  jjCheckNAdd(2);
182                  break;
183               default : break;
184            }
185         } while(i != startsAt);
186      }
187      else
188      {
189         int i2 = (curChar & 0xff) >> 6;
190         long l2 = 1L << (curChar & 077);
191         MatchLoop: do
192         {
193            switch(jjstateSet[--i])
194            {
195               default : break;
196            }
197         } while(i != startsAt);
198      }
199      if (kind != 0x7fffffff)
200      {
201         jjmatchedKind = kind;
202         jjmatchedPos = curPos;
203         kind = 0x7fffffff;
204      }
205      ++curPos;
206      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
207         return curPos;
208      try { curChar = input_stream.readChar(); }
209      catch(java.io.IOException e) { return curPos; }
210   }
211}
212private final int jjStopStringLiteralDfa_2(int pos, long active0)
213{
214   switch (pos)
215   {
216      default :
217         return -1;
218   }
219}
220private final int jjStartNfa_2(int pos, long active0)
221{
222   return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
223}
224private final int jjStartNfaWithStates_2(int pos, int kind, int state)
225{
226   jjmatchedKind = kind;
227   jjmatchedPos = pos;
228   try { curChar = input_stream.readChar(); }
229   catch(java.io.IOException e) { return pos + 1; }
230   return jjMoveNfa_2(state, pos + 1);
231}
232private final int jjMoveStringLiteralDfa0_2()
233{
234   switch(curChar)
235   {
236      case 40:
237         return jjStopAtPos(0, 22);
238      case 41:
239         return jjStopAtPos(0, 20);
240      default :
241         return jjMoveNfa_2(0, 0);
242   }
243}
244static final long[] jjbitVec0 = {
245   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
246};
247private final int jjMoveNfa_2(int startState, int curPos)
248{
249   int[] nextStates;
250   int startsAt = 0;
251   jjnewStateCnt = 3;
252   int i = 1;
253   jjstateSet[0] = startState;
254   int j, kind = 0x7fffffff;
255   for (;;)
256   {
257      if (++jjround == 0x7fffffff)
258         ReInitRounds();
259      if (curChar < 64)
260      {
261         long l = 1L << curChar;
262         MatchLoop: do
263         {
264            switch(jjstateSet[--i])
265            {
266               case 0:
267                  if (kind > 23)
268                     kind = 23;
269                  break;
270               case 1:
271                  if (kind > 21)
272                     kind = 21;
273                  break;
274               default : break;
275            }
276         } while(i != startsAt);
277      }
278      else if (curChar < 128)
279      {
280         long l = 1L << (curChar & 077);
281         MatchLoop: do
282         {
283            switch(jjstateSet[--i])
284            {
285               case 0:
286                  if (kind > 23)
287                     kind = 23;
288                  if (curChar == 92)
289                     jjstateSet[jjnewStateCnt++] = 1;
290                  break;
291               case 1:
292                  if (kind > 21)
293                     kind = 21;
294                  break;
295               case 2:
296                  if (kind > 23)
297                     kind = 23;
298                  break;
299               default : break;
300            }
301         } while(i != startsAt);
302      }
303      else
304      {
305         int i2 = (curChar & 0xff) >> 6;
306         long l2 = 1L << (curChar & 077);
307         MatchLoop: do
308         {
309            switch(jjstateSet[--i])
310            {
311               case 0:
312                  if ((jjbitVec0[i2] & l2) != 0L && kind > 23)
313                     kind = 23;
314                  break;
315               case 1:
316                  if ((jjbitVec0[i2] & l2) != 0L && kind > 21)
317                     kind = 21;
318                  break;
319               default : break;
320            }
321         } while(i != startsAt);
322      }
323      if (kind != 0x7fffffff)
324      {
325         jjmatchedKind = kind;
326         jjmatchedPos = curPos;
327         kind = 0x7fffffff;
328      }
329      ++curPos;
330      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
331         return curPos;
332      try { curChar = input_stream.readChar(); }
333      catch(java.io.IOException e) { return curPos; }
334   }
335}
336private final int jjStopStringLiteralDfa_4(int pos, long active0)
337{
338   switch (pos)
339   {
340      default :
341         return -1;
342   }
343}
344private final int jjStartNfa_4(int pos, long active0)
345{
346   return jjMoveNfa_4(jjStopStringLiteralDfa_4(pos, active0), pos + 1);
347}
348private final int jjStartNfaWithStates_4(int pos, int kind, int state)
349{
350   jjmatchedKind = kind;
351   jjmatchedPos = pos;
352   try { curChar = input_stream.readChar(); }
353   catch(java.io.IOException e) { return pos + 1; }
354   return jjMoveNfa_4(state, pos + 1);
355}
356private final int jjMoveStringLiteralDfa0_4()
357{
358   switch(curChar)
359   {
360      case 34:
361         return jjStopAtPos(0, 31);
362      default :
363         return jjMoveNfa_4(0, 0);
364   }
365}
366private final int jjMoveNfa_4(int startState, int curPos)
367{
368   int[] nextStates;
369   int startsAt = 0;
370   jjnewStateCnt = 3;
371   int i = 1;
372   jjstateSet[0] = startState;
373   int j, kind = 0x7fffffff;
374   for (;;)
375   {
376      if (++jjround == 0x7fffffff)
377         ReInitRounds();
378      if (curChar < 64)
379      {
380         long l = 1L << curChar;
381         MatchLoop: do
382         {
383            switch(jjstateSet[--i])
384            {
385               case 0:
386               case 2:
387                  if ((0xfffffffbffffffffL & l) == 0L)
388                     break;
389                  if (kind > 30)
390                     kind = 30;
391                  jjCheckNAdd(2);
392                  break;
393               case 1:
394                  if (kind > 29)
395                     kind = 29;
396                  break;
397               default : break;
398            }
399         } while(i != startsAt);
400      }
401      else if (curChar < 128)
402      {
403         long l = 1L << (curChar & 077);
404         MatchLoop: do
405         {
406            switch(jjstateSet[--i])
407            {
408               case 0:
409                  if ((0xffffffffefffffffL & l) != 0L)
410                  {
411                     if (kind > 30)
412                        kind = 30;
413                     jjCheckNAdd(2);
414                  }
415                  else if (curChar == 92)
416                     jjstateSet[jjnewStateCnt++] = 1;
417                  break;
418               case 1:
419                  if (kind > 29)
420                     kind = 29;
421                  break;
422               case 2:
423                  if ((0xffffffffefffffffL & l) == 0L)
424                     break;
425                  if (kind > 30)
426                     kind = 30;
427                  jjCheckNAdd(2);
428                  break;
429               default : break;
430            }
431         } while(i != startsAt);
432      }
433      else
434      {
435         int i2 = (curChar & 0xff) >> 6;
436         long l2 = 1L << (curChar & 077);
437         MatchLoop: do
438         {
439            switch(jjstateSet[--i])
440            {
441               case 0:
442               case 2:
443                  if ((jjbitVec0[i2] & l2) == 0L)
444                     break;
445                  if (kind > 30)
446                     kind = 30;
447                  jjCheckNAdd(2);
448                  break;
449               case 1:
450                  if ((jjbitVec0[i2] & l2) != 0L && kind > 29)
451                     kind = 29;
452                  break;
453               default : break;
454            }
455         } while(i != startsAt);
456      }
457      if (kind != 0x7fffffff)
458      {
459         jjmatchedKind = kind;
460         jjmatchedPos = curPos;
461         kind = 0x7fffffff;
462      }
463      ++curPos;
464      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
465         return curPos;
466      try { curChar = input_stream.readChar(); }
467      catch(java.io.IOException e) { return curPos; }
468   }
469}
470private final int jjStopStringLiteralDfa_3(int pos, long active0)
471{
472   switch (pos)
473   {
474      default :
475         return -1;
476   }
477}
478private final int jjStartNfa_3(int pos, long active0)
479{
480   return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0), pos + 1);
481}
482private final int jjStartNfaWithStates_3(int pos, int kind, int state)
483{
484   jjmatchedKind = kind;
485   jjmatchedPos = pos;
486   try { curChar = input_stream.readChar(); }
487   catch(java.io.IOException e) { return pos + 1; }
488   return jjMoveNfa_3(state, pos + 1);
489}
490private final int jjMoveStringLiteralDfa0_3()
491{
492   switch(curChar)
493   {
494      case 40:
495         return jjStopAtPos(0, 25);
496      case 41:
497         return jjStopAtPos(0, 26);
498      default :
499         return jjMoveNfa_3(0, 0);
500   }
501}
502private final int jjMoveNfa_3(int startState, int curPos)
503{
504   int[] nextStates;
505   int startsAt = 0;
506   jjnewStateCnt = 3;
507   int i = 1;
508   jjstateSet[0] = startState;
509   int j, kind = 0x7fffffff;
510   for (;;)
511   {
512      if (++jjround == 0x7fffffff)
513         ReInitRounds();
514      if (curChar < 64)
515      {
516         long l = 1L << curChar;
517         MatchLoop: do
518         {
519            switch(jjstateSet[--i])
520            {
521               case 0:
522                  if (kind > 27)
523                     kind = 27;
524                  break;
525               case 1:
526                  if (kind > 24)
527                     kind = 24;
528                  break;
529               default : break;
530            }
531         } while(i != startsAt);
532      }
533      else if (curChar < 128)
534      {
535         long l = 1L << (curChar & 077);
536         MatchLoop: do
537         {
538            switch(jjstateSet[--i])
539            {
540               case 0:
541                  if (kind > 27)
542                     kind = 27;
543                  if (curChar == 92)
544                     jjstateSet[jjnewStateCnt++] = 1;
545                  break;
546               case 1:
547                  if (kind > 24)
548                     kind = 24;
549                  break;
550               case 2:
551                  if (kind > 27)
552                     kind = 27;
553                  break;
554               default : break;
555            }
556         } while(i != startsAt);
557      }
558      else
559      {
560         int i2 = (curChar & 0xff) >> 6;
561         long l2 = 1L << (curChar & 077);
562         MatchLoop: do
563         {
564            switch(jjstateSet[--i])
565            {
566               case 0:
567                  if ((jjbitVec0[i2] & l2) != 0L && kind > 27)
568                     kind = 27;
569                  break;
570               case 1:
571                  if ((jjbitVec0[i2] & l2) != 0L && kind > 24)
572                     kind = 24;
573                  break;
574               default : break;
575            }
576         } while(i != startsAt);
577      }
578      if (kind != 0x7fffffff)
579      {
580         jjmatchedKind = kind;
581         jjmatchedPos = curPos;
582         kind = 0x7fffffff;
583      }
584      ++curPos;
585      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
586         return curPos;
587      try { curChar = input_stream.readChar(); }
588      catch(java.io.IOException e) { return curPos; }
589   }
590}
591private final int jjStopStringLiteralDfa_1(int pos, long active0)
592{
593   switch (pos)
594   {
595      default :
596         return -1;
597   }
598}
599private final int jjStartNfa_1(int pos, long active0)
600{
601   return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
602}
603private final int jjStartNfaWithStates_1(int pos, int kind, int state)
604{
605   jjmatchedKind = kind;
606   jjmatchedPos = pos;
607   try { curChar = input_stream.readChar(); }
608   catch(java.io.IOException e) { return pos + 1; }
609   return jjMoveNfa_1(state, pos + 1);
610}
611private final int jjMoveStringLiteralDfa0_1()
612{
613   switch(curChar)
614   {
615      case 93:
616         return jjStopAtPos(0, 18);
617      default :
618         return jjMoveNfa_1(0, 0);
619   }
620}
621private final int jjMoveNfa_1(int startState, int curPos)
622{
623   int[] nextStates;
624   int startsAt = 0;
625   jjnewStateCnt = 3;
626   int i = 1;
627   jjstateSet[0] = startState;
628   int j, kind = 0x7fffffff;
629   for (;;)
630   {
631      if (++jjround == 0x7fffffff)
632         ReInitRounds();
633      if (curChar < 64)
634      {
635         long l = 1L << curChar;
636         MatchLoop: do
637         {
638            switch(jjstateSet[--i])
639            {
640               case 0:
641                  if (kind > 17)
642                     kind = 17;
643                  break;
644               case 1:
645                  if (kind > 16)
646                     kind = 16;
647                  break;
648               default : break;
649            }
650         } while(i != startsAt);
651      }
652      else if (curChar < 128)
653      {
654         long l = 1L << (curChar & 077);
655         MatchLoop: do
656         {
657            switch(jjstateSet[--i])
658            {
659               case 0:
660                  if ((0xffffffffc7ffffffL & l) != 0L)
661                  {
662                     if (kind > 17)
663                        kind = 17;
664                  }
665                  else if (curChar == 92)
666                     jjstateSet[jjnewStateCnt++] = 1;
667                  break;
668               case 1:
669                  if (kind > 16)
670                     kind = 16;
671                  break;
672               case 2:
673                  if ((0xffffffffc7ffffffL & l) != 0L && kind > 17)
674                     kind = 17;
675                  break;
676               default : break;
677            }
678         } while(i != startsAt);
679      }
680      else
681      {
682         int i2 = (curChar & 0xff) >> 6;
683         long l2 = 1L << (curChar & 077);
684         MatchLoop: do
685         {
686            switch(jjstateSet[--i])
687            {
688               case 0:
689                  if ((jjbitVec0[i2] & l2) != 0L && kind > 17)
690                     kind = 17;
691                  break;
692               case 1:
693                  if ((jjbitVec0[i2] & l2) != 0L && kind > 16)
694                     kind = 16;
695                  break;
696               default : break;
697            }
698         } while(i != startsAt);
699      }
700      if (kind != 0x7fffffff)
701      {
702         jjmatchedKind = kind;
703         jjmatchedPos = curPos;
704         kind = 0x7fffffff;
705      }
706      ++curPos;
707      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
708         return curPos;
709      try { curChar = input_stream.readChar(); }
710      catch(java.io.IOException e) { return curPos; }
711   }
712}
713static final int[] jjnextStates = {
714};
715public static final String[] jjstrLiteralImages = {
716"", "\15", "\12", "\54", "\72", "\73", "\74", "\76", "\100", "\56", null, null,
717null, null, null, null, null, null, null, null, null, null, null, null, null, null,
718null, null, null, null, null, null, null, null, };
719public static final String[] lexStateNames = {
720   "DEFAULT",
721   "INDOMAINLITERAL",
722   "INCOMMENT",
723   "NESTED_COMMENT",
724   "INQUOTEDSTRING",
725};
726public static final int[] jjnewLexState = {
727   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, 2, 0, -1, 3, -1, -1,
728   -1, -1, -1, 4, -1, -1, 0, -1, -1,
729};
730static final long[] jjtoToken = {
731   0x800443ffL,
732};
733static final long[] jjtoSkip = {
734   0x100400L,
735};
736static final long[] jjtoSpecial = {
737   0x400L,
738};
739static final long[] jjtoMore = {
740   0x7feb8000L,
741};
742protected SimpleCharStream input_stream;
743private final int[] jjrounds = new int[3];
744private final int[] jjstateSet = new int[6];
745StringBuffer image;
746int jjimageLen;
747int lengthOfMatch;
748protected char curChar;
749public AddressListParserTokenManager(SimpleCharStream stream){
750   if (SimpleCharStream.staticFlag)
751      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
752   input_stream = stream;
753}
754public AddressListParserTokenManager(SimpleCharStream stream, int lexState){
755   this(stream);
756   SwitchTo(lexState);
757}
758public void ReInit(SimpleCharStream stream)
759{
760   jjmatchedPos = jjnewStateCnt = 0;
761   curLexState = defaultLexState;
762   input_stream = stream;
763   ReInitRounds();
764}
765private final void ReInitRounds()
766{
767   int i;
768   jjround = 0x80000001;
769   for (i = 3; i-- > 0;)
770      jjrounds[i] = 0x80000000;
771}
772public void ReInit(SimpleCharStream stream, int lexState)
773{
774   ReInit(stream);
775   SwitchTo(lexState);
776}
777public void SwitchTo(int lexState)
778{
779   if (lexState >= 5 || lexState < 0)
780      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
781   else
782      curLexState = lexState;
783}
784
785protected Token jjFillToken()
786{
787   Token t = Token.newToken(jjmatchedKind);
788   t.kind = jjmatchedKind;
789   String im = jjstrLiteralImages[jjmatchedKind];
790   t.image = (im == null) ? input_stream.GetImage() : im;
791   t.beginLine = input_stream.getBeginLine();
792   t.beginColumn = input_stream.getBeginColumn();
793   t.endLine = input_stream.getEndLine();
794   t.endColumn = input_stream.getEndColumn();
795   return t;
796}
797
798int curLexState = 0;
799int defaultLexState = 0;
800int jjnewStateCnt;
801int jjround;
802int jjmatchedPos;
803int jjmatchedKind;
804
805public Token getNextToken()
806{
807  int kind;
808  Token specialToken = null;
809  Token matchedToken;
810  int curPos = 0;
811
812  EOFLoop :
813  for (;;)
814  {
815   try
816   {
817      curChar = input_stream.BeginToken();
818   }
819   catch(java.io.IOException e)
820   {
821      jjmatchedKind = 0;
822      matchedToken = jjFillToken();
823      matchedToken.specialToken = specialToken;
824      return matchedToken;
825   }
826   image = null;
827   jjimageLen = 0;
828
829   for (;;)
830   {
831     switch(curLexState)
832     {
833       case 0:
834         jjmatchedKind = 0x7fffffff;
835         jjmatchedPos = 0;
836         curPos = jjMoveStringLiteralDfa0_0();
837         break;
838       case 1:
839         jjmatchedKind = 0x7fffffff;
840         jjmatchedPos = 0;
841         curPos = jjMoveStringLiteralDfa0_1();
842         break;
843       case 2:
844         jjmatchedKind = 0x7fffffff;
845         jjmatchedPos = 0;
846         curPos = jjMoveStringLiteralDfa0_2();
847         break;
848       case 3:
849         jjmatchedKind = 0x7fffffff;
850         jjmatchedPos = 0;
851         curPos = jjMoveStringLiteralDfa0_3();
852         break;
853       case 4:
854         jjmatchedKind = 0x7fffffff;
855         jjmatchedPos = 0;
856         curPos = jjMoveStringLiteralDfa0_4();
857         break;
858     }
859     if (jjmatchedKind != 0x7fffffff)
860     {
861        if (jjmatchedPos + 1 < curPos)
862           input_stream.backup(curPos - jjmatchedPos - 1);
863        if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
864        {
865           matchedToken = jjFillToken();
866           matchedToken.specialToken = specialToken;
867           TokenLexicalActions(matchedToken);
868       if (jjnewLexState[jjmatchedKind] != -1)
869         curLexState = jjnewLexState[jjmatchedKind];
870           return matchedToken;
871        }
872        else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
873        {
874           if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
875           {
876              matchedToken = jjFillToken();
877              if (specialToken == null)
878                 specialToken = matchedToken;
879              else
880              {
881                 matchedToken.specialToken = specialToken;
882                 specialToken = (specialToken.next = matchedToken);
883              }
884           }
885         if (jjnewLexState[jjmatchedKind] != -1)
886           curLexState = jjnewLexState[jjmatchedKind];
887           continue EOFLoop;
888        }
889        MoreLexicalActions();
890      if (jjnewLexState[jjmatchedKind] != -1)
891        curLexState = jjnewLexState[jjmatchedKind];
892        curPos = 0;
893        jjmatchedKind = 0x7fffffff;
894        try {
895           curChar = input_stream.readChar();
896           continue;
897        }
898        catch (java.io.IOException e1) { }
899     }
900     int error_line = input_stream.getEndLine();
901     int error_column = input_stream.getEndColumn();
902     String error_after = null;
903     boolean EOFSeen = false;
904     try { input_stream.readChar(); input_stream.backup(1); }
905     catch (java.io.IOException e1) {
906        EOFSeen = true;
907        error_after = curPos <= 1 ? "" : input_stream.GetImage();
908        if (curChar == '\n' || curChar == '\r') {
909           error_line++;
910           error_column = 0;
911        }
912        else
913           error_column++;
914     }
915     if (!EOFSeen) {
916        input_stream.backup(1);
917        error_after = curPos <= 1 ? "" : input_stream.GetImage();
918     }
919     throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
920   }
921  }
922}
923
924void MoreLexicalActions()
925{
926   jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
927   switch(jjmatchedKind)
928   {
929      case 16 :
930         if (image == null)
931            image = new StringBuffer();
932         image.append(input_stream.GetSuffix(jjimageLen));
933         jjimageLen = 0;
934                          image.deleteCharAt(image.length() - 2);
935         break;
936      case 21 :
937         if (image == null)
938            image = new StringBuffer();
939         image.append(input_stream.GetSuffix(jjimageLen));
940         jjimageLen = 0;
941                          image.deleteCharAt(image.length() - 2);
942         break;
943      case 22 :
944         if (image == null)
945            image = new StringBuffer();
946         image.append(input_stream.GetSuffix(jjimageLen));
947         jjimageLen = 0;
948              commentNest = 1;
949         break;
950      case 24 :
951         if (image == null)
952            image = new StringBuffer();
953         image.append(input_stream.GetSuffix(jjimageLen));
954         jjimageLen = 0;
955                          image.deleteCharAt(image.length() - 2);
956         break;
957      case 25 :
958         if (image == null)
959            image = new StringBuffer();
960         image.append(input_stream.GetSuffix(jjimageLen));
961         jjimageLen = 0;
962              ++commentNest;
963         break;
964      case 26 :
965         if (image == null)
966            image = new StringBuffer();
967         image.append(input_stream.GetSuffix(jjimageLen));
968         jjimageLen = 0;
969              --commentNest; if (commentNest == 0) SwitchTo(INCOMMENT);
970         break;
971      case 28 :
972         if (image == null)
973            image = new StringBuffer();
974         image.append(input_stream.GetSuffix(jjimageLen));
975         jjimageLen = 0;
976               image.deleteCharAt(image.length() - 1);
977         break;
978      case 29 :
979         if (image == null)
980            image = new StringBuffer();
981         image.append(input_stream.GetSuffix(jjimageLen));
982         jjimageLen = 0;
983                          image.deleteCharAt(image.length() - 2);
984         break;
985      default :
986         break;
987   }
988}
989void TokenLexicalActions(Token matchedToken)
990{
991   switch(jjmatchedKind)
992   {
993      case 18 :
994        if (image == null)
995            image = new StringBuffer();
996            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
997                                 matchedToken.image = image.toString();
998         break;
999      case 31 :
1000        if (image == null)
1001            image = new StringBuffer();
1002            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
1003                                 matchedToken.image = image.substring(0, image.length() - 1);
1004         break;
1005      default :
1006         break;
1007   }
1008}
1009}
1010