1 package antlr; 3 4 import java.io.InputStream ; 5 6 import antlr.TokenStreamException; 7 import antlr.TokenStreamIOException; 8 import antlr.TokenStreamRecognitionException; 9 import antlr.CharStreamException; 10 import antlr.CharStreamIOException; 11 import antlr.ANTLRException; 12 13 import java.io.Reader ; 14 import java.util.Hashtable ; 15 16 import antlr.CharScanner; 17 import antlr.InputBuffer; 18 import antlr.ByteBuffer; 19 import antlr.CharBuffer; 20 import antlr.Token; 21 import antlr.CommonToken; 22 import antlr.RecognitionException; 23 import antlr.NoViableAltForCharException; 24 import antlr.MismatchedCharException; 25 import antlr.TokenStream; 26 import antlr.ANTLRHashString; 27 import antlr.LexerSharedInputState; 28 import antlr.collections.impl.BitSet; 29 import antlr.SemanticException; 30 31 public class ANTLRTokdefLexer extends antlr.CharScanner implements ANTLRTokdefParserTokenTypes, TokenStream { 32 public ANTLRTokdefLexer(InputStream in) { 33 this(new ByteBuffer(in)); 34 } 35 36 public ANTLRTokdefLexer(Reader in) { 37 this(new CharBuffer(in)); 38 } 39 40 public ANTLRTokdefLexer(InputBuffer ib) { 41 this(new LexerSharedInputState(ib)); 42 } 43 44 public ANTLRTokdefLexer(LexerSharedInputState state) { 45 super(state); 46 literals = new Hashtable (); 47 caseSensitiveLiterals = true; 48 setCaseSensitive(true); 49 } 50 51 public Token nextToken() throws TokenStreamException { 52 Token theRetToken = null; 53 tryAgain: 54 for (; ;) { 55 Token _token = null; 56 int _ttype = Token.INVALID_TYPE; 57 resetText(); 58 try { try { switch (LA(1)) { 61 case '\t': 62 case '\n': 63 case '\r': 64 case ' ': 65 { 66 mWS(true); 67 theRetToken = _returnToken; 68 break; 69 } 70 case '(': 71 { 72 mLPAREN(true); 73 theRetToken = _returnToken; 74 break; 75 } 76 case ')': 77 { 78 mRPAREN(true); 79 theRetToken = _returnToken; 80 break; 81 } 82 case '=': 83 { 84 mASSIGN(true); 85 theRetToken = _returnToken; 86 break; 87 } 88 case '"': 89 { 90 mSTRING(true); 91 theRetToken = _returnToken; 92 break; 93 } 94 case 'A': 95 case 'B': 96 case 'C': 97 case 'D': 98 case 'E': 99 case 'F': 100 case 'G': 101 case 'H': 102 case 'I': 103 case 'J': 104 case 'K': 105 case 'L': 106 case 'M': 107 case 'N': 108 case 'O': 109 case 'P': 110 case 'Q': 111 case 'R': 112 case 'S': 113 case 'T': 114 case 'U': 115 case 'V': 116 case 'W': 117 case 'X': 118 case 'Y': 119 case 'Z': 120 case 'a': 121 case 'b': 122 case 'c': 123 case 'd': 124 case 'e': 125 case 'f': 126 case 'g': 127 case 'h': 128 case 'i': 129 case 'j': 130 case 'k': 131 case 'l': 132 case 'm': 133 case 'n': 134 case 'o': 135 case 'p': 136 case 'q': 137 case 'r': 138 case 's': 139 case 't': 140 case 'u': 141 case 'v': 142 case 'w': 143 case 'x': 144 case 'y': 145 case 'z': 146 { 147 mID(true); 148 theRetToken = _returnToken; 149 break; 150 } 151 case '0': 152 case '1': 153 case '2': 154 case '3': 155 case '4': 156 case '5': 157 case '6': 158 case '7': 159 case '8': 160 case '9': 161 { 162 mINT(true); 163 theRetToken = _returnToken; 164 break; 165 } 166 default: 167 if ((LA(1) == '/') && (LA(2) == '/')) { 168 mSL_COMMENT(true); 169 theRetToken = _returnToken; 170 } 171 else if ((LA(1) == '/') && (LA(2) == '*')) { 172 mML_COMMENT(true); 173 theRetToken = _returnToken; 174 } 175 else { 176 if (LA(1) == EOF_CHAR) { 177 uponEOF(); 178 _returnToken = makeToken(Token.EOF_TYPE); 179 } 180 else { 181 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 182 } 183 } 184 } 185 if (_returnToken == null) continue tryAgain; _ttype = _returnToken.getType(); 187 _returnToken.setType(_ttype); 188 return _returnToken; 189 } 190 catch (RecognitionException e) { 191 throw new TokenStreamRecognitionException(e); 192 } 193 } 194 catch (CharStreamException cse) { 195 if (cse instanceof CharStreamIOException) { 196 throw new TokenStreamIOException(((CharStreamIOException)cse).io); 197 } 198 else { 199 throw new TokenStreamException(cse.getMessage()); 200 } 201 } 202 } 203 } 204 205 public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 206 int _ttype; 207 Token _token = null; 208 int _begin = text.length(); 209 _ttype = WS; 210 int _saveIndex; 211 212 { 213 switch (LA(1)) { 214 case ' ': 215 { 216 match(' '); 217 break; 218 } 219 case '\t': 220 { 221 match('\t'); 222 break; 223 } 224 case '\r': 225 { 226 match('\r'); 227 { 228 if ((LA(1) == '\n')) { 229 match('\n'); 230 } 231 else { 232 } 233 234 } 235 newline(); 236 break; 237 } 238 case '\n': 239 { 240 match('\n'); 241 newline(); 242 break; 243 } 244 default: 245 { 246 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 247 } 248 } 249 } 250 _ttype = Token.SKIP; 251 if (_createToken && _token == null && _ttype != Token.SKIP) { 252 _token = makeToken(_ttype); 253 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 254 } 255 _returnToken = _token; 256 } 257 258 public final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 259 int _ttype; 260 Token _token = null; 261 int _begin = text.length(); 262 _ttype = SL_COMMENT; 263 int _saveIndex; 264 265 match("//"); 266 { 267 _loop12: 268 do { 269 if ((_tokenSet_0.member(LA(1)))) { 270 { 271 match(_tokenSet_0); 272 } 273 } 274 else { 275 break _loop12; 276 } 277 278 } while (true); 279 } 280 { 281 switch (LA(1)) { 282 case '\n': 283 { 284 match('\n'); 285 break; 286 } 287 case '\r': 288 { 289 match('\r'); 290 { 291 if ((LA(1) == '\n')) { 292 match('\n'); 293 } 294 else { 295 } 296 297 } 298 break; 299 } 300 default: 301 { 302 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 303 } 304 } 305 } 306 _ttype = Token.SKIP; 307 newline(); 308 if (_createToken && _token == null && _ttype != Token.SKIP) { 309 _token = makeToken(_ttype); 310 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 311 } 312 _returnToken = _token; 313 } 314 315 public final void mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 316 int _ttype; 317 Token _token = null; 318 int _begin = text.length(); 319 _ttype = ML_COMMENT; 320 int _saveIndex; 321 322 match("/*"); 323 { 324 _loop17: 325 do { 326 switch (LA(1)) { 327 case '\n': 328 { 329 match('\n'); 330 newline(); 331 break; 332 } 333 case '\u0003': 334 case '\u0004': 335 case '\u0005': 336 case '\u0006': 337 case '\u0007': 338 case '\u0008': 339 case '\t': 340 case '\u000b': 341 case '\u000c': 342 case '\r': 343 case '\u000e': 344 case '\u000f': 345 case '\u0010': 346 case '\u0011': 347 case '\u0012': 348 case '\u0013': 349 case '\u0014': 350 case '\u0015': 351 case '\u0016': 352 case '\u0017': 353 case '\u0018': 354 case '\u0019': 355 case '\u001a': 356 case '\u001b': 357 case '\u001c': 358 case '\u001d': 359 case '\u001e': 360 case '\u001f': 361 case ' ': 362 case '!': 363 case '"': 364 case '#': 365 case '$': 366 case '%': 367 case '&': 368 case '\'': 369 case '(': 370 case ')': 371 case '+': 372 case ',': 373 case '-': 374 case '.': 375 case '/': 376 case '0': 377 case '1': 378 case '2': 379 case '3': 380 case '4': 381 case '5': 382 case '6': 383 case '7': 384 case '8': 385 case '9': 386 case ':': 387 case ';': 388 case '<': 389 case '=': 390 case '>': 391 case '?': 392 case '@': 393 case 'A': 394 case 'B': 395 case 'C': 396 case 'D': 397 case 'E': 398 case 'F': 399 case 'G': 400 case 'H': 401 case 'I': 402 case 'J': 403 case 'K': 404 case 'L': 405 case 'M': 406 case 'N': 407 case 'O': 408 case 'P': 409 case 'Q': 410 case 'R': 411 case 'S': 412 case 'T': 413 case 'U': 414 case 'V': 415 case 'W': 416 case 'X': 417 case 'Y': 418 case 'Z': 419 case '[': 420 case '\\': 421 case ']': 422 case '^': 423 case '_': 424 case '`': 425 case 'a': 426 case 'b': 427 case 'c': 428 case 'd': 429 case 'e': 430 case 'f': 431 case 'g': 432 case 'h': 433 case 'i': 434 case 'j': 435 case 'k': 436 case 'l': 437 case 'm': 438 case 'n': 439 case 'o': 440 case 'p': 441 case 'q': 442 case 'r': 443 case 's': 444 case 't': 445 case 'u': 446 case 'v': 447 case 'w': 448 case 'x': 449 case 'y': 450 case 'z': 451 case '{': 452 case '|': 453 case '}': 454 case '~': 455 { 456 matchNot('*'); 457 break; 458 } 459 default: 460 if ((LA(1) == '*') && (_tokenSet_1.member(LA(2)))) { 461 match('*'); 462 matchNot('/'); 463 } 464 else { 465 break _loop17; 466 } 467 } 468 } while (true); 469 } 470 match("*/"); 471 _ttype = Token.SKIP; 472 if (_createToken && _token == null && _ttype != Token.SKIP) { 473 _token = makeToken(_ttype); 474 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 475 } 476 _returnToken = _token; 477 } 478 479 public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 480 int _ttype; 481 Token _token = null; 482 int _begin = text.length(); 483 _ttype = LPAREN; 484 int _saveIndex; 485 486 match('('); 487 if (_createToken && _token == null && _ttype != Token.SKIP) { 488 _token = makeToken(_ttype); 489 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 490 } 491 _returnToken = _token; 492 } 493 494 public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 495 int _ttype; 496 Token _token = null; 497 int _begin = text.length(); 498 _ttype = RPAREN; 499 int _saveIndex; 500 501 match(')'); 502 if (_createToken && _token == null && _ttype != Token.SKIP) { 503 _token = makeToken(_ttype); 504 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 505 } 506 _returnToken = _token; 507 } 508 509 public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 510 int _ttype; 511 Token _token = null; 512 int _begin = text.length(); 513 _ttype = ASSIGN; 514 int _saveIndex; 515 516 match('='); 517 if (_createToken && _token == null && _ttype != Token.SKIP) { 518 _token = makeToken(_ttype); 519 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 520 } 521 _returnToken = _token; 522 } 523 524 public final void mSTRING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 525 int _ttype; 526 Token _token = null; 527 int _begin = text.length(); 528 _ttype = STRING; 529 int _saveIndex; 530 531 match('"'); 532 { 533 _loop23: 534 do { 535 switch (LA(1)) { 536 case '\\': 537 { 538 mESC(false); 539 break; 540 } 541 case '\u0003': 542 case '\u0004': 543 case '\u0005': 544 case '\u0006': 545 case '\u0007': 546 case '\u0008': 547 case '\t': 548 case '\n': 549 case '\u000b': 550 case '\u000c': 551 case '\r': 552 case '\u000e': 553 case '\u000f': 554 case '\u0010': 555 case '\u0011': 556 case '\u0012': 557 case '\u0013': 558 case '\u0014': 559 case '\u0015': 560 case '\u0016': 561 case '\u0017': 562 case '\u0018': 563 case '\u0019': 564 case '\u001a': 565 case '\u001b': 566 case '\u001c': 567 case '\u001d': 568 case '\u001e': 569 case '\u001f': 570 case ' ': 571 case '!': 572 case '#': 573 case '$': 574 case '%': 575 case '&': 576 case '\'': 577 case '(': 578 case ')': 579 case '*': 580 case '+': 581 case ',': 582 case '-': 583 case '.': 584 case '/': 585 case '0': 586 case '1': 587 case '2': 588 case '3': 589 case '4': 590 case '5': 591 case '6': 592 case '7': 593 case '8': 594 case '9': 595 case ':': 596 case ';': 597 case '<': 598 case '=': 599 case '>': 600 case '?': 601 case '@': 602 case 'A': 603 case 'B': 604 case 'C': 605 case 'D': 606 case 'E': 607 case 'F': 608 case 'G': 609 case 'H': 610 case 'I': 611 case 'J': 612 case 'K': 613 case 'L': 614 case 'M': 615 case 'N': 616 case 'O': 617 case 'P': 618 case 'Q': 619 case 'R': 620 case 'S': 621 case 'T': 622 case 'U': 623 case 'V': 624 case 'W': 625 case 'X': 626 case 'Y': 627 case 'Z': 628 case '[': 629 case ']': 630 case '^': 631 case '_': 632 case '`': 633 case 'a': 634 case 'b': 635 case 'c': 636 case 'd': 637 case 'e': 638 case 'f': 639 case 'g': 640 case 'h': 641 case 'i': 642 case 'j': 643 case 'k': 644 case 'l': 645 case 'm': 646 case 'n': 647 case 'o': 648 case 'p': 649 case 'q': 650 case 'r': 651 case 's': 652 case 't': 653 case 'u': 654 case 'v': 655 case 'w': 656 case 'x': 657 case 'y': 658 case 'z': 659 case '{': 660 case '|': 661 case '}': 662 case '~': 663 { 664 matchNot('"'); 665 break; 666 } 667 default: 668 { 669 break _loop23; 670 } 671 } 672 } while (true); 673 } 674 match('"'); 675 if (_createToken && _token == null && _ttype != Token.SKIP) { 676 _token = makeToken(_ttype); 677 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 678 } 679 _returnToken = _token; 680 } 681 682 protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 683 int _ttype; 684 Token _token = null; 685 int _begin = text.length(); 686 _ttype = ESC; 687 int _saveIndex; 688 689 match('\\'); 690 { 691 switch (LA(1)) { 692 case 'n': 693 { 694 match('n'); 695 break; 696 } 697 case 'r': 698 { 699 match('r'); 700 break; 701 } 702 case 't': 703 { 704 match('t'); 705 break; 706 } 707 case 'b': 708 { 709 match('b'); 710 break; 711 } 712 case 'f': 713 { 714 match('f'); 715 break; 716 } 717 case '"': 718 { 719 match('"'); 720 break; 721 } 722 case '\'': 723 { 724 match('\''); 725 break; 726 } 727 case '\\': 728 { 729 match('\\'); 730 break; 731 } 732 case '0': 733 case '1': 734 case '2': 735 case '3': 736 { 737 { 738 matchRange('0', '3'); 739 } 740 { 741 if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) { 742 mDIGIT(false); 743 { 744 if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) { 745 mDIGIT(false); 746 } 747 else if (((LA(1) >= '\u0003' && LA(1) <= '~')) && (true)) { 748 } 749 else { 750 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 751 } 752 753 } 754 } 755 else if (((LA(1) >= '\u0003' && LA(1) <= '~')) && (true)) { 756 } 757 else { 758 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 759 } 760 761 } 762 break; 763 } 764 case '4': 765 case '5': 766 case '6': 767 case '7': 768 { 769 { 770 matchRange('4', '7'); 771 } 772 { 773 if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '~'))) { 774 mDIGIT(false); 775 } 776 else if (((LA(1) >= '\u0003' && LA(1) <= '~')) && (true)) { 777 } 778 else { 779 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 780 } 781 782 } 783 break; 784 } 785 case 'u': 786 { 787 match('u'); 788 mXDIGIT(false); 789 mXDIGIT(false); 790 mXDIGIT(false); 791 mXDIGIT(false); 792 break; 793 } 794 default: 795 { 796 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 797 } 798 } 799 } 800 if (_createToken && _token == null && _ttype != Token.SKIP) { 801 _token = makeToken(_ttype); 802 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 803 } 804 _returnToken = _token; 805 } 806 807 protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 808 int _ttype; 809 Token _token = null; 810 int _begin = text.length(); 811 _ttype = DIGIT; 812 int _saveIndex; 813 814 matchRange('0', '9'); 815 if (_createToken && _token == null && _ttype != Token.SKIP) { 816 _token = makeToken(_ttype); 817 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 818 } 819 _returnToken = _token; 820 } 821 822 protected final void mXDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 823 int _ttype; 824 Token _token = null; 825 int _begin = text.length(); 826 _ttype = XDIGIT; 827 int _saveIndex; 828 829 switch (LA(1)) { 830 case '0': 831 case '1': 832 case '2': 833 case '3': 834 case '4': 835 case '5': 836 case '6': 837 case '7': 838 case '8': 839 case '9': 840 { 841 matchRange('0', '9'); 842 break; 843 } 844 case 'a': 845 case 'b': 846 case 'c': 847 case 'd': 848 case 'e': 849 case 'f': 850 { 851 matchRange('a', 'f'); 852 break; 853 } 854 case 'A': 855 case 'B': 856 case 'C': 857 case 'D': 858 case 'E': 859 case 'F': 860 { 861 matchRange('A', 'F'); 862 break; 863 } 864 default: 865 { 866 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 867 } 868 } 869 if (_createToken && _token == null && _ttype != Token.SKIP) { 870 _token = makeToken(_ttype); 871 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 872 } 873 _returnToken = _token; 874 } 875 876 protected final void mVOCAB(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 877 int _ttype; 878 Token _token = null; 879 int _begin = text.length(); 880 _ttype = VOCAB; 881 int _saveIndex; 882 883 matchRange('\3', '\176'); 884 if (_createToken && _token == null && _ttype != Token.SKIP) { 885 _token = makeToken(_ttype); 886 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 887 } 888 _returnToken = _token; 889 } 890 891 public final void mID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 892 int _ttype; 893 Token _token = null; 894 int _begin = text.length(); 895 _ttype = ID; 896 int _saveIndex; 897 898 { 899 switch (LA(1)) { 900 case 'a': 901 case 'b': 902 case 'c': 903 case 'd': 904 case 'e': 905 case 'f': 906 case 'g': 907 case 'h': 908 case 'i': 909 case 'j': 910 case 'k': 911 case 'l': 912 case 'm': 913 case 'n': 914 case 'o': 915 case 'p': 916 case 'q': 917 case 'r': 918 case 's': 919 case 't': 920 case 'u': 921 case 'v': 922 case 'w': 923 case 'x': 924 case 'y': 925 case 'z': 926 { 927 matchRange('a', 'z'); 928 break; 929 } 930 case 'A': 931 case 'B': 932 case 'C': 933 case 'D': 934 case 'E': 935 case 'F': 936 case 'G': 937 case 'H': 938 case 'I': 939 case 'J': 940 case 'K': 941 case 'L': 942 case 'M': 943 case 'N': 944 case 'O': 945 case 'P': 946 case 'Q': 947 case 'R': 948 case 'S': 949 case 'T': 950 case 'U': 951 case 'V': 952 case 'W': 953 case 'X': 954 case 'Y': 955 case 'Z': 956 { 957 matchRange('A', 'Z'); 958 break; 959 } 960 default: 961 { 962 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 963 } 964 } 965 } 966 { 967 _loop37: 968 do { 969 switch (LA(1)) { 970 case 'a': 971 case 'b': 972 case 'c': 973 case 'd': 974 case 'e': 975 case 'f': 976 case 'g': 977 case 'h': 978 case 'i': 979 case 'j': 980 case 'k': 981 case 'l': 982 case 'm': 983 case 'n': 984 case 'o': 985 case 'p': 986 case 'q': 987 case 'r': 988 case 's': 989 case 't': 990 case 'u': 991 case 'v': 992 case 'w': 993 case 'x': 994 case 'y': 995 case 'z': 996 { 997 matchRange('a', 'z'); 998 break; 999 } 1000 case 'A': 1001 case 'B': 1002 case 'C': 1003 case 'D': 1004 case 'E': 1005 case 'F': 1006 case 'G': 1007 case 'H': 1008 case 'I': 1009 case 'J': 1010 case 'K': 1011 case 'L': 1012 case 'M': 1013 case 'N': 1014 case 'O': 1015 case 'P': 1016 case 'Q': 1017 case 'R': 1018 case 'S': 1019 case 'T': 1020 case 'U': 1021 case 'V': 1022 case 'W': 1023 case 'X': 1024 case 'Y': 1025 case 'Z': 1026 { 1027 matchRange('A', 'Z'); 1028 break; 1029 } 1030 case '_': 1031 { 1032 match('_'); 1033 break; 1034 } 1035 case '0': 1036 case '1': 1037 case '2': 1038 case '3': 1039 case '4': 1040 case '5': 1041 case '6': 1042 case '7': 1043 case '8': 1044 case '9': 1045 { 1046 matchRange('0', '9'); 1047 break; 1048 } 1049 default: 1050 { 1051 break _loop37; 1052 } 1053 } 1054 } while (true); 1055 } 1056 if (_createToken && _token == null && _ttype != Token.SKIP) { 1057 _token = makeToken(_ttype); 1058 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 1059 } 1060 _returnToken = _token; 1061 } 1062 1063 public final void mINT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1064 int _ttype; 1065 Token _token = null; 1066 int _begin = text.length(); 1067 _ttype = INT; 1068 int _saveIndex; 1069 1070 { 1071 int _cnt40 = 0; 1072 _loop40: 1073 do { 1074 if (((LA(1) >= '0' && LA(1) <= '9'))) { 1075 mDIGIT(false); 1076 } 1077 else { 1078 if (_cnt40 >= 1) { 1079 break _loop40; 1080 } 1081 else { 1082 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1083 } 1084 } 1085 1086 _cnt40++; 1087 } while (true); 1088 } 1089 if (_createToken && _token == null && _ttype != Token.SKIP) { 1090 _token = makeToken(_ttype); 1091 _token.setText(new String (text.getBuffer(), _begin, text.length() - _begin)); 1092 } 1093 _returnToken = _token; 1094 } 1095 1096 1097 private static final long _tokenSet_0_data_[] = {-9224L, 9223372036854775807L, 0L, 0L}; 1098 public static final BitSet _tokenSet_0 = new BitSet(_tokenSet_0_data_); 1099 private static final long _tokenSet_1_data_[] = {-140737488355336L, 9223372036854775807L, 0L, 0L}; 1100 public static final BitSet _tokenSet_1 = new BitSet(_tokenSet_1_data_); 1101 1102} 1103
| Popular Tags
|