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