001 /* Generated By:JavaCC: Do not edit this line. OgnlParserTokenManager.java */ 002 package org.apache.commons.ognl; 003 import java.math.*; 004 005 /** Token Manager. */ 006 public class OgnlParserTokenManager implements OgnlParserConstants 007 { 008 /** Holds the last value computed by a constant token. */ 009 Object literalValue; 010 /** Holds the last character escaped or in a character literal. */ 011 private char charValue; 012 /** Holds char literal start token. */ 013 private char charLiteralStartQuote; 014 /** Holds the last string literal parsed. */ 015 private StringBuilder stringBuilder; 016 017 /** Converts an escape sequence into a character value. */ 018 private char escapeChar() 019 { 020 int ofs = image.length() - 1; 021 switch ( image.charAt(ofs) ) { 022 case 'n': return '\u005cn'; 023 case 'r': return '\u005cr'; 024 case 't': return '\u005ct'; 025 case 'b': return '\u005cb'; 026 case 'f': return '\u005cf'; 027 case '\u005c\u005c': return '\u005c\u005c'; 028 case '\u005c'': return '\u005c''; 029 case '\u005c"': return '\u005c"'; 030 } 031 032 // Otherwise, it's an octal number. Find the backslash and convert. 033 while ( image.charAt(--ofs) != '\u005c\u005c' ) 034 {} 035 int value = 0; 036 while ( ++ofs < image.length() ) 037 value = (value << 3) | (image.charAt(ofs) - '0'); 038 return (char) value; 039 } 040 041 private Object makeInt() 042 { 043 Object result; 044 String s = image.toString(); 045 int base = 10; 046 047 if ( s.charAt(0) == '0' ) 048 base = (s.length() > 1 && (s.charAt(1) == 'x' || s.charAt(1) == 'X'))? 16 : 8; 049 if ( base == 16 ) 050 s = s.substring(2); // Trim the 0x off the front 051 switch ( s.charAt(s.length()-1) ) { 052 case 'l': case 'L': 053 result = Long.valueOf( s.substring(0,s.length()-1), base ); 054 break; 055 056 case 'h': case 'H': 057 result = new BigInteger( s.substring(0,s.length()-1), base ); 058 break; 059 060 default: 061 result = Integer.valueOf( s, base ); 062 break; 063 } 064 return result; 065 } 066 067 private Object makeFloat() 068 { 069 String s = image.toString(); 070 switch ( s.charAt(s.length()-1) ) { 071 case 'f': case 'F': 072 return Float.valueOf( s ); 073 074 case 'b': case 'B': 075 return new BigDecimal( s.substring(0,s.length()-1) ); 076 077 case 'd': case 'D': 078 default: 079 return Double.valueOf( s ); 080 } 081 } 082 083 /** Debug output. */ 084 public java.io.PrintStream debugStream = System.out; 085 /** Set debug output. */ 086 public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } 087 private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) 088 { 089 switch (pos) 090 { 091 case 0: 092 if ((active0 & 0x201c4055d555540L) != 0L) 093 { 094 jjmatchedKind = 64; 095 return 1; 096 } 097 if ((active0 & 0x400000000000000L) != 0L) 098 return 1; 099 if ((active0 & 0x10000000000000L) != 0L) 100 return 3; 101 if ((active0 & 0x80000000000L) != 0L) 102 return 9; 103 return -1; 104 case 1: 105 if ((active0 & 0x201c00550045500L) != 0L) 106 { 107 if (jjmatchedPos != 1) 108 { 109 jjmatchedKind = 64; 110 jjmatchedPos = 1; 111 } 112 return 1; 113 } 114 if ((active0 & 0x4000d510040L) != 0L) 115 return 1; 116 return -1; 117 case 2: 118 if ((active0 & 0x1c40400004000L) != 0L) 119 { 120 jjmatchedKind = 64; 121 jjmatchedPos = 2; 122 return 1; 123 } 124 if ((active0 & 0x200000155041500L) != 0L) 125 return 1; 126 return -1; 127 case 3: 128 if ((active0 & 0x1400400004000L) != 0L) 129 return 1; 130 if ((active0 & 0x840000000000L) != 0L) 131 { 132 jjmatchedKind = 64; 133 jjmatchedPos = 3; 134 return 1; 135 } 136 return -1; 137 case 4: 138 if ((active0 & 0x800000000000L) != 0L) 139 return 1; 140 if ((active0 & 0x40000000000L) != 0L) 141 { 142 jjmatchedKind = 64; 143 jjmatchedPos = 4; 144 return 1; 145 } 146 return -1; 147 case 5: 148 if ((active0 & 0x40000000000L) != 0L) 149 { 150 jjmatchedKind = 64; 151 jjmatchedPos = 5; 152 return 1; 153 } 154 return -1; 155 case 6: 156 if ((active0 & 0x40000000000L) != 0L) 157 { 158 jjmatchedKind = 64; 159 jjmatchedPos = 6; 160 return 1; 161 } 162 return -1; 163 case 7: 164 if ((active0 & 0x40000000000L) != 0L) 165 { 166 jjmatchedKind = 64; 167 jjmatchedPos = 7; 168 return 1; 169 } 170 return -1; 171 case 8: 172 if ((active0 & 0x40000000000L) != 0L) 173 { 174 jjmatchedKind = 64; 175 jjmatchedPos = 8; 176 return 1; 177 } 178 return -1; 179 default : 180 return -1; 181 } 182 } 183 private final int jjStartNfa_0(int pos, long active0, long active1) 184 { 185 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); 186 } 187 private int jjStopAtPos(int pos, int kind) 188 { 189 jjmatchedKind = kind; 190 jjmatchedPos = pos; 191 return pos + 1; 192 } 193 private int jjMoveStringLiteralDfa0_0() 194 { 195 switch(curChar) 196 { 197 case 33: 198 jjmatchedKind = 41; 199 return jjMoveStringLiteralDfa1_0(0x20000L); 200 case 34: 201 return jjStopAtPos(0, 70); 202 case 35: 203 jjmatchedKind = 51; 204 return jjMoveStringLiteralDfa1_0(0x6000000000000L); 205 case 36: 206 return jjStartNfaWithStates_0(0, 58, 1); 207 case 37: 208 return jjStopAtPos(0, 39); 209 case 38: 210 jjmatchedKind = 13; 211 return jjMoveStringLiteralDfa1_0(0x80L); 212 case 39: 213 return jjStopAtPos(0, 69); 214 case 40: 215 return jjStopAtPos(0, 44); 216 case 41: 217 return jjStopAtPos(0, 45); 218 case 42: 219 return jjStopAtPos(0, 37); 220 case 43: 221 return jjStopAtPos(0, 35); 222 case 44: 223 return jjStopAtPos(0, 1); 224 case 45: 225 return jjStopAtPos(0, 36); 226 case 46: 227 return jjStartNfaWithStates_0(0, 43, 9); 228 case 47: 229 return jjStopAtPos(0, 38); 230 case 58: 231 return jjStopAtPos(0, 4); 232 case 60: 233 jjmatchedKind = 19; 234 return jjMoveStringLiteralDfa1_0(0x20800000L); 235 case 61: 236 jjmatchedKind = 2; 237 return jjMoveStringLiteralDfa1_0(0x8000L); 238 case 62: 239 jjmatchedKind = 21; 240 return jjMoveStringLiteralDfa1_0(0x282000000L); 241 case 63: 242 return jjStopAtPos(0, 3); 243 case 64: 244 return jjStopAtPos(0, 56); 245 case 91: 246 return jjStartNfaWithStates_0(0, 52, 3); 247 case 93: 248 return jjStopAtPos(0, 53); 249 case 94: 250 return jjStopAtPos(0, 11); 251 case 96: 252 return jjStopAtPos(0, 68); 253 case 97: 254 return jjMoveStringLiteralDfa1_0(0x100L); 255 case 98: 256 return jjMoveStringLiteralDfa1_0(0x4400L); 257 case 101: 258 return jjMoveStringLiteralDfa1_0(0x10000L); 259 case 102: 260 return jjMoveStringLiteralDfa1_0(0x800000000000L); 261 case 103: 262 return jjMoveStringLiteralDfa1_0(0x4400000L); 263 case 105: 264 return jjMoveStringLiteralDfa1_0(0x40008000000L); 265 case 108: 266 return jjMoveStringLiteralDfa1_0(0x1100000L); 267 case 110: 268 return jjMoveStringLiteralDfa1_0(0x201000010040000L); 269 case 111: 270 return jjMoveStringLiteralDfa1_0(0x40L); 271 case 115: 272 return jjMoveStringLiteralDfa1_0(0x140000000L); 273 case 116: 274 return jjMoveStringLiteralDfa1_0(0x400000000000L); 275 case 117: 276 return jjMoveStringLiteralDfa1_0(0x400000000L); 277 case 120: 278 return jjMoveStringLiteralDfa1_0(0x1000L); 279 case 123: 280 return jjStopAtPos(0, 54); 281 case 124: 282 jjmatchedKind = 9; 283 return jjMoveStringLiteralDfa1_0(0x20L); 284 case 125: 285 return jjStopAtPos(0, 55); 286 case 126: 287 return jjStopAtPos(0, 40); 288 default : 289 return jjMoveNfa_0(0, 0); 290 } 291 } 292 private int jjMoveStringLiteralDfa1_0(long active0) 293 { 294 try { curChar = input_stream.readChar(); } 295 catch(java.io.IOException e) { 296 jjStopStringLiteralDfa_0(0, active0, 0L); 297 return 1; 298 } 299 switch(curChar) 300 { 301 case 38: 302 if ((active0 & 0x80L) != 0L) 303 return jjStopAtPos(1, 7); 304 break; 305 case 60: 306 if ((active0 & 0x20000000L) != 0L) 307 return jjStopAtPos(1, 29); 308 break; 309 case 61: 310 if ((active0 & 0x8000L) != 0L) 311 return jjStopAtPos(1, 15); 312 else if ((active0 & 0x20000L) != 0L) 313 return jjStopAtPos(1, 17); 314 else if ((active0 & 0x800000L) != 0L) 315 return jjStopAtPos(1, 23); 316 else if ((active0 & 0x2000000L) != 0L) 317 return jjStopAtPos(1, 25); 318 break; 319 case 62: 320 if ((active0 & 0x80000000L) != 0L) 321 { 322 jjmatchedKind = 31; 323 jjmatchedPos = 1; 324 } 325 return jjMoveStringLiteralDfa2_0(active0, 0x200000000L); 326 case 97: 327 return jjMoveStringLiteralDfa2_0(active0, 0x800000004000L); 328 case 101: 329 return jjMoveStringLiteralDfa2_0(active0, 0x200000000040000L); 330 case 104: 331 return jjMoveStringLiteralDfa2_0(active0, 0x140000000L); 332 case 110: 333 if ((active0 & 0x8000000L) != 0L) 334 { 335 jjmatchedKind = 27; 336 jjmatchedPos = 1; 337 } 338 return jjMoveStringLiteralDfa2_0(active0, 0x40000000100L); 339 case 111: 340 return jjMoveStringLiteralDfa2_0(active0, 0x10001400L); 341 case 113: 342 if ((active0 & 0x10000L) != 0L) 343 return jjStartNfaWithStates_0(1, 16, 1); 344 break; 345 case 114: 346 if ((active0 & 0x40L) != 0L) 347 return jjStartNfaWithStates_0(1, 6, 1); 348 return jjMoveStringLiteralDfa2_0(active0, 0x4400000000000L); 349 case 115: 350 return jjMoveStringLiteralDfa2_0(active0, 0x400000000L); 351 case 116: 352 if ((active0 & 0x100000L) != 0L) 353 { 354 jjmatchedKind = 20; 355 jjmatchedPos = 1; 356 } 357 else if ((active0 & 0x400000L) != 0L) 358 { 359 jjmatchedKind = 22; 360 jjmatchedPos = 1; 361 } 362 return jjMoveStringLiteralDfa2_0(active0, 0x2000005000000L); 363 case 117: 364 return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000L); 365 case 124: 366 if ((active0 & 0x20L) != 0L) 367 return jjStopAtPos(1, 5); 368 break; 369 default : 370 break; 371 } 372 return jjStartNfa_0(0, active0, 0L); 373 } 374 private int jjMoveStringLiteralDfa2_0(long old0, long active0) 375 { 376 if (((active0 &= old0)) == 0L) 377 return jjStartNfa_0(0, old0, 0L); 378 try { curChar = input_stream.readChar(); } 379 catch(java.io.IOException e) { 380 jjStopStringLiteralDfa_0(1, active0, 0L); 381 return 2; 382 } 383 switch(curChar) 384 { 385 case 62: 386 if ((active0 & 0x200000000L) != 0L) 387 return jjStopAtPos(2, 33); 388 break; 389 case 100: 390 if ((active0 & 0x100L) != 0L) 391 return jjStartNfaWithStates_0(2, 8, 1); 392 break; 393 case 101: 394 if ((active0 & 0x1000000L) != 0L) 395 return jjStartNfaWithStates_0(2, 24, 1); 396 else if ((active0 & 0x4000000L) != 0L) 397 return jjStartNfaWithStates_0(2, 26, 1); 398 break; 399 case 104: 400 return jjMoveStringLiteralDfa3_0(active0, 0x2000400000000L); 401 case 108: 402 if ((active0 & 0x40000000L) != 0L) 403 return jjStartNfaWithStates_0(2, 30, 1); 404 return jjMoveStringLiteralDfa3_0(active0, 0x1800000000000L); 405 case 110: 406 return jjMoveStringLiteralDfa3_0(active0, 0x4000L); 407 case 111: 408 return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000L); 409 case 113: 410 if ((active0 & 0x40000L) != 0L) 411 return jjStartNfaWithStates_0(2, 18, 1); 412 break; 413 case 114: 414 if ((active0 & 0x400L) != 0L) 415 return jjStartNfaWithStates_0(2, 10, 1); 416 else if ((active0 & 0x1000L) != 0L) 417 return jjStartNfaWithStates_0(2, 12, 1); 418 else if ((active0 & 0x100000000L) != 0L) 419 return jjStartNfaWithStates_0(2, 32, 1); 420 break; 421 case 115: 422 return jjMoveStringLiteralDfa3_0(active0, 0x40000000000L); 423 case 116: 424 if ((active0 & 0x10000000L) != 0L) 425 return jjStartNfaWithStates_0(2, 28, 1); 426 break; 427 case 117: 428 return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L); 429 case 119: 430 if ((active0 & 0x200000000000000L) != 0L) 431 return jjStartNfaWithStates_0(2, 57, 1); 432 break; 433 default : 434 break; 435 } 436 return jjStartNfa_0(1, active0, 0L); 437 } 438 private int jjMoveStringLiteralDfa3_0(long old0, long active0) 439 { 440 if (((active0 &= old0)) == 0L) 441 return jjStartNfa_0(1, old0, 0L); 442 try { curChar = input_stream.readChar(); } 443 catch(java.io.IOException e) { 444 jjStopStringLiteralDfa_0(2, active0, 0L); 445 return 3; 446 } 447 switch(curChar) 448 { 449 case 100: 450 if ((active0 & 0x4000L) != 0L) 451 return jjStartNfaWithStates_0(3, 14, 1); 452 break; 453 case 101: 454 if ((active0 & 0x400000000000L) != 0L) 455 return jjStartNfaWithStates_0(3, 46, 1); 456 break; 457 case 105: 458 return jjMoveStringLiteralDfa4_0(active0, 0x2000000000000L); 459 case 108: 460 if ((active0 & 0x1000000000000L) != 0L) 461 return jjStartNfaWithStates_0(3, 48, 1); 462 break; 463 case 111: 464 return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000L); 465 case 114: 466 if ((active0 & 0x400000000L) != 0L) 467 return jjStartNfaWithStates_0(3, 34, 1); 468 break; 469 case 115: 470 return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L); 471 case 116: 472 return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L); 473 default : 474 break; 475 } 476 return jjStartNfa_0(2, active0, 0L); 477 } 478 private int jjMoveStringLiteralDfa4_0(long old0, long active0) 479 { 480 if (((active0 &= old0)) == 0L) 481 return jjStartNfa_0(2, old0, 0L); 482 try { curChar = input_stream.readChar(); } 483 catch(java.io.IOException e) { 484 jjStopStringLiteralDfa_0(3, active0, 0L); 485 return 4; 486 } 487 switch(curChar) 488 { 489 case 97: 490 return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L); 491 case 101: 492 if ((active0 & 0x800000000000L) != 0L) 493 return jjStartNfaWithStates_0(4, 47, 1); 494 break; 495 case 115: 496 if ((active0 & 0x2000000000000L) != 0L) 497 return jjStopAtPos(4, 49); 498 break; 499 case 116: 500 if ((active0 & 0x4000000000000L) != 0L) 501 return jjStopAtPos(4, 50); 502 break; 503 default : 504 break; 505 } 506 return jjStartNfa_0(3, active0, 0L); 507 } 508 private int jjMoveStringLiteralDfa5_0(long old0, long active0) 509 { 510 if (((active0 &= old0)) == 0L) 511 return jjStartNfa_0(3, old0, 0L); 512 try { curChar = input_stream.readChar(); } 513 catch(java.io.IOException e) { 514 jjStopStringLiteralDfa_0(4, active0, 0L); 515 return 5; 516 } 517 switch(curChar) 518 { 519 case 110: 520 return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L); 521 default : 522 break; 523 } 524 return jjStartNfa_0(4, active0, 0L); 525 } 526 private int jjMoveStringLiteralDfa6_0(long old0, long active0) 527 { 528 if (((active0 &= old0)) == 0L) 529 return jjStartNfa_0(4, old0, 0L); 530 try { curChar = input_stream.readChar(); } 531 catch(java.io.IOException e) { 532 jjStopStringLiteralDfa_0(5, active0, 0L); 533 return 6; 534 } 535 switch(curChar) 536 { 537 case 99: 538 return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L); 539 default : 540 break; 541 } 542 return jjStartNfa_0(5, active0, 0L); 543 } 544 private int jjMoveStringLiteralDfa7_0(long old0, long active0) 545 { 546 if (((active0 &= old0)) == 0L) 547 return jjStartNfa_0(5, old0, 0L); 548 try { curChar = input_stream.readChar(); } 549 catch(java.io.IOException e) { 550 jjStopStringLiteralDfa_0(6, active0, 0L); 551 return 7; 552 } 553 switch(curChar) 554 { 555 case 101: 556 return jjMoveStringLiteralDfa8_0(active0, 0x40000000000L); 557 default : 558 break; 559 } 560 return jjStartNfa_0(6, active0, 0L); 561 } 562 private int jjMoveStringLiteralDfa8_0(long old0, long active0) 563 { 564 if (((active0 &= old0)) == 0L) 565 return jjStartNfa_0(6, old0, 0L); 566 try { curChar = input_stream.readChar(); } 567 catch(java.io.IOException e) { 568 jjStopStringLiteralDfa_0(7, active0, 0L); 569 return 8; 570 } 571 switch(curChar) 572 { 573 case 111: 574 return jjMoveStringLiteralDfa9_0(active0, 0x40000000000L); 575 default : 576 break; 577 } 578 return jjStartNfa_0(7, active0, 0L); 579 } 580 private int jjMoveStringLiteralDfa9_0(long old0, long active0) 581 { 582 if (((active0 &= old0)) == 0L) 583 return jjStartNfa_0(7, old0, 0L); 584 try { curChar = input_stream.readChar(); } 585 catch(java.io.IOException e) { 586 jjStopStringLiteralDfa_0(8, active0, 0L); 587 return 9; 588 } 589 switch(curChar) 590 { 591 case 102: 592 if ((active0 & 0x40000000000L) != 0L) 593 return jjStartNfaWithStates_0(9, 42, 1); 594 break; 595 default : 596 break; 597 } 598 return jjStartNfa_0(8, active0, 0L); 599 } 600 private int jjStartNfaWithStates_0(int pos, int kind, int state) 601 { 602 jjmatchedKind = kind; 603 jjmatchedPos = pos; 604 try { curChar = input_stream.readChar(); } 605 catch(java.io.IOException e) { return pos + 1; } 606 return jjMoveNfa_0(state, pos + 1); 607 } 608 static final long[] jjbitVec0 = { 609 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L 610 }; 611 static final long[] jjbitVec2 = { 612 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL 613 }; 614 static final long[] jjbitVec3 = { 615 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL 616 }; 617 static final long[] jjbitVec4 = { 618 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L 619 }; 620 static final long[] jjbitVec5 = { 621 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L 622 }; 623 static final long[] jjbitVec6 = { 624 0x3fffffffffffL, 0x0L, 0x0L, 0x0L 625 }; 626 private int jjMoveNfa_0(int startState, int curPos) 627 { 628 int startsAt = 0; 629 jjnewStateCnt = 27; 630 int i = 1; 631 jjstateSet[0] = startState; 632 int kind = 0x7fffffff; 633 for (;;) 634 { 635 if (++jjround == 0x7fffffff) 636 ReInitRounds(); 637 if (curChar < 64) 638 { 639 long l = 1L << curChar; 640 do 641 { 642 switch(jjstateSet[--i]) 643 { 644 case 0: 645 if ((0x3ff000000000000L & l) != 0L) 646 jjCheckNAddStates(0, 5); 647 else if (curChar == 46) 648 jjCheckNAdd(9); 649 else if (curChar == 36) 650 { 651 if (kind > 64) 652 kind = 64; 653 jjCheckNAdd(1); 654 } 655 if ((0x3fe000000000000L & l) != 0L) 656 { 657 if (kind > 80) 658 kind = 80; 659 jjCheckNAddTwoStates(6, 7); 660 } 661 else if (curChar == 48) 662 { 663 if (kind > 80) 664 kind = 80; 665 jjCheckNAddStates(6, 8); 666 } 667 break; 668 case 1: 669 if ((0x3ff001000000000L & l) == 0L) 670 break; 671 if (kind > 64) 672 kind = 64; 673 jjCheckNAdd(1); 674 break; 675 case 3: 676 if ((0x41000000000L & l) != 0L) 677 jjstateSet[jjnewStateCnt++] = 4; 678 break; 679 case 5: 680 if ((0x3fe000000000000L & l) == 0L) 681 break; 682 if (kind > 80) 683 kind = 80; 684 jjCheckNAddTwoStates(6, 7); 685 break; 686 case 6: 687 if ((0x3ff000000000000L & l) == 0L) 688 break; 689 if (kind > 80) 690 kind = 80; 691 jjCheckNAddTwoStates(6, 7); 692 break; 693 case 8: 694 if (curChar == 46) 695 jjCheckNAdd(9); 696 break; 697 case 9: 698 if ((0x3ff000000000000L & l) == 0L) 699 break; 700 if (kind > 81) 701 kind = 81; 702 jjCheckNAddStates(9, 11); 703 break; 704 case 11: 705 if ((0x280000000000L & l) != 0L) 706 jjCheckNAdd(12); 707 break; 708 case 12: 709 if ((0x3ff000000000000L & l) == 0L) 710 break; 711 if (kind > 81) 712 kind = 81; 713 jjCheckNAddTwoStates(12, 13); 714 break; 715 case 14: 716 if ((0x3ff000000000000L & l) != 0L) 717 jjCheckNAddStates(0, 5); 718 break; 719 case 15: 720 if ((0x3ff000000000000L & l) != 0L) 721 jjCheckNAddTwoStates(15, 16); 722 break; 723 case 16: 724 if (curChar != 46) 725 break; 726 if (kind > 81) 727 kind = 81; 728 jjCheckNAddStates(12, 14); 729 break; 730 case 17: 731 if ((0x3ff000000000000L & l) == 0L) 732 break; 733 if (kind > 81) 734 kind = 81; 735 jjCheckNAddStates(12, 14); 736 break; 737 case 18: 738 if ((0x3ff000000000000L & l) != 0L) 739 jjCheckNAddTwoStates(18, 19); 740 break; 741 case 20: 742 if ((0x280000000000L & l) != 0L) 743 jjCheckNAdd(21); 744 break; 745 case 21: 746 if ((0x3ff000000000000L & l) == 0L) 747 break; 748 if (kind > 81) 749 kind = 81; 750 jjCheckNAddTwoStates(21, 13); 751 break; 752 case 22: 753 if ((0x3ff000000000000L & l) != 0L) 754 jjCheckNAddTwoStates(22, 13); 755 break; 756 case 23: 757 if (curChar != 48) 758 break; 759 if (kind > 80) 760 kind = 80; 761 jjCheckNAddStates(6, 8); 762 break; 763 case 24: 764 if ((0xff000000000000L & l) == 0L) 765 break; 766 if (kind > 80) 767 kind = 80; 768 jjCheckNAddTwoStates(24, 7); 769 break; 770 case 26: 771 if ((0x3ff000000000000L & l) == 0L) 772 break; 773 if (kind > 80) 774 kind = 80; 775 jjCheckNAddTwoStates(26, 7); 776 break; 777 default : break; 778 } 779 } while(i != startsAt); 780 } 781 else if (curChar < 128) 782 { 783 long l = 1L << (curChar & 077); 784 do 785 { 786 switch(jjstateSet[--i]) 787 { 788 case 0: 789 if ((0x7fffffe87fffffeL & l) != 0L) 790 { 791 if (kind > 64) 792 kind = 64; 793 jjCheckNAdd(1); 794 } 795 else if (curChar == 91) 796 jjstateSet[jjnewStateCnt++] = 3; 797 break; 798 case 1: 799 if ((0x7fffffe87fffffeL & l) == 0L) 800 break; 801 if (kind > 64) 802 kind = 64; 803 jjCheckNAdd(1); 804 break; 805 case 2: 806 if (curChar == 91) 807 jjstateSet[jjnewStateCnt++] = 3; 808 break; 809 case 3: 810 if ((0x1000000040000000L & l) != 0L) 811 jjstateSet[jjnewStateCnt++] = 4; 812 break; 813 case 4: 814 if (curChar == 93) 815 kind = 67; 816 break; 817 case 7: 818 if ((0x110000001100L & l) != 0L && kind > 80) 819 kind = 80; 820 break; 821 case 10: 822 if ((0x2000000020L & l) != 0L) 823 jjAddStates(15, 16); 824 break; 825 case 13: 826 if ((0x5400000054L & l) != 0L && kind > 81) 827 kind = 81; 828 break; 829 case 19: 830 if ((0x2000000020L & l) != 0L) 831 jjAddStates(17, 18); 832 break; 833 case 25: 834 if ((0x100000001000000L & l) != 0L) 835 jjCheckNAdd(26); 836 break; 837 case 26: 838 if ((0x7e0000007eL & l) == 0L) 839 break; 840 if (kind > 80) 841 kind = 80; 842 jjCheckNAddTwoStates(26, 7); 843 break; 844 default : break; 845 } 846 } while(i != startsAt); 847 } 848 else 849 { 850 int hiByte = (int)(curChar >> 8); 851 int i1 = hiByte >> 6; 852 long l1 = 1L << (hiByte & 077); 853 int i2 = (curChar & 0xff) >> 6; 854 long l2 = 1L << (curChar & 077); 855 do 856 { 857 switch(jjstateSet[--i]) 858 { 859 case 0: 860 case 1: 861 if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) 862 break; 863 if (kind > 64) 864 kind = 64; 865 jjCheckNAdd(1); 866 break; 867 default : break; 868 } 869 } while(i != startsAt); 870 } 871 if (kind != 0x7fffffff) 872 { 873 jjmatchedKind = kind; 874 jjmatchedPos = curPos; 875 kind = 0x7fffffff; 876 } 877 ++curPos; 878 if ((i = jjnewStateCnt) == (startsAt = 27 - (jjnewStateCnt = startsAt))) 879 return curPos; 880 try { curChar = input_stream.readChar(); } 881 catch(java.io.IOException e) { return curPos; } 882 } 883 } 884 private final int jjStopStringLiteralDfa_2(int pos, long active0, long active1) 885 { 886 switch (pos) 887 { 888 default : 889 return -1; 890 } 891 } 892 private final int jjStartNfa_2(int pos, long active0, long active1) 893 { 894 return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0, active1), pos + 1); 895 } 896 private int jjMoveStringLiteralDfa0_2() 897 { 898 switch(curChar) 899 { 900 case 96: 901 return jjStopAtPos(0, 76); 902 default : 903 return jjMoveNfa_2(0, 0); 904 } 905 } 906 static final long[] jjbitVec7 = { 907 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL 908 }; 909 static final long[] jjbitVec8 = { 910 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL 911 }; 912 private int jjMoveNfa_2(int startState, int curPos) 913 { 914 int startsAt = 0; 915 jjnewStateCnt = 6; 916 int i = 1; 917 jjstateSet[0] = startState; 918 int kind = 0x7fffffff; 919 for (;;) 920 { 921 if (++jjround == 0x7fffffff) 922 ReInitRounds(); 923 if (curChar < 64) 924 { 925 long l = 1L << curChar; 926 do 927 { 928 switch(jjstateSet[--i]) 929 { 930 case 0: 931 if (kind > 75) 932 kind = 75; 933 break; 934 case 1: 935 if ((0x8400000000L & l) != 0L && kind > 74) 936 kind = 74; 937 break; 938 case 2: 939 if ((0xf000000000000L & l) != 0L) 940 jjstateSet[jjnewStateCnt++] = 3; 941 break; 942 case 3: 943 if ((0xff000000000000L & l) == 0L) 944 break; 945 if (kind > 74) 946 kind = 74; 947 jjstateSet[jjnewStateCnt++] = 4; 948 break; 949 case 4: 950 if ((0xff000000000000L & l) != 0L && kind > 74) 951 kind = 74; 952 break; 953 default : break; 954 } 955 } while(i != startsAt); 956 } 957 else if (curChar < 128) 958 { 959 long l = 1L << (curChar & 077); 960 do 961 { 962 switch(jjstateSet[--i]) 963 { 964 case 0: 965 if ((0xfffffffeefffffffL & l) != 0L) 966 { 967 if (kind > 75) 968 kind = 75; 969 } 970 else if (curChar == 92) 971 jjAddStates(19, 21); 972 break; 973 case 1: 974 if ((0x14404510000000L & l) != 0L && kind > 74) 975 kind = 74; 976 break; 977 case 5: 978 if ((0xfffffffeefffffffL & l) != 0L && kind > 75) 979 kind = 75; 980 break; 981 default : break; 982 } 983 } while(i != startsAt); 984 } 985 else 986 { 987 int hiByte = (int)(curChar >> 8); 988 int i1 = hiByte >> 6; 989 long l1 = 1L << (hiByte & 077); 990 int i2 = (curChar & 0xff) >> 6; 991 long l2 = 1L << (curChar & 077); 992 do 993 { 994 switch(jjstateSet[--i]) 995 { 996 case 0: 997 if (jjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 75) 998 kind = 75; 999 break; 1000 default : break; 1001 } 1002 } while(i != startsAt); 1003 } 1004 if (kind != 0x7fffffff) 1005 { 1006 jjmatchedKind = kind; 1007 jjmatchedPos = curPos; 1008 kind = 0x7fffffff; 1009 } 1010 ++curPos; 1011 if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt))) 1012 return curPos; 1013 try { curChar = input_stream.readChar(); } 1014 catch(java.io.IOException e) { return curPos; } 1015 } 1016 } 1017 private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1) 1018 { 1019 switch (pos) 1020 { 1021 default : 1022 return -1; 1023 } 1024 } 1025 private final int jjStartNfa_1(int pos, long active0, long active1) 1026 { 1027 return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1), pos + 1); 1028 } 1029 private int jjMoveStringLiteralDfa0_1() 1030 { 1031 switch(curChar) 1032 { 1033 case 39: 1034 return jjStopAtPos(0, 73); 1035 default : 1036 return jjMoveNfa_1(0, 0); 1037 } 1038 } 1039 private int jjMoveNfa_1(int startState, int curPos) 1040 { 1041 int startsAt = 0; 1042 jjnewStateCnt = 6; 1043 int i = 1; 1044 jjstateSet[0] = startState; 1045 int kind = 0x7fffffff; 1046 for (;;) 1047 { 1048 if (++jjround == 0x7fffffff) 1049 ReInitRounds(); 1050 if (curChar < 64) 1051 { 1052 long l = 1L << curChar; 1053 do 1054 { 1055 switch(jjstateSet[--i]) 1056 { 1057 case 0: 1058 if ((0xffffff7fffffffffL & l) != 0L && kind > 72) 1059 kind = 72; 1060 break; 1061 case 1: 1062 if ((0x8400000000L & l) != 0L && kind > 71) 1063 kind = 71; 1064 break; 1065 case 2: 1066 if ((0xf000000000000L & l) != 0L) 1067 jjstateSet[jjnewStateCnt++] = 3; 1068 break; 1069 case 3: 1070 if ((0xff000000000000L & l) == 0L) 1071 break; 1072 if (kind > 71) 1073 kind = 71; 1074 jjstateSet[jjnewStateCnt++] = 4; 1075 break; 1076 case 4: 1077 if ((0xff000000000000L & l) != 0L && kind > 71) 1078 kind = 71; 1079 break; 1080 default : break; 1081 } 1082 } while(i != startsAt); 1083 } 1084 else if (curChar < 128) 1085 { 1086 long l = 1L << (curChar & 077); 1087 do 1088 { 1089 switch(jjstateSet[--i]) 1090 { 1091 case 0: 1092 if ((0xffffffffefffffffL & l) != 0L) 1093 { 1094 if (kind > 72) 1095 kind = 72; 1096 } 1097 else if (curChar == 92) 1098 jjAddStates(19, 21); 1099 break; 1100 case 1: 1101 if ((0x14404510000000L & l) != 0L && kind > 71) 1102 kind = 71; 1103 break; 1104 case 5: 1105 if ((0xffffffffefffffffL & l) != 0L && kind > 72) 1106 kind = 72; 1107 break; 1108 default : break; 1109 } 1110 } while(i != startsAt); 1111 } 1112 else 1113 { 1114 int hiByte = (int)(curChar >> 8); 1115 int i1 = hiByte >> 6; 1116 long l1 = 1L << (hiByte & 077); 1117 int i2 = (curChar & 0xff) >> 6; 1118 long l2 = 1L << (curChar & 077); 1119 do 1120 { 1121 switch(jjstateSet[--i]) 1122 { 1123 case 0: 1124 if (jjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 72) 1125 kind = 72; 1126 break; 1127 default : break; 1128 } 1129 } while(i != startsAt); 1130 } 1131 if (kind != 0x7fffffff) 1132 { 1133 jjmatchedKind = kind; 1134 jjmatchedPos = curPos; 1135 kind = 0x7fffffff; 1136 } 1137 ++curPos; 1138 if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt))) 1139 return curPos; 1140 try { curChar = input_stream.readChar(); } 1141 catch(java.io.IOException e) { return curPos; } 1142 } 1143 } 1144 private final int jjStopStringLiteralDfa_3(int pos, long active0, long active1) 1145 { 1146 switch (pos) 1147 { 1148 default : 1149 return -1; 1150 } 1151 } 1152 private final int jjStartNfa_3(int pos, long active0, long active1) 1153 { 1154 return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0, active1), pos + 1); 1155 } 1156 private int jjMoveStringLiteralDfa0_3() 1157 { 1158 switch(curChar) 1159 { 1160 case 34: 1161 return jjStopAtPos(0, 79); 1162 default : 1163 return jjMoveNfa_3(0, 0); 1164 } 1165 } 1166 private int jjMoveNfa_3(int startState, int curPos) 1167 { 1168 int startsAt = 0; 1169 jjnewStateCnt = 6; 1170 int i = 1; 1171 jjstateSet[0] = startState; 1172 int kind = 0x7fffffff; 1173 for (;;) 1174 { 1175 if (++jjround == 0x7fffffff) 1176 ReInitRounds(); 1177 if (curChar < 64) 1178 { 1179 long l = 1L << curChar; 1180 do 1181 { 1182 switch(jjstateSet[--i]) 1183 { 1184 case 0: 1185 if ((0xfffffffbffffffffL & l) != 0L && kind > 78) 1186 kind = 78; 1187 break; 1188 case 1: 1189 if ((0x8400000000L & l) != 0L && kind > 77) 1190 kind = 77; 1191 break; 1192 case 2: 1193 if ((0xf000000000000L & l) != 0L) 1194 jjstateSet[jjnewStateCnt++] = 3; 1195 break; 1196 case 3: 1197 if ((0xff000000000000L & l) == 0L) 1198 break; 1199 if (kind > 77) 1200 kind = 77; 1201 jjstateSet[jjnewStateCnt++] = 4; 1202 break; 1203 case 4: 1204 if ((0xff000000000000L & l) != 0L && kind > 77) 1205 kind = 77; 1206 break; 1207 default : break; 1208 } 1209 } while(i != startsAt); 1210 } 1211 else if (curChar < 128) 1212 { 1213 long l = 1L << (curChar & 077); 1214 do 1215 { 1216 switch(jjstateSet[--i]) 1217 { 1218 case 0: 1219 if ((0xffffffffefffffffL & l) != 0L) 1220 { 1221 if (kind > 78) 1222 kind = 78; 1223 } 1224 else if (curChar == 92) 1225 jjAddStates(19, 21); 1226 break; 1227 case 1: 1228 if ((0x14404510000000L & l) != 0L && kind > 77) 1229 kind = 77; 1230 break; 1231 case 5: 1232 if ((0xffffffffefffffffL & l) != 0L && kind > 78) 1233 kind = 78; 1234 break; 1235 default : break; 1236 } 1237 } while(i != startsAt); 1238 } 1239 else 1240 { 1241 int hiByte = (int)(curChar >> 8); 1242 int i1 = hiByte >> 6; 1243 long l1 = 1L << (hiByte & 077); 1244 int i2 = (curChar & 0xff) >> 6; 1245 long l2 = 1L << (curChar & 077); 1246 do 1247 { 1248 switch(jjstateSet[--i]) 1249 { 1250 case 0: 1251 if (jjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 78) 1252 kind = 78; 1253 break; 1254 default : break; 1255 } 1256 } while(i != startsAt); 1257 } 1258 if (kind != 0x7fffffff) 1259 { 1260 jjmatchedKind = kind; 1261 jjmatchedPos = curPos; 1262 kind = 0x7fffffff; 1263 } 1264 ++curPos; 1265 if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt))) 1266 return curPos; 1267 try { curChar = input_stream.readChar(); } 1268 catch(java.io.IOException e) { return curPos; } 1269 } 1270 } 1271 static final int[] jjnextStates = { 1272 15, 16, 18, 19, 22, 13, 24, 25, 7, 9, 10, 13, 17, 10, 13, 11, 1273 12, 20, 21, 1, 2, 3, 1274 }; 1275 private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) 1276 { 1277 switch(hiByte) 1278 { 1279 case 0: 1280 return ((jjbitVec2[i2] & l2) != 0L); 1281 case 48: 1282 return ((jjbitVec3[i2] & l2) != 0L); 1283 case 49: 1284 return ((jjbitVec4[i2] & l2) != 0L); 1285 case 51: 1286 return ((jjbitVec5[i2] & l2) != 0L); 1287 case 61: 1288 return ((jjbitVec6[i2] & l2) != 0L); 1289 default : 1290 if ((jjbitVec0[i1] & l1) != 0L) 1291 return true; 1292 return false; 1293 } 1294 } 1295 private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2) 1296 { 1297 switch(hiByte) 1298 { 1299 case 0: 1300 return ((jjbitVec8[i2] & l2) != 0L); 1301 default : 1302 if ((jjbitVec7[i1] & l1) != 0L) 1303 return true; 1304 return false; 1305 } 1306 } 1307 1308 /** Token literal values. */ 1309 public static final String[] jjstrLiteralImages = { 1310 "", "\54", "\75", "\77", "\72", "\174\174", "\157\162", "\46\46", 1311 "\141\156\144", "\174", "\142\157\162", "\136", "\170\157\162", "\46", "\142\141\156\144", 1312 "\75\75", "\145\161", "\41\75", "\156\145\161", "\74", "\154\164", "\76", "\147\164", 1313 "\74\75", "\154\164\145", "\76\75", "\147\164\145", "\151\156", "\156\157\164", 1314 "\74\74", "\163\150\154", "\76\76", "\163\150\162", "\76\76\76", "\165\163\150\162", 1315 "\53", "\55", "\52", "\57", "\45", "\176", "\41", 1316 "\151\156\163\164\141\156\143\145\157\146", "\56", "\50", "\51", "\164\162\165\145", "\146\141\154\163\145", 1317 "\156\165\154\154", "\43\164\150\151\163", "\43\162\157\157\164", "\43", "\133", "\135", "\173", 1318 "\175", "\100", "\156\145\167", "\44", null, null, null, null, null, null, null, null, 1319 null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1320 null, null, null, null, null, }; 1321 1322 /** Lexer state names. */ 1323 public static final String[] lexStateNames = { 1324 "DEFAULT", 1325 "WithinCharLiteral", 1326 "WithinBackCharLiteral", 1327 "WithinStringLiteral", 1328 }; 1329 1330 /** Lex State array. */ 1331 public static final int[] jjnewLexState = { 1332 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1333 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1334 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 1, 3, -1, -1, 0, -1, 1335 -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1, 1336 }; 1337 static final long[] jjtoToken = { 1338 0x7ffffffffffffffL, 0x39209L, 1339 }; 1340 static final long[] jjtoSkip = { 1341 0xf800000000000000L, 0x0L, 1342 }; 1343 static final long[] jjtoMore = { 1344 0x0L, 0x6df0L, 1345 }; 1346 protected JavaCharStream input_stream; 1347 private final int[] jjrounds = new int[27]; 1348 private final int[] jjstateSet = new int[54]; 1349 private final StringBuilder jjimage = new StringBuilder(); 1350 private StringBuilder image = jjimage; 1351 private int jjimageLen; 1352 private int lengthOfMatch; 1353 protected char curChar; 1354 /** Constructor. */ 1355 public OgnlParserTokenManager(JavaCharStream stream){ 1356 if (JavaCharStream.staticFlag) 1357 throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); 1358 input_stream = stream; 1359 } 1360 1361 /** Constructor. */ 1362 public OgnlParserTokenManager(JavaCharStream stream, int lexState){ 1363 this(stream); 1364 SwitchTo(lexState); 1365 } 1366 1367 /** Reinitialise parser. */ 1368 public void ReInit(JavaCharStream stream) 1369 { 1370 jjmatchedPos = jjnewStateCnt = 0; 1371 curLexState = defaultLexState; 1372 input_stream = stream; 1373 ReInitRounds(); 1374 } 1375 private void ReInitRounds() 1376 { 1377 int i; 1378 jjround = 0x80000001; 1379 for (i = 27; i-- > 0;) 1380 jjrounds[i] = 0x80000000; 1381 } 1382 1383 /** Reinitialise parser. */ 1384 public void ReInit(JavaCharStream stream, int lexState) 1385 { 1386 ReInit(stream); 1387 SwitchTo(lexState); 1388 } 1389 1390 /** Switch to specified lex state. */ 1391 public void SwitchTo(int lexState) 1392 { 1393 if (lexState >= 4 || lexState < 0) 1394 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); 1395 else 1396 curLexState = lexState; 1397 } 1398 1399 protected Token jjFillToken() 1400 { 1401 final Token t; 1402 final String curTokenImage; 1403 final int beginLine; 1404 final int endLine; 1405 final int beginColumn; 1406 final int endColumn; 1407 String im = jjstrLiteralImages[jjmatchedKind]; 1408 curTokenImage = (im == null) ? input_stream.GetImage() : im; 1409 beginLine = input_stream.getBeginLine(); 1410 beginColumn = input_stream.getBeginColumn(); 1411 endLine = input_stream.getEndLine(); 1412 endColumn = input_stream.getEndColumn(); 1413 t = Token.newToken(jjmatchedKind, curTokenImage); 1414 1415 t.beginLine = beginLine; 1416 t.endLine = endLine; 1417 t.beginColumn = beginColumn; 1418 t.endColumn = endColumn; 1419 1420 return t; 1421 } 1422 1423 int curLexState = 0; 1424 int defaultLexState = 0; 1425 int jjnewStateCnt; 1426 int jjround; 1427 int jjmatchedPos; 1428 int jjmatchedKind; 1429 1430 /** Get the next Token. */ 1431 public Token getNextToken() 1432 { 1433 Token matchedToken; 1434 int curPos = 0; 1435 1436 EOFLoop : 1437 for (;;) 1438 { 1439 try 1440 { 1441 curChar = input_stream.BeginToken(); 1442 } 1443 catch(java.io.IOException e) 1444 { 1445 jjmatchedKind = 0; 1446 matchedToken = jjFillToken(); 1447 return matchedToken; 1448 } 1449 image = jjimage; 1450 image.setLength(0); 1451 jjimageLen = 0; 1452 1453 for (;;) 1454 { 1455 switch(curLexState) 1456 { 1457 case 0: 1458 try { input_stream.backup(0); 1459 while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) 1460 curChar = input_stream.BeginToken(); 1461 } 1462 catch (java.io.IOException e1) { continue EOFLoop; } 1463 jjmatchedKind = 0x7fffffff; 1464 jjmatchedPos = 0; 1465 curPos = jjMoveStringLiteralDfa0_0(); 1466 break; 1467 case 1: 1468 jjmatchedKind = 0x7fffffff; 1469 jjmatchedPos = 0; 1470 curPos = jjMoveStringLiteralDfa0_1(); 1471 break; 1472 case 2: 1473 jjmatchedKind = 0x7fffffff; 1474 jjmatchedPos = 0; 1475 curPos = jjMoveStringLiteralDfa0_2(); 1476 break; 1477 case 3: 1478 jjmatchedKind = 0x7fffffff; 1479 jjmatchedPos = 0; 1480 curPos = jjMoveStringLiteralDfa0_3(); 1481 break; 1482 } 1483 if (jjmatchedKind != 0x7fffffff) 1484 { 1485 if (jjmatchedPos + 1 < curPos) 1486 input_stream.backup(curPos - jjmatchedPos - 1); 1487 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) 1488 { 1489 matchedToken = jjFillToken(); 1490 TokenLexicalActions(matchedToken); 1491 if (jjnewLexState[jjmatchedKind] != -1) 1492 curLexState = jjnewLexState[jjmatchedKind]; 1493 return matchedToken; 1494 } 1495 else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) 1496 { 1497 if (jjnewLexState[jjmatchedKind] != -1) 1498 curLexState = jjnewLexState[jjmatchedKind]; 1499 continue EOFLoop; 1500 } 1501 MoreLexicalActions(); 1502 if (jjnewLexState[jjmatchedKind] != -1) 1503 curLexState = jjnewLexState[jjmatchedKind]; 1504 curPos = 0; 1505 jjmatchedKind = 0x7fffffff; 1506 try { 1507 curChar = input_stream.readChar(); 1508 continue; 1509 } 1510 catch (java.io.IOException e1) { } 1511 } 1512 int error_line = input_stream.getEndLine(); 1513 int error_column = input_stream.getEndColumn(); 1514 String error_after = null; 1515 boolean EOFSeen = false; 1516 try { input_stream.readChar(); input_stream.backup(1); } 1517 catch (java.io.IOException e1) { 1518 EOFSeen = true; 1519 error_after = curPos <= 1 ? "" : input_stream.GetImage(); 1520 if (curChar == '\n' || curChar == '\r') { 1521 error_line++; 1522 error_column = 0; 1523 } 1524 else 1525 error_column++; 1526 } 1527 if (!EOFSeen) { 1528 input_stream.backup(1); 1529 error_after = curPos <= 1 ? "" : input_stream.GetImage(); 1530 } 1531 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); 1532 } 1533 } 1534 } 1535 1536 void MoreLexicalActions() 1537 { 1538 jjimageLen += (lengthOfMatch = jjmatchedPos + 1); 1539 switch(jjmatchedKind) 1540 { 1541 case 69 : 1542 image.append(input_stream.GetSuffix(jjimageLen)); 1543 jjimageLen = 0; 1544 stringBuilder = new StringBuilder(); 1545 break; 1546 case 70 : 1547 image.append(input_stream.GetSuffix(jjimageLen)); 1548 jjimageLen = 0; 1549 stringBuilder = new StringBuilder(); 1550 break; 1551 case 71 : 1552 image.append(input_stream.GetSuffix(jjimageLen)); 1553 jjimageLen = 0; 1554 charValue = escapeChar(); stringBuilder.append(charValue); 1555 break; 1556 case 72 : 1557 image.append(input_stream.GetSuffix(jjimageLen)); 1558 jjimageLen = 0; 1559 charValue = image.charAt( image.length()-1 ); stringBuilder.append(charValue); 1560 break; 1561 case 74 : 1562 image.append(input_stream.GetSuffix(jjimageLen)); 1563 jjimageLen = 0; 1564 charValue = escapeChar(); 1565 break; 1566 case 75 : 1567 image.append(input_stream.GetSuffix(jjimageLen)); 1568 jjimageLen = 0; 1569 charValue = image.charAt( image.length()-1 ); 1570 break; 1571 case 77 : 1572 image.append(input_stream.GetSuffix(jjimageLen)); 1573 jjimageLen = 0; 1574 stringBuilder.append( escapeChar() ); 1575 break; 1576 case 78 : 1577 image.append(input_stream.GetSuffix(jjimageLen)); 1578 jjimageLen = 0; 1579 stringBuilder.append( image.charAt(image.length()-1) ); 1580 break; 1581 default : 1582 break; 1583 } 1584 } 1585 void TokenLexicalActions(Token matchedToken) 1586 { 1587 switch(jjmatchedKind) 1588 { 1589 case 67 : 1590 image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); 1591 switch (image.charAt(1)) { 1592 case '^': literalValue = DynamicSubscript.first; break; 1593 case '|': literalValue = DynamicSubscript.mid; break; 1594 case '$': literalValue = DynamicSubscript.last; break; 1595 case '*': literalValue = DynamicSubscript.all; break; 1596 } 1597 break; 1598 case 73 : 1599 image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); 1600 if (stringBuilder.length() == 1) { 1601 literalValue = new Character( charValue ); 1602 } else { 1603 literalValue = stringBuilder.toString(); 1604 } 1605 break; 1606 case 76 : 1607 image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); 1608 literalValue = new Character( charValue ); 1609 break; 1610 case 79 : 1611 image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); 1612 literalValue = stringBuilder.toString(); 1613 break; 1614 case 80 : 1615 image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); 1616 literalValue = 1617 makeInt(); 1618 break; 1619 case 81 : 1620 image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); 1621 literalValue = makeFloat(); 1622 break; 1623 default : 1624 break; 1625 } 1626 } 1627 private void jjCheckNAdd(int state) 1628 { 1629 if (jjrounds[state] != jjround) 1630 { 1631 jjstateSet[jjnewStateCnt++] = state; 1632 jjrounds[state] = jjround; 1633 } 1634 } 1635 private void jjAddStates(int start, int end) 1636 { 1637 do { 1638 jjstateSet[jjnewStateCnt++] = jjnextStates[start]; 1639 } while (start++ != end); 1640 } 1641 private void jjCheckNAddTwoStates(int state1, int state2) 1642 { 1643 jjCheckNAdd(state1); 1644 jjCheckNAdd(state2); 1645 } 1646 1647 private void jjCheckNAddStates(int start, int end) 1648 { 1649 do { 1650 jjCheckNAdd(jjnextStates[start]); 1651 } while (start++ != end); 1652 } 1653 1654 }