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