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