SelectorParserTokenManager xref

View Javadoc

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