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

This page was automatically generated by Maven