View Javadoc

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