Func1ParserTokenManager.java

Go to the documentation of this file.
00001 /* Generated By:JavaCC: Do not edit this line. Func1ParserTokenManager.java */
00002 package plp.functional1.parser;
00003 import plp.functional1.*;
00004 import plp.functional1.declaration.DecVariavel;
00005 import plp.functional1.util.ValorFuncao;
00006 import plp.functional1.declaration.DeclaracaoFuncional;
00007 import plp.functional1.declaration.DecFuncao;
00008 import plp.functional1.expression.ExpDeclaracao;
00009 import plp.functional1.expression.IfThenElse;
00010 import plp.functional1.expression.Aplicacao;
00011 import java.util.*;
00012 import plp.expressions2.expression.ExpAnd;
00013 import plp.expressions2.expression.ExpConcat;
00014 import plp.expressions2.expression.ExpEquals;
00015 import plp.expressions2.expression.ExpLength;
00016 import plp.expressions2.expression.ExpMenos;
00017 import plp.expressions2.expression.ExpNot;
00018 import plp.expressions2.expression.ExpOr;
00019 import plp.expressions2.expression.ExpSoma;
00020 import plp.expressions2.expression.ExpSub;
00021 import plp.expressions2.expression.Expressao;
00022 import plp.expressions2.expression.Id;
00023 import plp.expressions2.expression.Valor;
00024 import plp.expressions2.expression.ValorBooleano;
00025 import plp.expressions2.expression.ValorInteiro;
00026 import plp.expressions2.expression.ValorString;
00027 
00028 public class Func1ParserTokenManager implements Func1ParserConstants
00029 {
00030   public static  java.io.PrintStream debugStream = System.out;
00031   public static  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
00032 private static final int jjStopStringLiteralDfa_0(int pos, long active0)
00033 {
00034    switch (pos)
00035    {
00036       case 0:
00037          if ((active0 & 0x3ffe00L) != 0L)
00038          {
00039             jjmatchedKind = 27;
00040             return 13;
00041          }
00042          if ((active0 & 0x100000000000000L) != 0L)
00043             return 19;
00044          return -1;
00045       case 1:
00046          if ((active0 & 0x39fa00L) != 0L)
00047          {
00048             jjmatchedKind = 27;
00049             jjmatchedPos = 1;
00050             return 13;
00051          }
00052          if ((active0 & 0x60400L) != 0L)
00053             return 13;
00054          return -1;
00055       case 2:
00056          if ((active0 & 0x187000L) != 0L)
00057          {
00058             jjmatchedKind = 27;
00059             jjmatchedPos = 2;
00060             return 13;
00061          }
00062          if ((active0 & 0x218a00L) != 0L)
00063             return 13;
00064          return -1;
00065       case 3:
00066          if ((active0 & 0x5000L) != 0L)
00067          {
00068             jjmatchedKind = 27;
00069             jjmatchedPos = 3;
00070             return 13;
00071          }
00072          if ((active0 & 0x182000L) != 0L)
00073             return 13;
00074          return -1;
00075       case 4:
00076          if ((active0 & 0x1000L) != 0L)
00077          {
00078             jjmatchedKind = 27;
00079             jjmatchedPos = 4;
00080             return 13;
00081          }
00082          if ((active0 & 0x4000L) != 0L)
00083             return 13;
00084          return -1;
00085       default :
00086          return -1;
00087    }
00088 }
00089 private static final int jjStartNfa_0(int pos, long active0)
00090 {
00091    return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
00092 }
00093 static private final int jjStopAtPos(int pos, int kind)
00094 {
00095    jjmatchedKind = kind;
00096    jjmatchedPos = pos;
00097    return pos + 1;
00098 }
00099 static private final int jjStartNfaWithStates_0(int pos, int kind, int state)
00100 {
00101    jjmatchedKind = kind;
00102    jjmatchedPos = pos;
00103    try { curChar = input_stream.readChar(); }
00104    catch(java.io.IOException e) { return pos + 1; }
00105    return jjMoveNfa_0(state, pos + 1);
00106 }
00107 static private final int jjMoveStringLiteralDfa0_0()
00108 {
00109    switch(curChar)
00110    {
00111       case 33:
00112          jjmatchedKind = 42;
00113          return jjMoveStringLiteralDfa1_0(0x2000000000000L);
00114       case 37:
00115          return jjStopAtPos(0, 60);
00116       case 38:
00117          jjmatchedKind = 57;
00118          return jjMoveStringLiteralDfa1_0(0x8000000000000L);
00119       case 40:
00120          return jjStopAtPos(0, 30);
00121       case 41:
00122          return jjStopAtPos(0, 31);
00123       case 42:
00124          return jjStopAtPos(0, 55);
00125       case 43:
00126          jjmatchedKind = 53;
00127          return jjMoveStringLiteralDfa1_0(0x10000000000000L);
00128       case 44:
00129          return jjStopAtPos(0, 37);
00130       case 45:
00131          return jjStopAtPos(0, 54);
00132       case 46:
00133          return jjStopAtPos(0, 38);
00134       case 47:
00135          return jjStartNfaWithStates_0(0, 56, 19);
00136       case 58:
00137          return jjStopAtPos(0, 45);
00138       case 59:
00139          return jjStopAtPos(0, 36);
00140       case 60:
00141          jjmatchedKind = 41;
00142          return jjMoveStringLiteralDfa1_0(0x800000000000L);
00143       case 61:
00144          jjmatchedKind = 39;
00145          return jjMoveStringLiteralDfa1_0(0x400000000000L);
00146       case 62:
00147          jjmatchedKind = 40;
00148          return jjMoveStringLiteralDfa1_0(0x1000000000000L);
00149       case 63:
00150          return jjStopAtPos(0, 44);
00151       case 91:
00152          return jjStopAtPos(0, 34);
00153       case 93:
00154          return jjStopAtPos(0, 35);
00155       case 94:
00156          return jjStopAtPos(0, 59);
00157       case 97:
00158          return jjMoveStringLiteralDfa1_0(0x200L);
00159       case 101:
00160          return jjMoveStringLiteralDfa1_0(0x100000L);
00161       case 102:
00162          return jjMoveStringLiteralDfa1_0(0x204000L);
00163       case 105:
00164          return jjMoveStringLiteralDfa1_0(0x60000L);
00165       case 108:
00166          return jjMoveStringLiteralDfa1_0(0x9000L);
00167       case 110:
00168          return jjMoveStringLiteralDfa1_0(0x800L);
00169       case 111:
00170          return jjMoveStringLiteralDfa1_0(0x400L);
00171       case 116:
00172          return jjMoveStringLiteralDfa1_0(0x82000L);
00173       case 118:
00174          return jjMoveStringLiteralDfa1_0(0x10000L);
00175       case 123:
00176          return jjStopAtPos(0, 32);
00177       case 124:
00178          jjmatchedKind = 58;
00179          return jjMoveStringLiteralDfa1_0(0x4000000000000L);
00180       case 125:
00181          return jjStopAtPos(0, 33);
00182       case 126:
00183          return jjStopAtPos(0, 43);
00184       default :
00185          return jjMoveNfa_0(0, 0);
00186    }
00187 }
00188 static private final int jjMoveStringLiteralDfa1_0(long active0)
00189 {
00190    try { curChar = input_stream.readChar(); }
00191    catch(java.io.IOException e) {
00192       jjStopStringLiteralDfa_0(0, active0);
00193       return 1;
00194    }
00195    switch(curChar)
00196    {
00197       case 38:
00198          if ((active0 & 0x8000000000000L) != 0L)
00199             return jjStopAtPos(1, 51);
00200          break;
00201       case 43:
00202          if ((active0 & 0x10000000000000L) != 0L)
00203             return jjStopAtPos(1, 52);
00204          break;
00205       case 61:
00206          if ((active0 & 0x400000000000L) != 0L)
00207             return jjStopAtPos(1, 46);
00208          else if ((active0 & 0x800000000000L) != 0L)
00209             return jjStopAtPos(1, 47);
00210          else if ((active0 & 0x1000000000000L) != 0L)
00211             return jjStopAtPos(1, 48);
00212          else if ((active0 & 0x2000000000000L) != 0L)
00213             return jjStopAtPos(1, 49);
00214          break;
00215       case 97:
00216          return jjMoveStringLiteralDfa2_0(active0, 0x14000L);
00217       case 101:
00218          return jjMoveStringLiteralDfa2_0(active0, 0x9000L);
00219       case 102:
00220          if ((active0 & 0x40000L) != 0L)
00221             return jjStartNfaWithStates_0(1, 18, 13);
00222          break;
00223       case 104:
00224          return jjMoveStringLiteralDfa2_0(active0, 0x80000L);
00225       case 108:
00226          return jjMoveStringLiteralDfa2_0(active0, 0x100000L);
00227       case 110:
00228          if ((active0 & 0x20000L) != 0L)
00229             return jjStartNfaWithStates_0(1, 17, 13);
00230          return jjMoveStringLiteralDfa2_0(active0, 0x200L);
00231       case 111:
00232          return jjMoveStringLiteralDfa2_0(active0, 0x800L);
00233       case 114:
00234          if ((active0 & 0x400L) != 0L)
00235             return jjStartNfaWithStates_0(1, 10, 13);
00236          return jjMoveStringLiteralDfa2_0(active0, 0x2000L);
00237       case 117:
00238          return jjMoveStringLiteralDfa2_0(active0, 0x200000L);
00239       case 124:
00240          if ((active0 & 0x4000000000000L) != 0L)
00241             return jjStopAtPos(1, 50);
00242          break;
00243       default :
00244          break;
00245    }
00246    return jjStartNfa_0(0, active0);
00247 }
00248 static private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
00249 {
00250    if (((active0 &= old0)) == 0L)
00251       return jjStartNfa_0(0, old0); 
00252    try { curChar = input_stream.readChar(); }
00253    catch(java.io.IOException e) {
00254       jjStopStringLiteralDfa_0(1, active0);
00255       return 2;
00256    }
00257    switch(curChar)
00258    {
00259       case 100:
00260          if ((active0 & 0x200L) != 0L)
00261             return jjStartNfaWithStates_0(2, 9, 13);
00262          break;
00263       case 101:
00264          return jjMoveStringLiteralDfa3_0(active0, 0x80000L);
00265       case 108:
00266          return jjMoveStringLiteralDfa3_0(active0, 0x4000L);
00267       case 110:
00268          if ((active0 & 0x200000L) != 0L)
00269             return jjStartNfaWithStates_0(2, 21, 13);
00270          return jjMoveStringLiteralDfa3_0(active0, 0x1000L);
00271       case 114:
00272          if ((active0 & 0x10000L) != 0L)
00273             return jjStartNfaWithStates_0(2, 16, 13);
00274          break;
00275       case 115:
00276          return jjMoveStringLiteralDfa3_0(active0, 0x100000L);
00277       case 116:
00278          if ((active0 & 0x800L) != 0L)
00279             return jjStartNfaWithStates_0(2, 11, 13);
00280          else if ((active0 & 0x8000L) != 0L)
00281             return jjStartNfaWithStates_0(2, 15, 13);
00282          break;
00283       case 117:
00284          return jjMoveStringLiteralDfa3_0(active0, 0x2000L);
00285       default :
00286          break;
00287    }
00288    return jjStartNfa_0(1, active0);
00289 }
00290 static private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
00291 {
00292    if (((active0 &= old0)) == 0L)
00293       return jjStartNfa_0(1, old0); 
00294    try { curChar = input_stream.readChar(); }
00295    catch(java.io.IOException e) {
00296       jjStopStringLiteralDfa_0(2, active0);
00297       return 3;
00298    }
00299    switch(curChar)
00300    {
00301       case 101:
00302          if ((active0 & 0x2000L) != 0L)
00303             return jjStartNfaWithStates_0(3, 13, 13);
00304          else if ((active0 & 0x100000L) != 0L)
00305             return jjStartNfaWithStates_0(3, 20, 13);
00306          break;
00307       case 103:
00308          return jjMoveStringLiteralDfa4_0(active0, 0x1000L);
00309       case 110:
00310          if ((active0 & 0x80000L) != 0L)
00311             return jjStartNfaWithStates_0(3, 19, 13);
00312          break;
00313       case 115:
00314          return jjMoveStringLiteralDfa4_0(active0, 0x4000L);
00315       default :
00316          break;
00317    }
00318    return jjStartNfa_0(2, active0);
00319 }
00320 static private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
00321 {
00322    if (((active0 &= old0)) == 0L)
00323       return jjStartNfa_0(2, old0); 
00324    try { curChar = input_stream.readChar(); }
00325    catch(java.io.IOException e) {
00326       jjStopStringLiteralDfa_0(3, active0);
00327       return 4;
00328    }
00329    switch(curChar)
00330    {
00331       case 101:
00332          if ((active0 & 0x4000L) != 0L)
00333             return jjStartNfaWithStates_0(4, 14, 13);
00334          break;
00335       case 116:
00336          return jjMoveStringLiteralDfa5_0(active0, 0x1000L);
00337       default :
00338          break;
00339    }
00340    return jjStartNfa_0(3, active0);
00341 }
00342 static private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
00343 {
00344    if (((active0 &= old0)) == 0L)
00345       return jjStartNfa_0(3, old0); 
00346    try { curChar = input_stream.readChar(); }
00347    catch(java.io.IOException e) {
00348       jjStopStringLiteralDfa_0(4, active0);
00349       return 5;
00350    }
00351    switch(curChar)
00352    {
00353       case 104:
00354          if ((active0 & 0x1000L) != 0L)
00355             return jjStartNfaWithStates_0(5, 12, 13);
00356          break;
00357       default :
00358          break;
00359    }
00360    return jjStartNfa_0(4, active0);
00361 }
00362 static private final void jjCheckNAdd(int state)
00363 {
00364    if (jjrounds[state] != jjround)
00365    {
00366       jjstateSet[jjnewStateCnt++] = state;
00367       jjrounds[state] = jjround;
00368    }
00369 }
00370 static private final void jjAddStates(int start, int end)
00371 {
00372    do {
00373       jjstateSet[jjnewStateCnt++] = jjnextStates[start];
00374    } while (start++ != end);
00375 }
00376 static private final void jjCheckNAddTwoStates(int state1, int state2)
00377 {
00378    jjCheckNAdd(state1);
00379    jjCheckNAdd(state2);
00380 }
00381 static private final void jjCheckNAddStates(int start, int end)
00382 {
00383    do {
00384       jjCheckNAdd(jjnextStates[start]);
00385    } while (start++ != end);
00386 }
00387 static private final void jjCheckNAddStates(int start)
00388 {
00389    jjCheckNAdd(jjnextStates[start]);
00390    jjCheckNAdd(jjnextStates[start + 1]);
00391 }
00392 static final long[] jjbitVec0 = {
00393    0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
00394 };
00395 static final long[] jjbitVec2 = {
00396    0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
00397 };
00398 static final long[] jjbitVec3 = {
00399    0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L
00400 };
00401 static final long[] jjbitVec4 = {
00402    0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL
00403 };
00404 static final long[] jjbitVec5 = {
00405    0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
00406 };
00407 static final long[] jjbitVec6 = {
00408    0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L
00409 };
00410 static final long[] jjbitVec7 = {
00411    0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L
00412 };
00413 static final long[] jjbitVec8 = {
00414    0x3fffffffffffL, 0x0L, 0x0L, 0x0L
00415 };
00416 static private final int jjMoveNfa_0(int startState, int curPos)
00417 {
00418    int[] nextStates;
00419    int startsAt = 0;
00420    jjnewStateCnt = 37;
00421    int i = 1;
00422    jjstateSet[0] = startState;
00423    int j, kind = 0x7fffffff;
00424    for (;;)
00425    {
00426       if (++jjround == 0x7fffffff)
00427          ReInitRounds();
00428       if (curChar < 64)
00429       {
00430          long l = 1L << curChar;
00431          MatchLoop: do
00432          {
00433             switch(jjstateSet[--i])
00434             {
00435                case 19:
00436                   if (curChar == 42)
00437                      jjCheckNAddTwoStates(32, 33);
00438                   else if (curChar == 47)
00439                      jjCheckNAddStates(0, 2);
00440                   if (curChar == 42)
00441                      jjstateSet[jjnewStateCnt++] = 24;
00442                   break;
00443                case 0:
00444                   if ((0x3fe000000000000L & l) != 0L)
00445                   {
00446                      if (kind > 22)
00447                         kind = 22;
00448                      jjCheckNAddTwoStates(1, 2);
00449                   }
00450                   else if (curChar == 47)
00451                      jjAddStates(3, 5);
00452                   else if (curChar == 48)
00453                   {
00454                      if (kind > 22)
00455                         kind = 22;
00456                      jjCheckNAddStates(6, 8);
00457                   }
00458                   else if (curChar == 36)
00459                   {
00460                      if (kind > 27)
00461                         kind = 27;
00462                      jjCheckNAdd(13);
00463                   }
00464                   else if (curChar == 34)
00465                      jjCheckNAddStates(9, 11);
00466                   break;
00467                case 1:
00468                   if ((0x3ff000000000000L & l) == 0L)
00469                      break;
00470                   if (kind > 22)
00471                      kind = 22;
00472                   jjCheckNAddTwoStates(1, 2);
00473                   break;
00474                case 3:
00475                   if (curChar == 34)
00476                      jjCheckNAddStates(9, 11);
00477                   break;
00478                case 4:
00479                   if ((0xfffffffbffffdbffL & l) != 0L)
00480                      jjCheckNAddStates(9, 11);
00481                   break;
00482                case 6:
00483                   if ((0x8400000000L & l) != 0L)
00484                      jjCheckNAddStates(9, 11);
00485                   break;
00486                case 7:
00487                   if (curChar == 34 && kind > 26)
00488                      kind = 26;
00489                   break;
00490                case 8:
00491                   if ((0xff000000000000L & l) != 0L)
00492                      jjCheckNAddStates(12, 15);
00493                   break;
00494                case 9:
00495                   if ((0xff000000000000L & l) != 0L)
00496                      jjCheckNAddStates(9, 11);
00497                   break;
00498                case 10:
00499                   if ((0xf000000000000L & l) != 0L)
00500                      jjstateSet[jjnewStateCnt++] = 11;
00501                   break;
00502                case 11:
00503                   if ((0xff000000000000L & l) != 0L)
00504                      jjCheckNAdd(9);
00505                   break;
00506                case 12:
00507                   if (curChar != 36)
00508                      break;
00509                   if (kind > 27)
00510                      kind = 27;
00511                   jjCheckNAdd(13);
00512                   break;
00513                case 13:
00514                   if ((0x3ff001000000000L & l) == 0L)
00515                      break;
00516                   if (kind > 27)
00517                      kind = 27;
00518                   jjCheckNAdd(13);
00519                   break;
00520                case 14:
00521                   if (curChar != 48)
00522                      break;
00523                   if (kind > 22)
00524                      kind = 22;
00525                   jjCheckNAddStates(6, 8);
00526                   break;
00527                case 16:
00528                   if ((0x3ff000000000000L & l) == 0L)
00529                      break;
00530                   if (kind > 22)
00531                      kind = 22;
00532                   jjCheckNAddTwoStates(16, 2);
00533                   break;
00534                case 17:
00535                   if ((0xff000000000000L & l) == 0L)
00536                      break;
00537                   if (kind > 22)
00538                      kind = 22;
00539                   jjCheckNAddTwoStates(17, 2);
00540                   break;
00541                case 18:
00542                   if (curChar == 47)
00543                      jjAddStates(3, 5);
00544                   break;
00545                case 20:
00546                   if ((0xffffffffffffdbffL & l) != 0L)
00547                      jjCheckNAddStates(0, 2);
00548                   break;
00549                case 21:
00550                   if ((0x2400L & l) != 0L && kind > 6)
00551                      kind = 6;
00552                   break;
00553                case 22:
00554                   if (curChar == 10 && kind > 6)
00555                      kind = 6;
00556                   break;
00557                case 23:
00558                   if (curChar == 13)
00559                      jjstateSet[jjnewStateCnt++] = 22;
00560                   break;
00561                case 24:
00562                   if (curChar == 42)
00563                      jjCheckNAddTwoStates(25, 26);
00564                   break;
00565                case 25:
00566                   if ((0xfffffbffffffffffL & l) != 0L)
00567                      jjCheckNAddTwoStates(25, 26);
00568                   break;
00569                case 26:
00570                   if (curChar == 42)
00571                      jjCheckNAddStates(16, 18);
00572                   break;
00573                case 27:
00574                   if ((0xffff7bffffffffffL & l) != 0L)
00575                      jjCheckNAddTwoStates(28, 26);
00576                   break;
00577                case 28:
00578                   if ((0xfffffbffffffffffL & l) != 0L)
00579                      jjCheckNAddTwoStates(28, 26);
00580                   break;
00581                case 29:
00582                   if (curChar == 47 && kind > 7)
00583                      kind = 7;
00584                   break;
00585                case 30:
00586                   if (curChar == 42)
00587                      jjstateSet[jjnewStateCnt++] = 24;
00588                   break;
00589                case 31:
00590                   if (curChar == 42)
00591                      jjCheckNAddTwoStates(32, 33);
00592                   break;
00593                case 32:
00594                   if ((0xfffffbffffffffffL & l) != 0L)
00595                      jjCheckNAddTwoStates(32, 33);
00596                   break;
00597                case 33:
00598                   if (curChar == 42)
00599                      jjCheckNAddStates(19, 21);
00600                   break;
00601                case 34:
00602                   if ((0xffff7bffffffffffL & l) != 0L)
00603                      jjCheckNAddTwoStates(35, 33);
00604                   break;
00605                case 35:
00606                   if ((0xfffffbffffffffffL & l) != 0L)
00607                      jjCheckNAddTwoStates(35, 33);
00608                   break;
00609                case 36:
00610                   if (curChar == 47 && kind > 8)
00611                      kind = 8;
00612                   break;
00613                default : break;
00614             }
00615          } while(i != startsAt);
00616       }
00617       else if (curChar < 128)
00618       {
00619          long l = 1L << (curChar & 077);
00620          MatchLoop: do
00621          {
00622             switch(jjstateSet[--i])
00623             {
00624                case 0:
00625                case 13:
00626                   if ((0x7fffffe87fffffeL & l) == 0L)
00627                      break;
00628                   if (kind > 27)
00629                      kind = 27;
00630                   jjCheckNAdd(13);
00631                   break;
00632                case 2:
00633                   if ((0x100000001000L & l) != 0L && kind > 22)
00634                      kind = 22;
00635                   break;
00636                case 4:
00637                   if ((0xffffffffefffffffL & l) != 0L)
00638                      jjCheckNAddStates(9, 11);
00639                   break;
00640                case 5:
00641                   if (curChar == 92)
00642                      jjAddStates(22, 24);
00643                   break;
00644                case 6:
00645                   if ((0x14404410000000L & l) != 0L)
00646                      jjCheckNAddStates(9, 11);
00647                   break;
00648                case 15:
00649                   if ((0x100000001000000L & l) != 0L)
00650                      jjCheckNAdd(16);
00651                   break;
00652                case 16:
00653                   if ((0x7e0000007eL & l) == 0L)
00654                      break;
00655                   if (kind > 22)
00656                      kind = 22;
00657                   jjCheckNAddTwoStates(16, 2);
00658                   break;
00659                case 20:
00660                   jjAddStates(0, 2);
00661                   break;
00662                case 25:
00663                   jjCheckNAddTwoStates(25, 26);
00664                   break;
00665                case 27:
00666                case 28:
00667                   jjCheckNAddTwoStates(28, 26);
00668                   break;
00669                case 32:
00670                   jjCheckNAddTwoStates(32, 33);
00671                   break;
00672                case 34:
00673                case 35:
00674                   jjCheckNAddTwoStates(35, 33);
00675                   break;
00676                default : break;
00677             }
00678          } while(i != startsAt);
00679       }
00680       else
00681       {
00682          int hiByte = (int)(curChar >> 8);
00683          int i1 = hiByte >> 6;
00684          long l1 = 1L << (hiByte & 077);
00685          int i2 = (curChar & 0xff) >> 6;
00686          long l2 = 1L << (curChar & 077);
00687          MatchLoop: do
00688          {
00689             switch(jjstateSet[--i])
00690             {
00691                case 0:
00692                case 13:
00693                   if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
00694                      break;
00695                   if (kind > 27)
00696                      kind = 27;
00697                   jjCheckNAdd(13);
00698                   break;
00699                case 4:
00700                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00701                      jjAddStates(9, 11);
00702                   break;
00703                case 20:
00704                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00705                      jjAddStates(0, 2);
00706                   break;
00707                case 25:
00708                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00709                      jjCheckNAddTwoStates(25, 26);
00710                   break;
00711                case 27:
00712                case 28:
00713                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00714                      jjCheckNAddTwoStates(28, 26);
00715                   break;
00716                case 32:
00717                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00718                      jjCheckNAddTwoStates(32, 33);
00719                   break;
00720                case 34:
00721                case 35:
00722                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00723                      jjCheckNAddTwoStates(35, 33);
00724                   break;
00725                default : break;
00726             }
00727          } while(i != startsAt);
00728       }
00729       if (kind != 0x7fffffff)
00730       {
00731          jjmatchedKind = kind;
00732          jjmatchedPos = curPos;
00733          kind = 0x7fffffff;
00734       }
00735       ++curPos;
00736       if ((i = jjnewStateCnt) == (startsAt = 37 - (jjnewStateCnt = startsAt)))
00737          return curPos;
00738       try { curChar = input_stream.readChar(); }
00739       catch(java.io.IOException e) { return curPos; }
00740    }
00741 }
00742 static final int[] jjnextStates = {
00743    20, 21, 23, 19, 30, 31, 15, 17, 2, 4, 5, 7, 4, 5, 9, 7, 
00744    26, 27, 29, 33, 34, 36, 6, 8, 10, 
00745 };
00746 private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
00747 {
00748    switch(hiByte)
00749    {
00750       case 0:
00751          return ((jjbitVec2[i2] & l2) != 0L);
00752       default : 
00753          if ((jjbitVec0[i1] & l1) != 0L)
00754             return true;
00755          return false;
00756    }
00757 }
00758 private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
00759 {
00760    switch(hiByte)
00761    {
00762       case 0:
00763          return ((jjbitVec4[i2] & l2) != 0L);
00764       case 48:
00765          return ((jjbitVec5[i2] & l2) != 0L);
00766       case 49:
00767          return ((jjbitVec6[i2] & l2) != 0L);
00768       case 51:
00769          return ((jjbitVec7[i2] & l2) != 0L);
00770       case 61:
00771          return ((jjbitVec8[i2] & l2) != 0L);
00772       default : 
00773          if ((jjbitVec3[i1] & l1) != 0L)
00774             return true;
00775          return false;
00776    }
00777 }
00778 public static final String[] jjstrLiteralImages = {
00779 "", null, null, null, null, null, null, null, null, "\141\156\144", 
00780 "\157\162", "\156\157\164", "\154\145\156\147\164\150", "\164\162\165\145", 
00781 "\146\141\154\163\145", "\154\145\164", "\166\141\162", "\151\156", "\151\146", "\164\150\145\156", 
00782 "\145\154\163\145", "\146\165\156", null, null, null, null, null, null, null, null, "\50", "\51", 
00783 "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\75", "\76", "\74", "\41", 
00784 "\176", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174", "\46\46", 
00785 "\53\53", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45", };
00786 public static final String[] lexStateNames = {
00787    "DEFAULT", 
00788 };
00789 static final long[] jjtoToken = {
00790    0x1fffffffcc7ffe01L, 
00791 };
00792 static final long[] jjtoSkip = {
00793    0x1feL, 
00794 };
00795 static final long[] jjtoSpecial = {
00796    0x1c0L, 
00797 };
00798 static protected JavaCharStream input_stream;
00799 static private final int[] jjrounds = new int[37];
00800 static private final int[] jjstateSet = new int[74];
00801 static protected char curChar;
00802 public Func1ParserTokenManager(JavaCharStream stream){
00803    if (input_stream != null)
00804       throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);
00805    input_stream = stream;
00806 }
00807 public Func1ParserTokenManager(JavaCharStream stream, int lexState){
00808    this(stream);
00809    SwitchTo(lexState);
00810 }
00811 static public void ReInit(JavaCharStream stream)
00812 {
00813    jjmatchedPos = jjnewStateCnt = 0;
00814    curLexState = defaultLexState;
00815    input_stream = stream;
00816    ReInitRounds();
00817 }
00818 static private final void ReInitRounds()
00819 {
00820    int i;
00821    jjround = 0x80000001;
00822    for (i = 37; i-- > 0;)
00823       jjrounds[i] = 0x80000000;
00824 }
00825 static public void ReInit(JavaCharStream stream, int lexState)
00826 {
00827    ReInit(stream);
00828    SwitchTo(lexState);
00829 }
00830 static public void SwitchTo(int lexState)
00831 {
00832    if (lexState >= 1 || lexState < 0)
00833       throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
00834    else
00835       curLexState = lexState;
00836 }
00837 
00838 static protected Token jjFillToken()
00839 {
00840    Token t = Token.newToken(jjmatchedKind);
00841    t.kind = jjmatchedKind;
00842    String im = jjstrLiteralImages[jjmatchedKind];
00843    t.image = (im == null) ? input_stream.GetImage() : im;
00844    t.beginLine = input_stream.getBeginLine();
00845    t.beginColumn = input_stream.getBeginColumn();
00846    t.endLine = input_stream.getEndLine();
00847    t.endColumn = input_stream.getEndColumn();
00848    return t;
00849 }
00850 
00851 static int curLexState = 0;
00852 static int defaultLexState = 0;
00853 static int jjnewStateCnt;
00854 static int jjround;
00855 static int jjmatchedPos;
00856 static int jjmatchedKind;
00857 
00858 public static Token getNextToken() 
00859 {
00860   int kind;
00861   Token specialToken = null;
00862   Token matchedToken;
00863   int curPos = 0;
00864 
00865   EOFLoop :
00866   for (;;)
00867   {   
00868    try   
00869    {     
00870       curChar = input_stream.BeginToken();
00871    }     
00872    catch(java.io.IOException e)
00873    {        
00874       jjmatchedKind = 0;
00875       matchedToken = jjFillToken();
00876       matchedToken.specialToken = specialToken;
00877       return matchedToken;
00878    }
00879 
00880    try { input_stream.backup(0);
00881       while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
00882          curChar = input_stream.BeginToken();
00883    }
00884    catch (java.io.IOException e1) { continue EOFLoop; }
00885    jjmatchedKind = 0x7fffffff;
00886    jjmatchedPos = 0;
00887    curPos = jjMoveStringLiteralDfa0_0();
00888    if (jjmatchedKind != 0x7fffffff)
00889    {
00890       if (jjmatchedPos + 1 < curPos)
00891          input_stream.backup(curPos - jjmatchedPos - 1);
00892       if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
00893       {
00894          matchedToken = jjFillToken();
00895          matchedToken.specialToken = specialToken;
00896          return matchedToken;
00897       }
00898       else
00899       {
00900          if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
00901          {
00902             matchedToken = jjFillToken();
00903             if (specialToken == null)
00904                specialToken = matchedToken;
00905             else
00906             {
00907                matchedToken.specialToken = specialToken;
00908                specialToken = (specialToken.next = matchedToken);
00909             }
00910          }
00911          continue EOFLoop;
00912       }
00913    }
00914    int error_line = input_stream.getEndLine();
00915    int error_column = input_stream.getEndColumn();
00916    String error_after = null;
00917    boolean EOFSeen = false;
00918    try { input_stream.readChar(); input_stream.backup(1); }
00919    catch (java.io.IOException e1) {
00920       EOFSeen = true;
00921       error_after = curPos <= 1 ? "" : input_stream.GetImage();
00922       if (curChar == '\n' || curChar == '\r') {
00923          error_line++;
00924          error_column = 0;
00925       }
00926       else
00927          error_column++;
00928    }
00929    if (!EOFSeen) {
00930       input_stream.backup(1);
00931       error_after = curPos <= 1 ? "" : input_stream.GetImage();
00932    }
00933    throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
00934   }
00935 }
00936 
00937 }

Generated on Tue Sep 12 21:52:03 2006 for PLP by  doxygen 1.4.7