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