1 2 package org.josql.parser; 3 import java.util.ArrayList ; 4 import java.util.List ; 5 import java.util.Map ; 6 import java.util.HashMap ; 7 import org.josql.Query; 8 import org.josql.internal.OrderBy; 9 import org.josql.internal.Limit; 10 import org.josql.internal.Utilities; 11 import org.josql.internal.ColumnReference; 12 import org.josql.expressions.*; 13 14 public class JoSQLParserTokenManager implements JoSQLParserConstants 15 { 16 public java.io.PrintStream debugStream = System.out; 17 public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } 18 private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) 19 { 20 switch (pos) 21 { 22 case 0: 23 if ((active0 & 0x2000000000L) != 0L || (active1 & 0x100L) != 0L) 24 return 12; 25 if ((active1 & 0x200L) != 0L) 26 return 25; 27 if ((active0 & 0x10000000000000L) != 0L) 28 return 8; 29 if ((active0 & 0x1fffffffe0L) != 0L) 30 { 31 jjmatchedKind = 38; 32 return 33; 33 } 34 return -1; 35 case 1: 36 if ((active0 & 0x1fff7bb800L) != 0L) 37 { 38 if (jjmatchedPos != 1) 39 { 40 jjmatchedKind = 38; 41 jjmatchedPos = 1; 42 } 43 return 33; 44 } 45 if ((active0 & 0x8447e0L) != 0L) 46 return 33; 47 return -1; 48 case 2: 49 if ((active0 & 0x1010007800L) != 0L) 50 return 33; 51 if ((active0 & 0xfefff8000L) != 0L) 52 { 53 jjmatchedKind = 38; 54 jjmatchedPos = 2; 55 return 33; 56 } 57 return -1; 58 case 3: 59 if ((active0 & 0xfcff40000L) != 0L) 60 { 61 jjmatchedKind = 38; 62 jjmatchedPos = 3; 63 return 33; 64 } 65 if ((active0 & 0x200b8000L) != 0L) 66 return 33; 67 return -1; 68 case 4: 69 if ((active0 & 0xa40f00000L) != 0L) 70 return 33; 71 if ((active0 & 0x58f040000L) != 0L) 72 { 73 if (jjmatchedPos != 4) 74 { 75 jjmatchedKind = 38; 76 jjmatchedPos = 4; 77 } 78 return 33; 79 } 80 return -1; 81 case 5: 82 if ((active0 & 0xa00000000L) != 0L) 83 { 84 if (jjmatchedPos != 5) 85 { 86 jjmatchedKind = 38; 87 jjmatchedPos = 5; 88 } 89 return 1; 90 } 91 if ((active0 & 0x403040000L) != 0L) 92 return 33; 93 if ((active0 & 0x18c000000L) != 0L) 94 { 95 if (jjmatchedPos != 5) 96 { 97 jjmatchedKind = 38; 98 jjmatchedPos = 5; 99 } 100 return 33; 101 } 102 return -1; 103 case 6: 104 if ((active0 & 0x8000000L) != 0L) 105 { 106 jjmatchedKind = 38; 107 jjmatchedPos = 6; 108 return 33; 109 } 110 if ((active0 & 0xe00000000L) != 0L) 111 { 112 jjmatchedKind = 38; 113 jjmatchedPos = 6; 114 return 1; 115 } 116 if ((active0 & 0x184000000L) != 0L) 117 return 33; 118 return -1; 119 case 7: 120 if ((active0 & 0x8000000L) != 0L) 121 return 33; 122 if ((active0 & 0xe00000000L) != 0L) 123 { 124 jjmatchedKind = 38; 125 jjmatchedPos = 7; 126 return 1; 127 } 128 return -1; 129 case 8: 130 if ((active0 & 0xe00000000L) != 0L) 131 { 132 jjmatchedKind = 38; 133 jjmatchedPos = 8; 134 return 1; 135 } 136 return -1; 137 case 9: 138 if ((active0 & 0xe00000000L) != 0L) 139 { 140 jjmatchedKind = 38; 141 jjmatchedPos = 9; 142 return 1; 143 } 144 return -1; 145 case 10: 146 if ((active0 & 0xe00000000L) != 0L) 147 { 148 jjmatchedKind = 38; 149 jjmatchedPos = 10; 150 return 1; 151 } 152 return -1; 153 case 11: 154 if ((active0 & 0xe00000000L) != 0L) 155 { 156 jjmatchedKind = 38; 157 jjmatchedPos = 11; 158 return 1; 159 } 160 return -1; 161 case 12: 162 if ((active0 & 0x200000000L) != 0L) 163 return 1; 164 if ((active0 & 0xc00000000L) != 0L) 165 { 166 jjmatchedKind = 38; 167 jjmatchedPos = 12; 168 return 1; 169 } 170 return -1; 171 case 13: 172 if ((active0 & 0x400000000L) != 0L) 173 return 1; 174 if ((active0 & 0x800000000L) != 0L) 175 { 176 jjmatchedKind = 38; 177 jjmatchedPos = 13; 178 return 1; 179 } 180 return -1; 181 case 14: 182 if ((active0 & 0x800000000L) != 0L) 183 { 184 jjmatchedKind = 38; 185 jjmatchedPos = 14; 186 return 1; 187 } 188 return -1; 189 default : 190 return -1; 191 } 192 } 193 private final int jjStartNfa_0(int pos, long active0, long active1) 194 { 195 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); 196 } 197 private final int jjStopAtPos(int pos, int kind) 198 { 199 jjmatchedKind = kind; 200 jjmatchedPos = pos; 201 return pos + 1; 202 } 203 private final int jjStartNfaWithStates_0(int pos, int kind, int state) 204 { 205 jjmatchedKind = kind; 206 jjmatchedPos = pos; 207 try { curChar = input_stream.readChar(); } 208 catch(java.io.IOException e) { return pos + 1; } 209 return jjMoveNfa_0(state, pos + 1); 210 } 211 private final int jjMoveStringLiteralDfa0_0() 212 { 213 switch(curChar) 214 { 215 case 33: 216 return jjMoveStringLiteralDfa1_0(0x0L, 0x40L); 217 case 36: 218 return jjStopAtPos(0, 63); 219 case 37: 220 return jjStopAtPos(0, 74); 221 case 40: 222 return jjStopAtPos(0, 59); 223 case 41: 224 return jjStopAtPos(0, 60); 225 case 42: 226 return jjStopAtPos(0, 56); 227 case 43: 228 return jjStopAtPos(0, 71); 229 case 44: 230 return jjStopAtPos(0, 55); 231 case 45: 232 jjmatchedKind = 72; 233 return jjMoveStringLiteralDfa1_0(0x2000000000L, 0x0L); 234 case 46: 235 return jjStartNfaWithStates_0(0, 52, 8); 236 case 47: 237 return jjStartNfaWithStates_0(0, 73, 25); 238 case 58: 239 jjmatchedKind = 49; 240 return jjMoveStringLiteralDfa1_0(0x4000000000000L, 0x0L); 241 case 59: 242 return jjStopAtPos(0, 54); 243 case 60: 244 jjmatchedKind = 65; 245 return jjMoveStringLiteralDfa1_0(0x0L, 0x30L); 246 case 61: 247 return jjStopAtPos(0, 66); 248 case 62: 249 jjmatchedKind = 64; 250 return jjMoveStringLiteralDfa1_0(0x0L, 0x8L); 251 case 63: 252 return jjStopAtPos(0, 51); 253 case 64: 254 return jjStopAtPos(0, 53); 255 case 91: 256 return jjStopAtPos(0, 57); 257 case 93: 258 return jjStopAtPos(0, 58); 259 case 65: 260 case 97: 261 return jjMoveStringLiteralDfa1_0(0x5820L, 0x0L); 262 case 66: 263 case 98: 264 return jjMoveStringLiteralDfa1_0(0x4000040L, 0x0L); 265 case 68: 266 case 100: 267 return jjMoveStringLiteralDfa1_0(0x8008000L, 0x0L); 268 case 69: 269 case 101: 270 return jjMoveStringLiteralDfa1_0(0x80000000L, 0x0L); 271 case 70: 272 case 102: 273 return jjMoveStringLiteralDfa1_0(0x40080000L, 0x0L); 274 case 71: 275 case 103: 276 return jjMoveStringLiteralDfa1_0(0x800200000L, 0x0L); 277 case 72: 278 case 104: 279 return jjMoveStringLiteralDfa1_0(0x402000000L, 0x0L); 280 case 73: 281 case 105: 282 return jjMoveStringLiteralDfa1_0(0x40180L, 0x0L); 283 case 76: 284 case 108: 285 return jjMoveStringLiteralDfa1_0(0x420000L, 0x0L); 286 case 78: 287 case 110: 288 return jjMoveStringLiteralDfa1_0(0x1000012000L, 0x0L); 289 case 79: 290 case 111: 291 return jjMoveStringLiteralDfa1_0(0x800600L, 0x0L); 292 case 82: 293 case 114: 294 return jjMoveStringLiteralDfa1_0(0x100000000L, 0x0L); 295 case 83: 296 case 115: 297 return jjMoveStringLiteralDfa1_0(0x1000000L, 0x0L); 298 case 84: 299 case 116: 300 return jjMoveStringLiteralDfa1_0(0x20000000L, 0x0L); 301 case 85: 302 case 117: 303 return jjMoveStringLiteralDfa1_0(0x10000000L, 0x0L); 304 case 87: 305 case 119: 306 return jjMoveStringLiteralDfa1_0(0x200100000L, 0x0L); 307 case 123: 308 return jjStopAtPos(0, 61); 309 case 125: 310 return jjStopAtPos(0, 62); 311 default : 312 return jjMoveNfa_0(2, 0); 313 } 314 } 315 private final int jjMoveStringLiteralDfa1_0(long active0, long active1) 316 { 317 try { curChar = input_stream.readChar(); } 318 catch(java.io.IOException e) { 319 jjStopStringLiteralDfa_0(0, active0, active1); 320 return 1; 321 } 322 switch(curChar) 323 { 324 case 61: 325 if ((active1 & 0x8L) != 0L) 326 return jjStopAtPos(1, 67); 327 else if ((active1 & 0x10L) != 0L) 328 return jjStopAtPos(1, 68); 329 else if ((active1 & 0x40L) != 0L) 330 return jjStopAtPos(1, 70); 331 break; 332 case 62: 333 if ((active0 & 0x2000000000L) != 0L) 334 return jjStopAtPos(1, 37); 335 else if ((active1 & 0x20L) != 0L) 336 return jjStopAtPos(1, 69); 337 break; 338 case 95: 339 if ((active0 & 0x4000000000000L) != 0L) 340 return jjStopAtPos(1, 50); 341 break; 342 case 65: 343 case 97: 344 return jjMoveStringLiteralDfa2_0(active0, 0x442000000L, active1, 0L); 345 case 69: 346 case 101: 347 return jjMoveStringLiteralDfa2_0(active0, 0x1105008000L, active1, 0L); 348 case 72: 349 case 104: 350 return jjMoveStringLiteralDfa2_0(active0, 0x200100000L, active1, 0L); 351 case 73: 352 case 105: 353 return jjMoveStringLiteralDfa2_0(active0, 0x8420000L, active1, 0L); 354 case 76: 355 case 108: 356 return jjMoveStringLiteralDfa2_0(active0, 0x800L, active1, 0L); 357 case 78: 358 case 110: 359 if ((active0 & 0x100L) != 0L) 360 { 361 jjmatchedKind = 8; 362 jjmatchedPos = 1; 363 } 364 else if ((active0 & 0x400L) != 0L) 365 return jjStartNfaWithStates_0(1, 10, 33); 366 return jjMoveStringLiteralDfa2_0(active0, 0x41000L, active1, 0L); 367 case 79: 368 case 111: 369 return jjMoveStringLiteralDfa2_0(active0, 0x2000L, active1, 0L); 370 case 82: 371 case 114: 372 if ((active0 & 0x200L) != 0L) 373 { 374 jjmatchedKind = 9; 375 jjmatchedPos = 1; 376 } 377 return jjMoveStringLiteralDfa2_0(active0, 0x820a80000L, active1, 0L); 378 case 83: 379 case 115: 380 if ((active0 & 0x20L) != 0L) 381 { 382 jjmatchedKind = 5; 383 jjmatchedPos = 1; 384 } 385 else if ((active0 & 0x80L) != 0L) 386 return jjStartNfaWithStates_0(1, 7, 33); 387 return jjMoveStringLiteralDfa2_0(active0, 0x10004000L, active1, 0L); 388 case 85: 389 case 117: 390 return jjMoveStringLiteralDfa2_0(active0, 0x10000L, active1, 0L); 391 case 88: 392 case 120: 393 return jjMoveStringLiteralDfa2_0(active0, 0x80000000L, active1, 0L); 394 case 89: 395 case 121: 396 if ((active0 & 0x40L) != 0L) 397 return jjStartNfaWithStates_0(1, 6, 33); 398 break; 399 default : 400 break; 401 } 402 return jjStartNfa_0(0, active0, active1); 403 } 404 private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) 405 { 406 if (((active0 &= old0) | (active1 &= old1)) == 0L) 407 return jjStartNfa_0(0, old0, old1); 408 try { curChar = input_stream.readChar(); } 409 catch(java.io.IOException e) { 410 jjStopStringLiteralDfa_0(1, active0, 0L); 411 return 2; 412 } 413 switch(curChar) 414 { 415 case 67: 416 case 99: 417 if ((active0 & 0x4000L) != 0L) 418 return jjStartNfaWithStates_0(2, 14, 33); 419 break; 420 case 68: 421 case 100: 422 if ((active0 & 0x1000L) != 0L) 423 return jjStartNfaWithStates_0(2, 12, 33); 424 return jjMoveStringLiteralDfa3_0(active0, 0x800000L); 425 case 69: 426 case 101: 427 if ((active0 & 0x10000000L) != 0L) 428 return jjStartNfaWithStates_0(2, 28, 33); 429 return jjMoveStringLiteralDfa3_0(active0, 0x280100000L); 430 case 75: 431 case 107: 432 return jjMoveStringLiteralDfa3_0(active0, 0x20000L); 433 case 76: 434 case 108: 435 if ((active0 & 0x800L) != 0L) 436 return jjStartNfaWithStates_0(2, 11, 33); 437 return jjMoveStringLiteralDfa3_0(active0, 0x41050000L); 438 case 77: 439 case 109: 440 return jjMoveStringLiteralDfa3_0(active0, 0x400000L); 441 case 79: 442 case 111: 443 return jjMoveStringLiteralDfa3_0(active0, 0x800280000L); 444 case 83: 445 case 115: 446 return jjMoveStringLiteralDfa3_0(active0, 0x108008000L); 447 case 84: 448 case 116: 449 if ((active0 & 0x2000L) != 0L) 450 return jjStartNfaWithStates_0(2, 13, 33); 451 return jjMoveStringLiteralDfa3_0(active0, 0x4000000L); 452 case 85: 453 case 117: 454 return jjMoveStringLiteralDfa3_0(active0, 0x20000000L); 455 case 86: 456 case 118: 457 return jjMoveStringLiteralDfa3_0(active0, 0x402000000L); 458 case 87: 459 case 119: 460 if ((active0 & 0x1000000000L) != 0L) 461 return jjStartNfaWithStates_0(2, 36, 33); 462 break; 463 default : 464 break; 465 } 466 return jjStartNfa_0(1, active0, 0L); 467 } 468 private final int jjMoveStringLiteralDfa3_0(long old0, long active0) 469 { 470 if (((active0 &= old0)) == 0L) 471 return jjStartNfa_0(1, old0, 0L); 472 try { curChar = input_stream.readChar(); } 473 catch(java.io.IOException e) { 474 jjStopStringLiteralDfa_0(2, active0, 0L); 475 return 3; 476 } 477 switch(curChar) 478 { 479 case 67: 480 case 99: 481 if ((active0 & 0x8000L) != 0L) 482 return jjStartNfaWithStates_0(3, 15, 33); 483 return jjMoveStringLiteralDfa4_0(active0, 0x80000000L); 484 case 69: 485 case 101: 486 if ((active0 & 0x20000L) != 0L) 487 return jjStartNfaWithStates_0(3, 17, 33); 488 else if ((active0 & 0x20000000L) != 0L) 489 return jjStartNfaWithStates_0(3, 29, 33); 490 return jjMoveStringLiteralDfa4_0(active0, 0x1800000L); 491 case 73: 492 case 105: 493 return jjMoveStringLiteralDfa4_0(active0, 0x402440000L); 494 case 76: 495 case 108: 496 if ((active0 & 0x10000L) != 0L) 497 return jjStartNfaWithStates_0(3, 16, 33); 498 break; 499 case 77: 500 case 109: 501 if ((active0 & 0x80000L) != 0L) 502 return jjStartNfaWithStates_0(3, 19, 33); 503 break; 504 case 82: 505 case 114: 506 return jjMoveStringLiteralDfa4_0(active0, 0x200100000L); 507 case 83: 508 case 115: 509 return jjMoveStringLiteralDfa4_0(active0, 0x40000000L); 510 case 84: 511 case 116: 512 return jjMoveStringLiteralDfa4_0(active0, 0x8000000L); 513 case 85: 514 case 117: 515 return jjMoveStringLiteralDfa4_0(active0, 0x900200000L); 516 case 87: 517 case 119: 518 return jjMoveStringLiteralDfa4_0(active0, 0x4000000L); 519 default : 520 break; 521 } 522 return jjStartNfa_0(2, active0, 0L); 523 } 524 private final int jjMoveStringLiteralDfa4_0(long old0, long active0) 525 { 526 if (((active0 &= old0)) == 0L) 527 return jjStartNfa_0(2, old0, 0L); 528 try { curChar = input_stream.readChar(); } 529 catch(java.io.IOException e) { 530 jjStopStringLiteralDfa_0(3, active0, 0L); 531 return 4; 532 } 533 switch(curChar) 534 { 535 case 67: 536 case 99: 537 return jjMoveStringLiteralDfa5_0(active0, 0x1000000L); 538 case 69: 539 case 101: 540 if ((active0 & 0x100000L) != 0L) 541 { 542 jjmatchedKind = 20; 543 jjmatchedPos = 4; 544 } 545 else if ((active0 & 0x40000000L) != 0L) 546 return jjStartNfaWithStates_0(4, 30, 33); 547 return jjMoveStringLiteralDfa5_0(active0, 0x204000000L); 548 case 73: 549 case 105: 550 return jjMoveStringLiteralDfa5_0(active0, 0x8000000L); 551 case 75: 552 case 107: 553 return jjMoveStringLiteralDfa5_0(active0, 0x40000L); 554 case 76: 555 case 108: 556 return jjMoveStringLiteralDfa5_0(active0, 0x100000000L); 557 case 78: 558 case 110: 559 return jjMoveStringLiteralDfa5_0(active0, 0x402000000L); 560 case 80: 561 case 112: 562 if ((active0 & 0x200000L) != 0L) 563 { 564 jjmatchedKind = 21; 565 jjmatchedPos = 4; 566 } 567 return jjMoveStringLiteralDfa5_0(active0, 0x800000000L); 568 case 82: 569 case 114: 570 if ((active0 & 0x800000L) != 0L) 571 return jjStartNfaWithStates_0(4, 23, 33); 572 break; 573 case 84: 574 case 116: 575 if ((active0 & 0x400000L) != 0L) 576 return jjStartNfaWithStates_0(4, 22, 33); 577 break; 578 case 85: 579 case 117: 580 return jjMoveStringLiteralDfa5_0(active0, 0x80000000L); 581 default : 582 break; 583 } 584 return jjStartNfa_0(3, active0, 0L); 585 } 586 private final int jjMoveStringLiteralDfa5_0(long old0, long active0) 587 { 588 if (((active0 &= old0)) == 0L) 589 return jjStartNfa_0(3, old0, 0L); 590 try { curChar = input_stream.readChar(); } 591 catch(java.io.IOException e) { 592 jjStopStringLiteralDfa_0(4, active0, 0L); 593 return 5; 594 } 595 switch(curChar) 596 { 597 case 95: 598 return jjMoveStringLiteralDfa6_0(active0, 0xa00000000L); 599 case 69: 600 case 101: 601 if ((active0 & 0x40000L) != 0L) 602 return jjStartNfaWithStates_0(5, 18, 33); 603 return jjMoveStringLiteralDfa6_0(active0, 0x4000000L); 604 case 71: 605 case 103: 606 if ((active0 & 0x2000000L) != 0L) 607 { 608 jjmatchedKind = 25; 609 jjmatchedPos = 5; 610 } 611 return jjMoveStringLiteralDfa6_0(active0, 0x400000000L); 612 case 78: 613 case 110: 614 return jjMoveStringLiteralDfa6_0(active0, 0x8000000L); 615 case 84: 616 case 116: 617 if ((active0 & 0x1000000L) != 0L) 618 return jjStartNfaWithStates_0(5, 24, 33); 619 return jjMoveStringLiteralDfa6_0(active0, 0x180000000L); 620 default : 621 break; 622 } 623 return jjStartNfa_0(4, active0, 0L); 624 } 625 private final int jjMoveStringLiteralDfa6_0(long old0, long active0) 626 { 627 if (((active0 &= old0)) == 0L) 628 return jjStartNfa_0(4, old0, 0L); 629 try { curChar = input_stream.readChar(); } 630 catch(java.io.IOException e) { 631 jjStopStringLiteralDfa_0(5, active0, 0L); 632 return 6; 633 } 634 switch(curChar) 635 { 636 case 95: 637 return jjMoveStringLiteralDfa7_0(active0, 0x400000000L); 638 case 66: 639 case 98: 640 return jjMoveStringLiteralDfa7_0(active0, 0x800000000L); 641 case 67: 642 case 99: 643 return jjMoveStringLiteralDfa7_0(active0, 0x8000000L); 644 case 69: 645 case 101: 646 if ((active0 & 0x80000000L) != 0L) 647 return jjStartNfaWithStates_0(6, 31, 33); 648 break; 649 case 78: 650 case 110: 651 if ((active0 & 0x4000000L) != 0L) 652 return jjStartNfaWithStates_0(6, 26, 33); 653 break; 654 case 82: 655 case 114: 656 return jjMoveStringLiteralDfa7_0(active0, 0x200000000L); 657 case 83: 658 case 115: 659 if ((active0 & 0x100000000L) != 0L) 660 return jjStartNfaWithStates_0(6, 32, 33); 661 break; 662 default : 663 break; 664 } 665 return jjStartNfa_0(5, active0, 0L); 666 } 667 private final int jjMoveStringLiteralDfa7_0(long old0, long active0) 668 { 669 if (((active0 &= old0)) == 0L) 670 return jjStartNfa_0(5, old0, 0L); 671 try { curChar = input_stream.readChar(); } 672 catch(java.io.IOException e) { 673 jjStopStringLiteralDfa_0(6, active0, 0L); 674 return 7; 675 } 676 switch(curChar) 677 { 678 case 69: 679 case 101: 680 return jjMoveStringLiteralDfa8_0(active0, 0x200000000L); 681 case 82: 682 case 114: 683 return jjMoveStringLiteralDfa8_0(active0, 0x400000000L); 684 case 84: 685 case 116: 686 if ((active0 & 0x8000000L) != 0L) 687 return jjStartNfaWithStates_0(7, 27, 33); 688 break; 689 case 89: 690 case 121: 691 return jjMoveStringLiteralDfa8_0(active0, 0x800000000L); 692 default : 693 break; 694 } 695 return jjStartNfa_0(6, active0, 0L); 696 } 697 private final int jjMoveStringLiteralDfa8_0(long old0, long active0) 698 { 699 if (((active0 &= old0)) == 0L) 700 return jjStartNfa_0(6, old0, 0L); 701 try { curChar = input_stream.readChar(); } 702 catch(java.io.IOException e) { 703 jjStopStringLiteralDfa_0(7, active0, 0L); 704 return 8; 705 } 706 switch(curChar) 707 { 708 case 95: 709 return jjMoveStringLiteralDfa9_0(active0, 0x800000000L); 710 case 69: 711 case 101: 712 return jjMoveStringLiteralDfa9_0(active0, 0x400000000L); 713 case 83: 714 case 115: 715 return jjMoveStringLiteralDfa9_0(active0, 0x200000000L); 716 default : 717 break; 718 } 719 return jjStartNfa_0(7, active0, 0L); 720 } 721 private final int jjMoveStringLiteralDfa9_0(long old0, long active0) 722 { 723 if (((active0 &= old0)) == 0L) 724 return jjStartNfa_0(7, old0, 0L); 725 try { curChar = input_stream.readChar(); } 726 catch(java.io.IOException e) { 727 jjStopStringLiteralDfa_0(8, active0, 0L); 728 return 9; 729 } 730 switch(curChar) 731 { 732 case 82: 733 case 114: 734 return jjMoveStringLiteralDfa10_0(active0, 0x800000000L); 735 case 83: 736 case 115: 737 return jjMoveStringLiteralDfa10_0(active0, 0x400000000L); 738 case 85: 739 case 117: 740 return jjMoveStringLiteralDfa10_0(active0, 0x200000000L); 741 default : 742 break; 743 } 744 return jjStartNfa_0(8, active0, 0L); 745 } 746 private final int jjMoveStringLiteralDfa10_0(long old0, long active0) 747 { 748 if (((active0 &= old0)) == 0L) 749 return jjStartNfa_0(8, old0, 0L); 750 try { curChar = input_stream.readChar(); } 751 catch(java.io.IOException e) { 752 jjStopStringLiteralDfa_0(9, active0, 0L); 753 return 10; 754 } 755 switch(curChar) 756 { 757 case 69: 758 case 101: 759 return jjMoveStringLiteralDfa11_0(active0, 0x800000000L); 760 case 76: 761 case 108: 762 return jjMoveStringLiteralDfa11_0(active0, 0x200000000L); 763 case 85: 764 case 117: 765 return jjMoveStringLiteralDfa11_0(active0, 0x400000000L); 766 default : 767 break; 768 } 769 return jjStartNfa_0(9, active0, 0L); 770 } 771 private final int jjMoveStringLiteralDfa11_0(long old0, long active0) 772 { 773 if (((active0 &= old0)) == 0L) 774 return jjStartNfa_0(9, old0, 0L); 775 try { curChar = input_stream.readChar(); } 776 catch(java.io.IOException e) { 777 jjStopStringLiteralDfa_0(10, active0, 0L); 778 return 11; 779 } 780 switch(curChar) 781 { 782 case 76: 783 case 108: 784 return jjMoveStringLiteralDfa12_0(active0, 0x400000000L); 785 case 83: 786 case 115: 787 return jjMoveStringLiteralDfa12_0(active0, 0x800000000L); 788 case 84: 789 case 116: 790 return jjMoveStringLiteralDfa12_0(active0, 0x200000000L); 791 default : 792 break; 793 } 794 return jjStartNfa_0(10, active0, 0L); 795 } 796 private final int jjMoveStringLiteralDfa12_0(long old0, long active0) 797 { 798 if (((active0 &= old0)) == 0L) 799 return jjStartNfa_0(10, old0, 0L); 800 try { curChar = input_stream.readChar(); } 801 catch(java.io.IOException e) { 802 jjStopStringLiteralDfa_0(11, active0, 0L); 803 return 12; 804 } 805 switch(curChar) 806 { 807 case 83: 808 case 115: 809 if ((active0 & 0x200000000L) != 0L) 810 return jjStartNfaWithStates_0(12, 33, 1); 811 break; 812 case 84: 813 case 116: 814 return jjMoveStringLiteralDfa13_0(active0, 0x400000000L); 815 case 85: 816 case 117: 817 return jjMoveStringLiteralDfa13_0(active0, 0x800000000L); 818 default : 819 break; 820 } 821 return jjStartNfa_0(11, active0, 0L); 822 } 823 private final int jjMoveStringLiteralDfa13_0(long old0, long active0) 824 { 825 if (((active0 &= old0)) == 0L) 826 return jjStartNfa_0(11, old0, 0L); 827 try { curChar = input_stream.readChar(); } 828 catch(java.io.IOException e) { 829 jjStopStringLiteralDfa_0(12, active0, 0L); 830 return 13; 831 } 832 switch(curChar) 833 { 834 case 76: 835 case 108: 836 return jjMoveStringLiteralDfa14_0(active0, 0x800000000L); 837 case 83: 838 case 115: 839 if ((active0 & 0x400000000L) != 0L) 840 return jjStartNfaWithStates_0(13, 34, 1); 841 break; 842 default : 843 break; 844 } 845 return jjStartNfa_0(12, active0, 0L); 846 } 847 private final int jjMoveStringLiteralDfa14_0(long old0, long active0) 848 { 849 if (((active0 &= old0)) == 0L) 850 return jjStartNfa_0(12, old0, 0L); 851 try { curChar = input_stream.readChar(); } 852 catch(java.io.IOException e) { 853 jjStopStringLiteralDfa_0(13, active0, 0L); 854 return 14; 855 } 856 switch(curChar) 857 { 858 case 84: 859 case 116: 860 return jjMoveStringLiteralDfa15_0(active0, 0x800000000L); 861 default : 862 break; 863 } 864 return jjStartNfa_0(13, active0, 0L); 865 } 866 private final int jjMoveStringLiteralDfa15_0(long old0, long active0) 867 { 868 if (((active0 &= old0)) == 0L) 869 return jjStartNfa_0(13, old0, 0L); 870 try { curChar = input_stream.readChar(); } 871 catch(java.io.IOException e) { 872 jjStopStringLiteralDfa_0(14, active0, 0L); 873 return 15; 874 } 875 switch(curChar) 876 { 877 case 83: 878 case 115: 879 if ((active0 & 0x800000000L) != 0L) 880 return jjStartNfaWithStates_0(15, 35, 1); 881 break; 882 default : 883 break; 884 } 885 return jjStartNfa_0(14, active0, 0L); 886 } 887 private final void jjCheckNAdd(int state) 888 { 889 if (jjrounds[state] != jjround) 890 { 891 jjstateSet[jjnewStateCnt++] = state; 892 jjrounds[state] = jjround; 893 } 894 } 895 private final void jjAddStates(int start, int end) 896 { 897 do { 898 jjstateSet[jjnewStateCnt++] = jjnextStates[start]; 899 } while (start++ != end); 900 } 901 private final void jjCheckNAddTwoStates(int state1, int state2) 902 { 903 jjCheckNAdd(state1); 904 jjCheckNAdd(state2); 905 } 906 private final void jjCheckNAddStates(int start, int end) 907 { 908 do { 909 jjCheckNAdd(jjnextStates[start]); 910 } while (start++ != end); 911 } 912 private final void jjCheckNAddStates(int start) 913 { 914 jjCheckNAdd(jjnextStates[start]); 915 jjCheckNAdd(jjnextStates[start + 1]); 916 } 917 static final long[] jjbitVec0 = { 918 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL 919 }; 920 static final long[] jjbitVec2 = { 921 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL 922 }; 923 private final int jjMoveNfa_0(int startState, int curPos) 924 { 925 int[] nextStates; 926 int startsAt = 0; 927 jjnewStateCnt = 33; 928 int i = 1; 929 jjstateSet[0] = startState; 930 int j, kind = 0x7fffffff; 931 for (;;) 932 { 933 if (++jjround == 0x7fffffff) 934 ReInitRounds(); 935 if (curChar < 64) 936 { 937 long l = 1L << curChar; 938 MatchLoop: do 939 { 940 switch(jjstateSet[--i]) 941 { 942 case 2: 943 if ((0x3ff000000000000L & l) != 0L) 944 { 945 if (kind > 45) 946 kind = 45; 947 jjCheckNAddStates(0, 2); 948 } 949 else if (curChar == 47) 950 jjAddStates(3, 4); 951 else if (curChar == 34) 952 jjCheckNAddStates(5, 8); 953 else if (curChar == 45) 954 jjstateSet[jjnewStateCnt++] = 12; 955 else if (curChar == 46) 956 jjCheckNAdd(8); 957 else if (curChar == 39) 958 jjCheckNAddTwoStates(3, 4); 959 break; 960 case 25: 961 if (curChar == 42) 962 jjCheckNAddTwoStates(28, 29); 963 else if (curChar == 47) 964 { 965 if (kind > 47) 966 kind = 47; 967 jjCheckNAdd(26); 968 } 969 break; 970 case 33: 971 case 1: 972 if ((0x3ff001000000000L & l) == 0L) 973 break; 974 if (kind > 38) 975 kind = 38; 976 jjCheckNAdd(1); 977 break; 978 case 3: 979 if ((0xffffff7fffffffffL & l) != 0L) 980 jjCheckNAddTwoStates(3, 4); 981 break; 982 case 4: 983 if (curChar != 39) 984 break; 985 if (kind > 41) 986 kind = 41; 987 jjstateSet[jjnewStateCnt++] = 5; 988 break; 989 case 5: 990 if (curChar == 39) 991 jjCheckNAddTwoStates(6, 4); 992 break; 993 case 6: 994 if ((0xffffff7fffffffffL & l) != 0L) 995 jjCheckNAddTwoStates(6, 4); 996 break; 997 case 7: 998 if (curChar == 46) 999 jjCheckNAdd(8); 1000 break; 1001 case 8: 1002 if ((0x3ff000000000000L & l) == 0L) 1003 break; 1004 if (kind > 44) 1005 kind = 44; 1006 jjCheckNAddTwoStates(8, 9); 1007 break; 1008 case 10: 1009 if ((0x280000000000L & l) != 0L) 1010 jjCheckNAdd(11); 1011 break; 1012 case 11: 1013 if ((0x3ff000000000000L & l) == 0L) 1014 break; 1015 if (kind > 44) 1016 kind = 44; 1017 jjCheckNAdd(11); 1018 break; 1019 case 12: 1020 if (curChar == 45 && kind > 47) 1021 kind = 47; 1022 break; 1023 case 13: 1024 if (curChar == 45) 1025 jjstateSet[jjnewStateCnt++] = 12; 1026 break; 1027 case 14: 1028 if (curChar == 34) 1029 jjCheckNAddStates(5, 8); 1030 break; 1031 case 15: 1032 if ((0xfffffffbffffffffL & l) != 0L) 1033 jjCheckNAddTwoStates(15, 16); 1034 break; 1035 case 16: 1036 if (curChar != 34) 1037 break; 1038 if (kind > 42) 1039 kind = 42; 1040 jjstateSet[jjnewStateCnt++] = 17; 1041 break; 1042 case 17: 1043 if (curChar == 34) 1044 jjCheckNAddTwoStates(18, 16); 1045 break; 1046 case 18: 1047 if ((0xfffffffbffffffffL & l) != 0L) 1048 jjCheckNAddTwoStates(18, 16); 1049 break; 1050 case 19: 1051 if ((0xfffffffbffffdbffL & l) != 0L) 1052 jjCheckNAddTwoStates(19, 20); 1053 break; 1054 case 20: 1055 if (curChar == 34 && kind > 43) 1056 kind = 43; 1057 break; 1058 case 21: 1059 if ((0x3ff000000000000L & l) == 0L) 1060 break; 1061 if (kind > 45) 1062 kind = 45; 1063 jjCheckNAddStates(0, 2); 1064 break; 1065 case 22: 1066 if ((0x3ff000000000000L & l) != 0L) 1067 jjCheckNAddTwoStates(22, 7); 1068 break; 1069 case 23: 1070 if ((0x3ff000000000000L & l) == 0L) 1071 break; 1072 if (kind > 45) 1073 kind = 45; 1074 jjCheckNAdd(23); 1075 break; 1076 case 24: 1077 if (curChar == 47) 1078 jjAddStates(3, 4); 1079 break; 1080 case 26: 1081 if ((0xffffffffffffdbffL & l) == 0L) 1082 break; 1083 if (kind > 47) 1084 kind = 47; 1085 jjCheckNAdd(26); 1086 break; 1087 case 27: 1088 if (curChar == 42) 1089 jjCheckNAddTwoStates(28, 29); 1090 break; 1091 case 28: 1092 if ((0xfffffbffffffffffL & l) != 0L) 1093 jjCheckNAddTwoStates(28, 29); 1094 break; 1095 case 29: 1096 if (curChar == 42) 1097 jjCheckNAddStates(9, 11); 1098 break; 1099 case 30: 1100 if ((0xffff7bffffffffffL & l) != 0L) 1101 jjCheckNAddTwoStates(31, 29); 1102 break; 1103 case 31: 1104 if ((0xfffffbffffffffffL & l) != 0L) 1105 jjCheckNAddTwoStates(31, 29); 1106 break; 1107 case 32: 1108 if (curChar == 47 && kind > 48) 1109 kind = 48; 1110 break; 1111 default : break; 1112 } 1113 } while(i != startsAt); 1114 } 1115 else if (curChar < 128) 1116 { 1117 long l = 1L << (curChar & 077); 1118 MatchLoop: do 1119 { 1120 switch(jjstateSet[--i]) 1121 { 1122 case 2: 1123 case 0: 1124 if ((0x7fffffe07fffffeL & l) == 0L) 1125 break; 1126 if (kind > 38) 1127 kind = 38; 1128 jjCheckNAddTwoStates(0, 1); 1129 break; 1130 case 33: 1131 if ((0x7fffffe87fffffeL & l) != 0L) 1132 { 1133 if (kind > 38) 1134 kind = 38; 1135 jjCheckNAdd(1); 1136 } 1137 if ((0x7fffffe07fffffeL & l) != 0L) 1138 { 1139 if (kind > 38) 1140 kind = 38; 1141 jjCheckNAddTwoStates(0, 1); 1142 } 1143 break; 1144 case 1: 1145 if ((0x7fffffe87fffffeL & l) == 0L) 1146 break; 1147 if (kind > 38) 1148 kind = 38; 1149 jjCheckNAdd(1); 1150 break; 1151 case 3: 1152 jjCheckNAddTwoStates(3, 4); 1153 break; 1154 case 6: 1155 jjCheckNAddTwoStates(6, 4); 1156 break; 1157 case 9: 1158 if ((0x2000000020L & l) != 0L) 1159 jjAddStates(12, 13); 1160 break; 1161 case 15: 1162 jjCheckNAddTwoStates(15, 16); 1163 break; 1164 case 18: 1165 jjCheckNAddTwoStates(18, 16); 1166 break; 1167 case 19: 1168 jjAddStates(14, 15); 1169 break; 1170 case 26: 1171 if (kind > 47) 1172 kind = 47; 1173 jjstateSet[jjnewStateCnt++] = 26; 1174 break; 1175 case 28: 1176 jjCheckNAddTwoStates(28, 29); 1177 break; 1178 case 30: 1179 case 31: 1180 jjCheckNAddTwoStates(31, 29); 1181 break; 1182 default : break; 1183 } 1184 } while(i != startsAt); 1185 } 1186 else 1187 { 1188 int hiByte = (int)(curChar >> 8); 1189 int i1 = hiByte >> 6; 1190 long l1 = 1L << (hiByte & 077); 1191 int i2 = (curChar & 0xff) >> 6; 1192 long l2 = 1L << (curChar & 077); 1193 MatchLoop: do 1194 { 1195 switch(jjstateSet[--i]) 1196 { 1197 case 3: 1198 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) 1199 jjCheckNAddTwoStates(3, 4); 1200 break; 1201 case 6: 1202 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) 1203 jjCheckNAddTwoStates(6, 4); 1204 break; 1205 case 15: 1206 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) 1207 jjCheckNAddTwoStates(15, 16); 1208 break; 1209 case 18: 1210 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) 1211 jjCheckNAddTwoStates(18, 16); 1212 break; 1213 case 19: 1214 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) 1215 jjAddStates(14, 15); 1216 break; 1217 case 26: 1218 if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) 1219 break; 1220 if (kind > 47) 1221 kind = 47; 1222 jjstateSet[jjnewStateCnt++] = 26; 1223 break; 1224 case 28: 1225 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) 1226 jjCheckNAddTwoStates(28, 29); 1227 break; 1228 case 30: 1229 case 31: 1230 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) 1231 jjCheckNAddTwoStates(31, 29); 1232 break; 1233 default : break; 1234 } 1235 } while(i != startsAt); 1236 } 1237 if (kind != 0x7fffffff) 1238 { 1239 jjmatchedKind = kind; 1240 jjmatchedPos = curPos; 1241 kind = 0x7fffffff; 1242 } 1243 ++curPos; 1244 if ((i = jjnewStateCnt) == (startsAt = 33 - (jjnewStateCnt = startsAt))) 1245 return curPos; 1246 try { curChar = input_stream.readChar(); } 1247 catch(java.io.IOException e) { return curPos; } 1248 } 1249} 1250static final int[] jjnextStates = { 1251 22, 7, 23, 25, 27, 15, 16, 19, 20, 29, 30, 32, 10, 11, 19, 20, 1252}; 1253private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) 1254{ 1255 switch(hiByte) 1256 { 1257 case 0: 1258 return ((jjbitVec2[i2] & l2) != 0L); 1259 default : 1260 if ((jjbitVec0[i1] & l1) != 0L) 1261 return true; 1262 return false; 1263 } 1264} 1265public static final String [] jjstrLiteralImages = { 1266"", null, null, null, null, null, null, null, null, null, null, null, null, 1267null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1268null, null, null, null, null, null, null, null, null, null, "\55\76", null, null, 1269null, null, null, null, null, null, null, null, null, "\72", "\72\137", "\77", 1270"\56", "\100", "\73", "\54", "\52", "\133", "\135", "\50", "\51", "\173", "\175", 1271"\44", "\76", "\74", "\75", "\76\75", "\74\75", "\74\76", "\41\75", "\53", "\55", 1272"\57", "\45", }; 1273public static final String [] lexStateNames = { 1274 "DEFAULT", 1275}; 1276static final long[] jjtoToken = { 1277 0xfffe3e7fffffffe1L, 0x7ffL, 1278}; 1279static final long[] jjtoSkip = { 1280 0x180000000001eL, 0x0L, 1281}; 1282static final long[] jjtoSpecial = { 1283 0x1800000000000L, 0x0L, 1284}; 1285protected JavaCharStream input_stream; 1286private final int[] jjrounds = new int[33]; 1287private final int[] jjstateSet = new int[66]; 1288protected char curChar; 1289public JoSQLParserTokenManager(JavaCharStream stream){ 1290 if (JavaCharStream.staticFlag) 1291 throw new Error ("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); 1292 input_stream = stream; 1293} 1294public JoSQLParserTokenManager(JavaCharStream stream, int lexState){ 1295 this(stream); 1296 SwitchTo(lexState); 1297} 1298public void ReInit(JavaCharStream stream) 1299{ 1300 jjmatchedPos = jjnewStateCnt = 0; 1301 curLexState = defaultLexState; 1302 input_stream = stream; 1303 ReInitRounds(); 1304} 1305private final void ReInitRounds() 1306{ 1307 int i; 1308 jjround = 0x80000001; 1309 for (i = 33; i-- > 0;) 1310 jjrounds[i] = 0x80000000; 1311} 1312public void ReInit(JavaCharStream stream, int lexState) 1313{ 1314 ReInit(stream); 1315 SwitchTo(lexState); 1316} 1317public void SwitchTo(int lexState) 1318{ 1319 if (lexState >= 1 || lexState < 0) 1320 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); 1321 else 1322 curLexState = lexState; 1323} 1324 1325protected Token jjFillToken() 1326{ 1327 Token t = Token.newToken(jjmatchedKind); 1328 t.kind = jjmatchedKind; 1329 String im = jjstrLiteralImages[jjmatchedKind]; 1330 t.image = (im == null) ? input_stream.GetImage() : im; 1331 t.beginLine = input_stream.getBeginLine(); 1332 t.beginColumn = input_stream.getBeginColumn(); 1333 t.endLine = input_stream.getEndLine(); 1334 t.endColumn = input_stream.getEndColumn(); 1335 return t; 1336} 1337 1338int curLexState = 0; 1339int defaultLexState = 0; 1340int jjnewStateCnt; 1341int jjround; 1342int jjmatchedPos; 1343int jjmatchedKind; 1344 1345public Token getNextToken() 1346{ 1347 int kind; 1348 Token specialToken = null; 1349 Token matchedToken; 1350 int curPos = 0; 1351 1352 EOFLoop : 1353 for (;;) 1354 { 1355 try 1356 { 1357 curChar = input_stream.BeginToken(); 1358 } 1359 catch(java.io.IOException e) 1360 { 1361 jjmatchedKind = 0; 1362 matchedToken = jjFillToken(); 1363 matchedToken.specialToken = specialToken; 1364 return matchedToken; 1365 } 1366 1367 try { input_stream.backup(0); 1368 while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L) 1369 curChar = input_stream.BeginToken(); 1370 } 1371 catch (java.io.IOException e1) { continue EOFLoop; } 1372 jjmatchedKind = 0x7fffffff; 1373 jjmatchedPos = 0; 1374 curPos = jjMoveStringLiteralDfa0_0(); 1375 if (jjmatchedKind != 0x7fffffff) 1376 { 1377 if (jjmatchedPos + 1 < curPos) 1378 input_stream.backup(curPos - jjmatchedPos - 1); 1379 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) 1380 { 1381 matchedToken = jjFillToken(); 1382 matchedToken.specialToken = specialToken; 1383 return matchedToken; 1384 } 1385 else 1386 { 1387 if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) 1388 { 1389 matchedToken = jjFillToken(); 1390 if (specialToken == null) 1391 specialToken = matchedToken; 1392 else 1393 { 1394 matchedToken.specialToken = specialToken; 1395 specialToken = (specialToken.next = matchedToken); 1396 } 1397 } 1398 continue EOFLoop; 1399 } 1400 } 1401 int error_line = input_stream.getEndLine(); 1402 int error_column = input_stream.getEndColumn(); 1403 String error_after = null; 1404 boolean EOFSeen = false; 1405 try { input_stream.readChar(); input_stream.backup(1); } 1406 catch (java.io.IOException e1) { 1407 EOFSeen = true; 1408 error_after = curPos <= 1 ? "" : input_stream.GetImage(); 1409 if (curChar == '\n' || curChar == '\r') { 1410 error_line++; 1411 error_column = 0; 1412 } 1413 else 1414 error_column++; 1415 } 1416 if (!EOFSeen) { 1417 input_stream.backup(1); 1418 error_after = curPos <= 1 ? "" : input_stream.GetImage(); 1419 } 1420 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); 1421 } 1422} 1423 1424} 1425 | Popular Tags |