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