1 3 package com.hp.hpl.jena.n3 ; 4 import antlr.TokenStreamRecognitionException ; 5 6 import java.io.InputStream ; 7 import antlr.TokenStreamException; 8 import antlr.TokenStreamIOException; 9 import antlr.CharStreamException; 10 import antlr.CharStreamIOException; 11 import java.io.Reader ; 12 import java.util.Hashtable ; 13 import antlr.InputBuffer; 14 import antlr.ByteBuffer; 15 import antlr.CharBuffer; 16 import antlr.Token; 17 import antlr.RecognitionException; 18 import antlr.NoViableAltForCharException; 19 import antlr.TokenStream; 20 import antlr.LexerSharedInputState; 21 import antlr.collections.impl.BitSet; 22 23 public class N3AntlrLexer extends antlr.CharScanner implements N3AntlrParserTokenTypes, TokenStream 24 { 25 public N3AntlrLexer(InputStream in) { 26 this(new ByteBuffer(in)); 27 } 28 public N3AntlrLexer(Reader in) { 29 this(new CharBuffer(in)); 30 } 31 public N3AntlrLexer(InputBuffer ib) { 32 this(new LexerSharedInputState(ib)); 33 } 34 public N3AntlrLexer(LexerSharedInputState state) { 35 super(state); 36 caseSensitiveLiterals = true; 37 setCaseSensitive(true); 38 literals = new Hashtable (); 39 } 40 41 public Token nextToken() throws TokenStreamException { 42 Token theRetToken=null; 43 tryAgain: 44 for (;;) { 45 Token _token = null; 46 int _ttype = Token.INVALID_TYPE; 47 resetText(); 48 try { try { switch ( LA(1)) { 51 case '?': 52 { 53 mUVAR(true); 54 theRetToken=_returnToken; 55 break; 56 } 57 case '"': case '\'': 58 { 59 mSTRING(true); 60 theRetToken=_returnToken; 61 break; 62 } 63 case '.': 64 { 65 mSEP_OR_PATH(true); 66 theRetToken=_returnToken; 67 break; 68 } 69 case '(': 70 { 71 mLPAREN(true); 72 theRetToken=_returnToken; 73 break; 74 } 75 case ')': 76 { 77 mRPAREN(true); 78 theRetToken=_returnToken; 79 break; 80 } 81 case '[': 82 { 83 mLBRACK(true); 84 theRetToken=_returnToken; 85 break; 86 } 87 case ']': 88 { 89 mRBRACK(true); 90 theRetToken=_returnToken; 91 break; 92 } 93 case '{': 94 { 95 mLCURLY(true); 96 theRetToken=_returnToken; 97 break; 98 } 99 case '}': 100 { 101 mRCURLY(true); 102 theRetToken=_returnToken; 103 break; 104 } 105 case ';': 106 { 107 mSEMI(true); 108 theRetToken=_returnToken; 109 break; 110 } 111 case ',': 112 { 113 mCOMMA(true); 114 theRetToken=_returnToken; 115 break; 116 } 117 case '!': 118 { 119 mPATH(true); 120 theRetToken=_returnToken; 121 break; 122 } 123 case '#': 124 { 125 mSL_COMMENT(true); 126 theRetToken=_returnToken; 127 break; 128 } 129 case '\t': case '\n': case '\u000c': case '\r': 130 case ' ': 131 { 132 mWS(true); 133 theRetToken=_returnToken; 134 break; 135 } 136 default: 137 if ((LA(1)=='<') && (_tokenSet_0.member(LA(2)))) { 138 mURI_OR_IMPLIES(true); 139 theRetToken=_returnToken; 140 } 141 else if ((LA(1)=='@') && (_tokenSet_1.member(LA(2)))) { 142 mAT_WORD(true); 143 theRetToken=_returnToken; 144 } 145 else if ((LA(1)=='^') && (LA(2)=='^')) { 146 mDATATYPE(true); 147 theRetToken=_returnToken; 148 } 149 else if ((LA(1)=='=') && (LA(2)=='>')) { 150 mARROW_R(true); 151 theRetToken=_returnToken; 152 } 153 else if ((LA(1)=='>') && (LA(2)=='-')) { 154 mARROW_PATH_L(true); 155 theRetToken=_returnToken; 156 } 157 else if ((LA(1)=='-') && (LA(2)=='>')) { 158 mARROW_PATH_R(true); 159 theRetToken=_returnToken; 160 } 161 else if ((_tokenSet_2.member(LA(1))) && (true)) { 162 mTHING(true); 163 theRetToken=_returnToken; 164 } 165 else if ((LA(1)=='<') && (true)) { 166 mLANGLE(true); 167 theRetToken=_returnToken; 168 } 169 else if ((LA(1)=='>') && (true)) { 170 mRANGLE(true); 171 theRetToken=_returnToken; 172 } 173 else if ((LA(1)=='@') && (true)) { 174 mAT(true); 175 theRetToken=_returnToken; 176 } 177 else if ((LA(1)=='^') && (true)) { 178 mRPATH(true); 179 theRetToken=_returnToken; 180 } 181 else if ((LA(1)=='=') && (true)) { 182 mEQUAL(true); 183 theRetToken=_returnToken; 184 } 185 else { 186 if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);} 187 else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} 188 } 189 } 190 if ( _returnToken==null ) continue tryAgain; _ttype = _returnToken.getType(); 192 _ttype = testLiteralsTable(_ttype); 193 _returnToken.setType(_ttype); 194 return _returnToken; 195 } 196 catch (RecognitionException e) { 197 throw new TokenStreamRecognitionException(e); 198 } 199 } 200 catch (CharStreamException cse) { 201 if ( cse instanceof CharStreamIOException ) { 202 throw new TokenStreamIOException(((CharStreamIOException)cse).io); 203 } 204 else { 205 throw new TokenStreamException(cse.getMessage()); 206 } 207 } 208 } 209 } 210 211 public final void mTHING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 212 int _ttype; Token _token=null; int _begin=text.length(); 213 _ttype = THING; 214 int _saveIndex; 215 216 boolean synPredMatched61 = false; 217 if (((LA(1)=='h') && (LA(2)=='a') && (LA(3)=='s'))) { 218 int _m61 = mark(); 219 synPredMatched61 = true; 220 inputState.guessing++; 221 try { 222 { 223 match("has"); 224 mNON_ANC(false); 225 } 226 } 227 catch (RecognitionException pe) { 228 synPredMatched61 = false; 229 } 230 rewind(_m61); 231 inputState.guessing--; 232 } 233 if ( synPredMatched61 ) { 234 match("has"); 235 if ( inputState.guessing==0 ) { 236 _ttype = KW_HAS ; 237 } 238 } 239 else { 240 boolean synPredMatched65 = false; 241 if (((LA(1)=='t') && (LA(2)=='h') && (LA(3)=='i'))) { 242 int _m65 = mark(); 243 synPredMatched65 = true; 244 inputState.guessing++; 245 try { 246 { 247 match("this"); 248 mNON_ANC(false); 249 } 250 } 251 catch (RecognitionException pe) { 252 synPredMatched65 = false; 253 } 254 rewind(_m65); 255 inputState.guessing--; 256 } 257 if ( synPredMatched65 ) { 258 match("this"); 259 if ( inputState.guessing==0 ) { 260 _ttype = KW_THIS ; 261 } 262 } 263 else { 264 boolean synPredMatched57 = false; 265 if (((LA(1)==':') && (LA(2)=='-') && (true))) { 266 int _m57 = mark(); 267 synPredMatched57 = true; 268 inputState.guessing++; 269 try { 270 { 271 mCOLON(false); 272 match('-'); 273 } 274 } 275 catch (RecognitionException pe) { 276 synPredMatched57 = false; 277 } 278 rewind(_m57); 279 inputState.guessing--; 280 } 281 if ( synPredMatched57 ) { 282 match(":-"); 283 if ( inputState.guessing==0 ) { 284 _ttype = NAME_OP ; 285 } 286 } 287 else { 288 boolean synPredMatched63 = false; 289 if (((LA(1)=='o') && (LA(2)=='f') && (true))) { 290 int _m63 = mark(); 291 synPredMatched63 = true; 292 inputState.guessing++; 293 try { 294 { 295 match("of"); 296 mNON_ANC(false); 297 } 298 } 299 catch (RecognitionException pe) { 300 synPredMatched63 = false; 301 } 302 rewind(_m63); 303 inputState.guessing--; 304 } 305 if ( synPredMatched63 ) { 306 match("of"); 307 if ( inputState.guessing==0 ) { 308 _ttype = KW_OF ; 309 } 310 } 311 else { 312 boolean synPredMatched69 = false; 313 if (((LA(1)=='i') && (LA(2)=='s') && (true))) { 314 int _m69 = mark(); 315 synPredMatched69 = true; 316 inputState.guessing++; 317 try { 318 { 319 match("is"); 320 mNON_ANC(false); 321 } 322 } 323 catch (RecognitionException pe) { 324 synPredMatched69 = false; 325 } 326 rewind(_m69); 327 inputState.guessing--; 328 } 329 if ( synPredMatched69 ) { 330 match("is"); 331 if ( inputState.guessing==0 ) { 332 _ttype = KW_IS ; 333 } 334 } 335 else { 336 boolean synPredMatched49 = false; 337 if (((_tokenSet_3.member(LA(1))) && (true) && (true))) { 338 int _m49 = mark(); 339 synPredMatched49 = true; 340 inputState.guessing++; 341 try { 342 { 343 mNSNAME(false); 344 mCOLON(false); 345 mLNAME(false); 346 } 347 } 348 catch (RecognitionException pe) { 349 synPredMatched49 = false; 350 } 351 rewind(_m49); 352 inputState.guessing--; 353 } 354 if ( synPredMatched49 ) { 355 mNSNAME(false); 356 mCOLON(false); 357 mLNAME(false); 358 if ( inputState.guessing==0 ) { 359 _ttype = QNAME ; 360 } 361 } 362 else { 363 boolean synPredMatched51 = false; 364 if (((LA(1)==':') && (true) && (true))) { 365 int _m51 = mark(); 366 synPredMatched51 = true; 367 inputState.guessing++; 368 try { 369 { 370 mCOLON(false); 371 mLNAME(false); 372 } 373 } 374 catch (RecognitionException pe) { 375 synPredMatched51 = false; 376 } 377 rewind(_m51); 378 inputState.guessing--; 379 } 380 if ( synPredMatched51 ) { 381 mCOLON(false); 382 mLNAME(false); 383 if ( inputState.guessing==0 ) { 384 _ttype = QNAME ; 385 } 386 } 387 else { 388 boolean synPredMatched53 = false; 389 if (((_tokenSet_3.member(LA(1))) && (true) && (true))) { 390 int _m53 = mark(); 391 synPredMatched53 = true; 392 inputState.guessing++; 393 try { 394 { 395 mNSNAME(false); 396 mCOLON(false); 397 } 398 } 399 catch (RecognitionException pe) { 400 synPredMatched53 = false; 401 } 402 rewind(_m53); 403 inputState.guessing--; 404 } 405 if ( synPredMatched53 ) { 406 mNSNAME(false); 407 mCOLON(false); 408 if ( inputState.guessing==0 ) { 409 _ttype = QNAME ; 410 } 411 } 412 else { 413 boolean synPredMatched55 = false; 414 if (((LA(1)==':') && (true) && (true))) { 415 int _m55 = mark(); 416 synPredMatched55 = true; 417 inputState.guessing++; 418 try { 419 { 420 mCOLON(false); 421 } 422 } 423 catch (RecognitionException pe) { 424 synPredMatched55 = false; 425 } 426 rewind(_m55); 427 inputState.guessing--; 428 } 429 if ( synPredMatched55 ) { 430 mCOLON(false); 431 if ( inputState.guessing==0 ) { 432 _ttype = QNAME ; 433 } 434 } 435 else { 436 boolean synPredMatched59 = false; 437 if (((_tokenSet_4.member(LA(1))) && (true) && (true))) { 438 int _m59 = mark(); 439 synPredMatched59 = true; 440 inputState.guessing++; 441 try { 442 { 443 mNUMBER(false); 444 } 445 } 446 catch (RecognitionException pe) { 447 synPredMatched59 = false; 448 } 449 rewind(_m59); 450 inputState.guessing--; 451 } 452 if ( synPredMatched59 ) { 453 mNUMBER(false); 454 if ( inputState.guessing==0 ) { 455 _ttype = NUMBER ; 456 } 457 } 458 else { 459 boolean synPredMatched67 = false; 460 if (((LA(1)=='a') && (true) && (true))) { 461 int _m67 = mark(); 462 synPredMatched67 = true; 463 inputState.guessing++; 464 try { 465 { 466 match("a"); 467 mNON_ANC(false); 468 } 469 } 470 catch (RecognitionException pe) { 471 synPredMatched67 = false; 472 } 473 rewind(_m67); 474 inputState.guessing--; 475 } 476 if ( synPredMatched67 ) { 477 match("a"); 478 if ( inputState.guessing==0 ) { 479 _ttype = KW_A ; 480 } 481 } 482 else { 483 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 484 } 485 }}}}}}}}}} 486 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 487 _token = makeToken(_ttype); 488 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 489 } 490 _returnToken = _token; 491 } 492 493 protected final void mNSNAME(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 494 int _ttype; Token _token=null; int _begin=text.length(); 495 _ttype = NSNAME; 496 int _saveIndex; 497 498 mXNAME(false); 499 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 500 _token = makeToken(_ttype); 501 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 502 } 503 _returnToken = _token; 504 } 505 506 protected final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 507 int _ttype; Token _token=null; int _begin=text.length(); 508 _ttype = COLON; 509 int _saveIndex; 510 511 match(':'); 512 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 513 _token = makeToken(_ttype); 514 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 515 } 516 _returnToken = _token; 517 } 518 519 protected final void mLNAME(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 520 int _ttype; Token _token=null; int _begin=text.length(); 521 _ttype = LNAME; 522 int _saveIndex; 523 524 mXNAME(false); 525 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 526 _token = makeToken(_ttype); 527 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 528 } 529 _returnToken = _token; 530 } 531 532 protected final void mNUMBER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 533 int _ttype; Token _token=null; int _begin=text.length(); 534 _ttype = NUMBER; 535 int _saveIndex; 536 537 { 538 switch ( LA(1)) { 539 case '+': 540 { 541 match('+'); 542 break; 543 } 544 case '-': 545 { 546 match('-'); 547 break; 548 } 549 case '0': case '1': case '2': case '3': 550 case '4': case '5': case '6': case '7': 551 case '8': case '9': 552 { 553 break; 554 } 555 default: 556 { 557 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 558 } 559 } 560 } 561 { 562 int _cnt117=0; 563 _loop117: 564 do { 565 if (((LA(1) >= '0' && LA(1) <= '9'))) { 566 matchRange('0','9'); 567 } 568 else { 569 if ( _cnt117>=1 ) { break _loop117; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} 570 } 571 572 _cnt117++; 573 } while (true); 574 } 575 { 576 boolean synPredMatched121 = false; 577 if (((LA(1)=='.'))) { 578 int _m121 = mark(); 579 synPredMatched121 = true; 580 inputState.guessing++; 581 try { 582 { 583 mDOT(false); 584 { 585 matchRange('0','9'); 586 } 587 } 588 } 589 catch (RecognitionException pe) { 590 synPredMatched121 = false; 591 } 592 rewind(_m121); 593 inputState.guessing--; 594 } 595 if ( synPredMatched121 ) { 596 mDOT(false); 597 { 598 int _cnt123=0; 599 _loop123: 600 do { 601 if (((LA(1) >= '0' && LA(1) <= '9'))) { 602 matchRange('0','9'); 603 } 604 else { 605 if ( _cnt123>=1 ) { break _loop123; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} 606 } 607 608 _cnt123++; 609 } while (true); 610 } 611 } 612 else { 613 } 614 615 } 616 { 617 if ((LA(1)=='E'||LA(1)=='e')) { 618 { 619 switch ( LA(1)) { 620 case 'e': 621 { 622 match('e'); 623 break; 624 } 625 case 'E': 626 { 627 match('E'); 628 break; 629 } 630 default: 631 { 632 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 633 } 634 } 635 } 636 { 637 switch ( LA(1)) { 638 case '+': 639 { 640 match('+'); 641 break; 642 } 643 case '-': 644 { 645 match('-'); 646 break; 647 } 648 case '0': case '1': case '2': case '3': 649 case '4': case '5': case '6': case '7': 650 case '8': case '9': 651 { 652 break; 653 } 654 default: 655 { 656 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 657 } 658 } 659 } 660 { 661 int _cnt128=0; 662 _loop128: 663 do { 664 if (((LA(1) >= '0' && LA(1) <= '9'))) { 665 matchRange('0','9'); 666 } 667 else { 668 if ( _cnt128>=1 ) { break _loop128; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} 669 } 670 671 _cnt128++; 672 } while (true); 673 } 674 } 675 else { 676 } 677 678 } 679 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 680 _token = makeToken(_ttype); 681 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 682 } 683 _returnToken = _token; 684 } 685 686 protected final void mNON_ANC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 687 int _ttype; Token _token=null; int _begin=text.length(); 688 _ttype = NON_ANC; 689 int _saveIndex; 690 691 { 692 match(_tokenSet_5); 693 } 694 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 695 _token = makeToken(_ttype); 696 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 697 } 698 _returnToken = _token; 699 } 700 701 public final void mURI_OR_IMPLIES(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 702 int _ttype; Token _token=null; int _begin=text.length(); 703 _ttype = URI_OR_IMPLIES; 704 int _saveIndex; 705 706 boolean synPredMatched74 = false; 707 if (((LA(1)=='<') && (LA(2)=='=') && (LA(3)=='>'))) { 708 int _m74 = mark(); 709 synPredMatched74 = true; 710 inputState.guessing++; 711 try { 712 { 713 mARROW_MEANS(false); 714 } 715 } 716 catch (RecognitionException pe) { 717 synPredMatched74 = false; 718 } 719 rewind(_m74); 720 inputState.guessing--; 721 } 722 if ( synPredMatched74 ) { 723 mARROW_MEANS(false); 724 if ( inputState.guessing==0 ) { 725 _ttype = ARROW_MEANS ; 726 } 727 } 728 else { 729 boolean synPredMatched72 = false; 730 if (((LA(1)=='<') && (LA(2)=='=') && (true))) { 731 int _m72 = mark(); 732 synPredMatched72 = true; 733 inputState.guessing++; 734 try { 735 { 736 mARROW_L(false); 737 } 738 } 739 catch (RecognitionException pe) { 740 synPredMatched72 = false; 741 } 742 rewind(_m72); 743 inputState.guessing--; 744 } 745 if ( synPredMatched72 ) { 746 mARROW_L(false); 747 if ( inputState.guessing==0 ) { 748 _ttype = ARROW_L ; 749 } 750 } 751 else if ((LA(1)=='<') && (_tokenSet_0.member(LA(2))) && (true)) { 752 mURIREF(false); 753 if ( inputState.guessing==0 ) { 754 _ttype = URIREF ; 755 } 756 } 757 else { 758 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 759 } 760 } 761 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 762 _token = makeToken(_ttype); 763 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 764 } 765 _returnToken = _token; 766 } 767 768 protected final void mARROW_L(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 769 int _ttype; Token _token=null; int _begin=text.length(); 770 _ttype = ARROW_L; 771 int _saveIndex; 772 773 match("<="); 774 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 775 _token = makeToken(_ttype); 776 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 777 } 778 _returnToken = _token; 779 } 780 781 protected final void mARROW_MEANS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 782 int _ttype; Token _token=null; int _begin=text.length(); 783 _ttype = ARROW_MEANS; 784 int _saveIndex; 785 786 match("<=>"); 787 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 788 _token = makeToken(_ttype); 789 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 790 } 791 _returnToken = _token; 792 } 793 794 protected final void mURIREF(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 795 int _ttype; Token _token=null; int _begin=text.length(); 796 _ttype = URIREF; 797 int _saveIndex; 798 799 _saveIndex=text.length(); 800 mLANGLE(false); 801 text.setLength(_saveIndex); 802 { 803 _loop78: 804 do { 805 if ((LA(1)=='>') && (true)) break _loop78; 807 if ((_tokenSet_0.member(LA(1))) && (_tokenSet_0.member(LA(2)))) { 808 { 809 match(_tokenSet_0); 810 } 811 } 812 else { 813 break _loop78; 814 } 815 816 } while (true); 817 } 818 _saveIndex=text.length(); 819 mRANGLE(false); 820 text.setLength(_saveIndex); 821 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 822 _token = makeToken(_ttype); 823 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 824 } 825 _returnToken = _token; 826 } 827 828 public final void mLANGLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 829 int _ttype; Token _token=null; int _begin=text.length(); 830 _ttype = LANGLE; 831 int _saveIndex; 832 833 match('<'); 834 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 835 _token = makeToken(_ttype); 836 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 837 } 838 _returnToken = _token; 839 } 840 841 public final void mRANGLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 842 int _ttype; Token _token=null; int _begin=text.length(); 843 _ttype = RANGLE; 844 int _saveIndex; 845 846 match('>'); 847 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 848 _token = makeToken(_ttype); 849 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 850 } 851 _returnToken = _token; 852 } 853 854 protected final void mURICHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 855 int _ttype; Token _token=null; int _begin=text.length(); 856 _ttype = URICHAR; 857 int _saveIndex; 858 859 switch ( LA(1)) { 860 case '0': case '1': case '2': case '3': 861 case '4': case '5': case '6': case '7': 862 case '8': case '9': case 'A': case 'B': 863 case 'C': case 'D': case 'E': case 'F': 864 case 'G': case 'H': case 'I': case 'J': 865 case 'K': case 'L': case 'M': case 'N': 866 case 'O': case 'P': case 'Q': case 'R': 867 case 'S': case 'T': case 'U': case 'V': 868 case 'W': case 'X': case 'Y': case 'Z': 869 case 'a': case 'b': case 'c': case 'd': 870 case 'e': case 'f': case 'g': case 'h': 871 case 'i': case 'j': case 'k': case 'l': 872 case 'm': case 'n': case 'o': case 'p': 873 case 'q': case 'r': case 's': case 't': 874 case 'u': case 'v': case 'w': case 'x': 875 case 'y': case 'z': 876 { 877 mALPHANUMERIC(false); 878 break; 879 } 880 case '-': 881 { 882 match('-'); 883 break; 884 } 885 case '_': 886 { 887 match('_'); 888 break; 889 } 890 case '.': 891 { 892 match('.'); 893 break; 894 } 895 case '!': 896 { 897 match('!'); 898 break; 899 } 900 case '~': 901 { 902 match('~'); 903 break; 904 } 905 case '*': 906 { 907 match('*'); 908 break; 909 } 910 case '\'': 911 { 912 match("'"); 913 break; 914 } 915 case '(': 916 { 917 match('('); 918 break; 919 } 920 case ')': 921 { 922 match(')'); 923 break; 924 } 925 case ';': 926 { 927 match(';'); 928 break; 929 } 930 case '/': 931 { 932 match('/'); 933 break; 934 } 935 case '?': 936 { 937 match('?'); 938 break; 939 } 940 case ':': 941 { 942 match(':'); 943 break; 944 } 945 case '@': 946 { 947 match('@'); 948 break; 949 } 950 case '&': 951 { 952 match('&'); 953 break; 954 } 955 case '=': 956 { 957 match('='); 958 break; 959 } 960 case '+': 961 { 962 match('+'); 963 break; 964 } 965 case '$': 966 { 967 match('$'); 968 break; 969 } 970 case ',': 971 { 972 match(','); 973 break; 974 } 975 case '{': 976 { 977 match('{'); 978 break; 979 } 980 case '}': 981 { 982 match('}'); 983 break; 984 } 985 case '|': 986 { 987 match('|'); 988 break; 989 } 990 case '\\': 991 { 992 match('\\'); 993 break; 994 } 995 case '^': 996 { 997 match('^'); 998 break; 999 } 1000 case '[': 1001 { 1002 match('['); 1003 break; 1004 } 1005 case ']': 1006 { 1007 match(']'); 1008 break; 1009 } 1010 case '`': 1011 { 1012 match('`'); 1013 break; 1014 } 1015 case '%': 1016 { 1017 match('%'); 1018 break; 1019 } 1020 case '#': 1021 { 1022 match('#'); 1023 break; 1024 } 1025 case '"': 1026 { 1027 match('"'); 1028 break; 1029 } 1030 case ' ': 1031 { 1032 match(' '); 1033 break; 1034 } 1035 default: 1036 { 1037 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1038 } 1039 } 1040 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1041 _token = makeToken(_ttype); 1042 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1043 } 1044 _returnToken = _token; 1045 } 1046 1047 protected final void mALPHANUMERIC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1048 int _ttype; Token _token=null; int _begin=text.length(); 1049 _ttype = ALPHANUMERIC; 1050 int _saveIndex; 1051 1052 { 1053 switch ( LA(1)) { 1054 case 'A': case 'B': case 'C': case 'D': 1055 case 'E': case 'F': case 'G': case 'H': 1056 case 'I': case 'J': case 'K': case 'L': 1057 case 'M': case 'N': case 'O': case 'P': 1058 case 'Q': case 'R': case 'S': case 'T': 1059 case 'U': case 'V': case 'W': case 'X': 1060 case 'Y': case 'Z': case 'a': case 'b': 1061 case 'c': case 'd': case 'e': case 'f': 1062 case 'g': case 'h': case 'i': case 'j': 1063 case 'k': case 'l': case 'm': case 'n': 1064 case 'o': case 'p': case 'q': case 'r': 1065 case 's': case 't': case 'u': case 'v': 1066 case 'w': case 'x': case 'y': case 'z': 1067 { 1068 mALPHA(false); 1069 break; 1070 } 1071 case '0': case '1': case '2': case '3': 1072 case '4': case '5': case '6': case '7': 1073 case '8': case '9': 1074 { 1075 mNUMERIC(false); 1076 break; 1077 } 1078 default: 1079 { 1080 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1081 } 1082 } 1083 } 1084 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1085 _token = makeToken(_ttype); 1086 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1087 } 1088 _returnToken = _token; 1089 } 1090 1091 public final void mUVAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1092 int _ttype; Token _token=null; int _begin=text.length(); 1093 _ttype = UVAR; 1094 int _saveIndex; 1095 1096 mQUESTION(false); 1097 { 1098 int _cnt82=0; 1099 _loop82: 1100 do { 1101 if ((_tokenSet_6.member(LA(1)))) { 1102 mALPHANUMERIC(false); 1103 } 1104 else { 1105 if ( _cnt82>=1 ) { break _loop82; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} 1106 } 1107 1108 _cnt82++; 1109 } while (true); 1110 } 1111 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1112 _token = makeToken(_ttype); 1113 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1114 } 1115 _returnToken = _token; 1116 } 1117 1118 protected final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1119 int _ttype; Token _token=null; int _begin=text.length(); 1120 _ttype = QUESTION; 1121 int _saveIndex; 1122 1123 match('?'); 1124 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1125 _token = makeToken(_ttype); 1126 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1127 } 1128 _returnToken = _token; 1129 } 1130 1131 public final void mAT_WORD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1132 int _ttype; Token _token=null; int _begin=text.length(); 1133 _ttype = AT_WORD; 1134 int _saveIndex; 1135 Token a=null; 1136 1137 boolean synPredMatched85 = false; 1138 if (((LA(1)=='@') && (LA(2)=='p') && (LA(3)=='r'))) { 1139 int _m85 = mark(); 1140 synPredMatched85 = true; 1141 inputState.guessing++; 1142 try { 1143 { 1144 mAT(false); 1145 match("prefix"); 1146 } 1147 } 1148 catch (RecognitionException pe) { 1149 synPredMatched85 = false; 1150 } 1151 rewind(_m85); 1152 inputState.guessing--; 1153 } 1154 if ( synPredMatched85 ) { 1155 mAT(false); 1156 match("prefix"); 1157 if ( inputState.guessing==0 ) { 1158 _ttype = AT_PREFIX ; 1159 } 1160 } 1161 else { 1162 boolean synPredMatched88 = false; 1163 if (((LA(1)=='@') && (_tokenSet_1.member(LA(2))) && (true))) { 1164 int _m88 = mark(); 1165 synPredMatched88 = true; 1166 inputState.guessing++; 1167 try { 1168 { 1169 mAT(false); 1170 { 1171 mALPHA(false); 1172 } 1173 } 1174 } 1175 catch (RecognitionException pe) { 1176 synPredMatched88 = false; 1177 } 1178 rewind(_m88); 1179 inputState.guessing--; 1180 } 1181 if ( synPredMatched88 ) { 1182 mAT(false); 1183 { 1184 int _cnt_a=0; 1185 a: 1186 do { 1187 if ((_tokenSet_1.member(LA(1)))) { 1188 mALPHA(false); 1189 } 1190 else { 1191 if ( _cnt_a>=1 ) { break a; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} 1192 } 1193 1194 _cnt_a++; 1195 } while (true); 1196 } 1197 { 1198 if ((LA(1)=='-')) { 1199 match("-"); 1200 { 1201 _loop93: 1202 do { 1203 if ((_tokenSet_1.member(LA(1)))) { 1204 mALPHA(false); 1205 } 1206 else { 1207 break _loop93; 1208 } 1209 1210 } while (true); 1211 } 1212 } 1213 else { 1214 } 1215 1216 } 1217 if ( inputState.guessing==0 ) { 1218 _ttype = AT_LANG ; 1219 } 1220 } 1221 else { 1222 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1223 } 1224 } 1225 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1226 _token = makeToken(_ttype); 1227 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1228 } 1229 _returnToken = _token; 1230 } 1231 1232 public final void mAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1233 int _ttype; Token _token=null; int _begin=text.length(); 1234 _ttype = AT; 1235 int _saveIndex; 1236 1237 match('@'); 1238 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1239 _token = makeToken(_ttype); 1240 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1241 } 1242 _returnToken = _token; 1243 } 1244 1245 protected final void mALPHA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1246 int _ttype; Token _token=null; int _begin=text.length(); 1247 _ttype = ALPHA; 1248 int _saveIndex; 1249 1250 switch ( LA(1)) { 1251 case 'A': case 'B': case 'C': case 'D': 1252 case 'E': case 'F': case 'G': case 'H': 1253 case 'I': case 'J': case 'K': case 'L': 1254 case 'M': case 'N': case 'O': case 'P': 1255 case 'Q': case 'R': case 'S': case 'T': 1256 case 'U': case 'V': case 'W': case 'X': 1257 case 'Y': case 'Z': 1258 { 1259 { 1260 matchRange('A','Z'); 1261 } 1262 break; 1263 } 1264 case 'a': case 'b': case 'c': case 'd': 1265 case 'e': case 'f': case 'g': case 'h': 1266 case 'i': case 'j': case 'k': case 'l': 1267 case 'm': case 'n': case 'o': case 'p': 1268 case 'q': case 'r': case 's': case 't': 1269 case 'u': case 'v': case 'w': case 'x': 1270 case 'y': case 'z': 1271 { 1272 { 1273 matchRange('a','z'); 1274 } 1275 break; 1276 } 1277 default: 1278 { 1279 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1280 } 1281 } 1282 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1283 _token = makeToken(_ttype); 1284 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1285 } 1286 _returnToken = _token; 1287 } 1288 1289 protected final void mXNAMECHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1290 int _ttype; Token _token=null; int _begin=text.length(); 1291 _ttype = XNAMECHAR; 1292 int _saveIndex; 1293 1294 { 1295 switch ( LA(1)) { 1296 case 'A': case 'B': case 'C': case 'D': 1297 case 'E': case 'F': case 'G': case 'H': 1298 case 'I': case 'J': case 'K': case 'L': 1299 case 'M': case 'N': case 'O': case 'P': 1300 case 'Q': case 'R': case 'S': case 'T': 1301 case 'U': case 'V': case 'W': case 'X': 1302 case 'Y': case 'Z': 1303 { 1304 { 1305 matchRange('A','Z'); 1306 } 1307 break; 1308 } 1309 case '_': 1310 { 1311 match('_'); 1312 break; 1313 } 1314 case '-': 1315 { 1316 match('-'); 1317 break; 1318 } 1319 case 'a': case 'b': case 'c': case 'd': 1320 case 'e': case 'f': case 'g': case 'h': 1321 case 'i': case 'j': case 'k': case 'l': 1322 case 'm': case 'n': case 'o': case 'p': 1323 case 'q': case 'r': case 's': case 't': 1324 case 'u': case 'v': case 'w': case 'x': 1325 case 'y': case 'z': 1326 { 1327 { 1328 matchRange('a','z'); 1329 } 1330 break; 1331 } 1332 case '\u0370': case '\u0371': case '\u0372': case '\u0373': 1333 case '\u0374': case '\u0375': case '\u0376': case '\u0377': 1334 case '\u0378': case '\u0379': case '\u037a': case '\u037b': 1335 case '\u037c': case '\u037d': 1336 { 1337 { 1338 matchRange('\u0370','\u037D'); 1339 } 1340 break; 1341 } 1342 case '\u200c': case '\u200d': 1343 { 1344 { 1345 matchRange('\u200C','\u200D'); 1346 } 1347 break; 1348 } 1349 case '0': case '1': case '2': case '3': 1350 case '4': case '5': case '6': case '7': 1351 case '8': case '9': 1352 { 1353 { 1354 matchRange('0','9'); 1355 } 1356 break; 1357 } 1358 case '\u0300': case '\u0301': case '\u0302': case '\u0303': 1359 case '\u0304': case '\u0305': case '\u0306': case '\u0307': 1360 case '\u0308': case '\u0309': case '\u030a': case '\u030b': 1361 case '\u030c': case '\u030d': case '\u030e': case '\u030f': 1362 case '\u0310': case '\u0311': case '\u0312': case '\u0313': 1363 case '\u0314': case '\u0315': case '\u0316': case '\u0317': 1364 case '\u0318': case '\u0319': case '\u031a': case '\u031b': 1365 case '\u031c': case '\u031d': case '\u031e': case '\u031f': 1366 case '\u0320': case '\u0321': case '\u0322': case '\u0323': 1367 case '\u0324': case '\u0325': case '\u0326': case '\u0327': 1368 case '\u0328': case '\u0329': case '\u032a': case '\u032b': 1369 case '\u032c': case '\u032d': case '\u032e': case '\u032f': 1370 case '\u0330': case '\u0331': case '\u0332': case '\u0333': 1371 case '\u0334': case '\u0335': case '\u0336': case '\u0337': 1372 case '\u0338': case '\u0339': case '\u033a': case '\u033b': 1373 case '\u033c': case '\u033d': case '\u033e': case '\u033f': 1374 case '\u0340': case '\u0341': case '\u0342': case '\u0343': 1375 case '\u0344': case '\u0345': case '\u0346': case '\u0347': 1376 case '\u0348': case '\u0349': case '\u034a': case '\u034b': 1377 case '\u034c': case '\u034d': case '\u034e': case '\u034f': 1378 case '\u0350': case '\u0351': case '\u0352': case '\u0353': 1379 case '\u0354': case '\u0355': case '\u0356': case '\u0357': 1380 case '\u0358': case '\u0359': case '\u035a': case '\u035b': 1381 case '\u035c': case '\u035d': case '\u035e': case '\u035f': 1382 case '\u0360': case '\u0361': case '\u0362': case '\u0363': 1383 case '\u0364': case '\u0365': case '\u0366': case '\u0367': 1384 case '\u0368': case '\u0369': case '\u036a': case '\u036b': 1385 case '\u036c': case '\u036d': case '\u036e': case '\u036f': 1386 { 1387 { 1388 matchRange('\u0300','\u036F'); 1389 } 1390 break; 1391 } 1392 case '\u203f': case '\u2040': 1393 { 1394 { 1395 matchRange('\u203F','\u2040'); 1396 } 1397 break; 1398 } 1399 case '\u00b7': 1400 { 1401 match('\u00B7'); 1402 break; 1403 } 1404 default: 1405 if (((LA(1) >= '\u00c0' && LA(1) <= '\u02ff'))) { 1406 { 1407 matchRange('\u00C0','\u02FF'); 1408 } 1409 } 1410 else if (((LA(1) >= '\u037f' && LA(1) <= '\u1fff'))) { 1411 { 1412 matchRange('\u037F','\u1FFF'); 1413 } 1414 } 1415 else if (((LA(1) >= '\u2070' && LA(1) <= '\u218f'))) { 1416 { 1417 matchRange('\u2070','\u218F'); 1418 } 1419 } 1420 else if (((LA(1) >= '\u2c00' && LA(1) <= '\u2fef'))) { 1421 { 1422 matchRange('\u2C00','\u2FEF'); 1423 } 1424 } 1425 else if (((LA(1) >= '\u3001' && LA(1) <= '\ud7ff'))) { 1426 { 1427 matchRange('\u3001','\uD7FF'); 1428 } 1429 } 1430 else if (((LA(1) >= '\uf900' && LA(1) <= '\ufffe'))) { 1431 { 1432 matchRange('\uF900','\uFFFE'); 1433 } 1434 } 1435 else { 1436 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1437 } 1438 } 1439 } 1440 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1441 _token = makeToken(_ttype); 1442 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1443 } 1444 _returnToken = _token; 1445 } 1446 1447 protected final void mXNAME(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1448 int _ttype; Token _token=null; int _begin=text.length(); 1449 _ttype = XNAME; 1450 int _saveIndex; 1451 1452 { 1453 _loop111: 1454 do { 1455 if ((_tokenSet_7.member(LA(1)))) { 1456 mXNAMECHAR(false); 1457 } 1458 else { 1459 break _loop111; 1460 } 1461 1462 } while (true); 1463 } 1464 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1465 _token = makeToken(_ttype); 1466 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1467 } 1468 _returnToken = _token; 1469 } 1470 1471 protected final void mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1472 int _ttype; Token _token=null; int _begin=text.length(); 1473 _ttype = DOT; 1474 int _saveIndex; 1475 1476 match('.'); 1477 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1478 _token = makeToken(_ttype); 1479 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1480 } 1481 _returnToken = _token; 1482 } 1483 1484 public final void mSTRING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1485 int _ttype; Token _token=null; int _begin=text.length(); 1486 _ttype = STRING; 1487 int _saveIndex; 1488 1489 { 1490 switch ( LA(1)) { 1491 case '\'': 1492 { 1493 mSTRING1(false); 1494 break; 1495 } 1496 case '"': 1497 { 1498 mSTRING2(false); 1499 break; 1500 } 1501 default: 1502 { 1503 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1504 } 1505 } 1506 } 1507 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1508 _token = makeToken(_ttype); 1509 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1510 } 1511 _returnToken = _token; 1512 } 1513 1514 protected final void mSTRING1(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1515 int _ttype; Token _token=null; int _begin=text.length(); 1516 _ttype = STRING1; 1517 int _saveIndex; 1518 1519 boolean synPredMatched189 = false; 1520 if (((LA(1)=='\'') && (LA(2)=='\'') && (LA(3)=='\''))) { 1521 int _m189 = mark(); 1522 synPredMatched189 = true; 1523 inputState.guessing++; 1524 try { 1525 { 1526 mQUOTE3S(false); 1527 } 1528 } 1529 catch (RecognitionException pe) { 1530 synPredMatched189 = false; 1531 } 1532 rewind(_m189); 1533 inputState.guessing--; 1534 } 1535 if ( synPredMatched189 ) { 1536 _saveIndex=text.length(); 1537 mQUOTE3S(false); 1538 text.setLength(_saveIndex); 1539 { 1540 _loop194: 1541 do { 1542 if ((LA(1)=='\'') && (LA(2)=='\'') && (LA(3)=='\'')) break _loop194; 1544 boolean synPredMatched192 = false; 1545 if (((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')))) { 1546 int _m192 = mark(); 1547 synPredMatched192 = true; 1548 inputState.guessing++; 1549 try { 1550 { 1551 mNL(false); 1552 } 1553 } 1554 catch (RecognitionException pe) { 1555 synPredMatched192 = false; 1556 } 1557 rewind(_m192); 1558 inputState.guessing--; 1559 } 1560 if ( synPredMatched192 ) { 1561 mNL(false); 1562 } 1563 else if ((_tokenSet_8.member(LA(1))) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe'))) { 1564 { 1565 match(_tokenSet_8); 1566 } 1567 } 1568 else if ((LA(1)=='\\')) { 1569 mESCAPE(false); 1570 } 1571 else { 1572 break _loop194; 1573 } 1574 1575 } while (true); 1576 } 1577 _saveIndex=text.length(); 1578 mQUOTE3S(false); 1579 text.setLength(_saveIndex); 1580 } 1581 else if ((LA(1)=='\'') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true)) { 1582 _saveIndex=text.length(); 1583 match('\''); 1584 text.setLength(_saveIndex); 1585 { 1586 _loop196: 1587 do { 1588 if ((LA(1)=='\'') && (true)) break _loop196; 1590 if ((_tokenSet_8.member(LA(1))) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe'))) { 1591 matchNot('\\'); 1592 } 1593 else if ((LA(1)=='\\')) { 1594 mESCAPE(false); 1595 } 1596 else { 1597 break _loop196; 1598 } 1599 1600 } while (true); 1601 } 1602 _saveIndex=text.length(); 1603 match('\''); 1604 text.setLength(_saveIndex); 1605 } 1606 else { 1607 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1608 } 1609 1610 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1611 _token = makeToken(_ttype); 1612 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1613 } 1614 _returnToken = _token; 1615 } 1616 1617 protected final void mSTRING2(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1618 int _ttype; Token _token=null; int _begin=text.length(); 1619 _ttype = STRING2; 1620 int _saveIndex; 1621 1622 boolean synPredMatched199 = false; 1623 if (((LA(1)=='"') && (LA(2)=='"') && (LA(3)=='"'))) { 1624 int _m199 = mark(); 1625 synPredMatched199 = true; 1626 inputState.guessing++; 1627 try { 1628 { 1629 mQUOTE3D(false); 1630 } 1631 } 1632 catch (RecognitionException pe) { 1633 synPredMatched199 = false; 1634 } 1635 rewind(_m199); 1636 inputState.guessing--; 1637 } 1638 if ( synPredMatched199 ) { 1639 _saveIndex=text.length(); 1640 mQUOTE3D(false); 1641 text.setLength(_saveIndex); 1642 { 1643 _loop204: 1644 do { 1645 if ((LA(1)=='"') && (LA(2)=='"') && (LA(3)=='"')) break _loop204; 1647 boolean synPredMatched202 = false; 1648 if (((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')))) { 1649 int _m202 = mark(); 1650 synPredMatched202 = true; 1651 inputState.guessing++; 1652 try { 1653 { 1654 mNL(false); 1655 } 1656 } 1657 catch (RecognitionException pe) { 1658 synPredMatched202 = false; 1659 } 1660 rewind(_m202); 1661 inputState.guessing--; 1662 } 1663 if ( synPredMatched202 ) { 1664 mNL(false); 1665 } 1666 else if ((_tokenSet_8.member(LA(1))) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe'))) { 1667 { 1668 match(_tokenSet_8); 1669 } 1670 } 1671 else if ((LA(1)=='\\')) { 1672 mESCAPE(false); 1673 } 1674 else { 1675 break _loop204; 1676 } 1677 1678 } while (true); 1679 } 1680 _saveIndex=text.length(); 1681 mQUOTE3D(false); 1682 text.setLength(_saveIndex); 1683 } 1684 else if ((LA(1)=='"') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true)) { 1685 _saveIndex=text.length(); 1686 match('"'); 1687 text.setLength(_saveIndex); 1688 { 1689 _loop206: 1690 do { 1691 if ((LA(1)=='"') && (true)) break _loop206; 1693 if ((_tokenSet_8.member(LA(1))) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe'))) { 1694 matchNot('\\'); 1695 } 1696 else if ((LA(1)=='\\')) { 1697 mESCAPE(false); 1698 } 1699 else { 1700 break _loop206; 1701 } 1702 1703 } while (true); 1704 } 1705 _saveIndex=text.length(); 1706 match('"'); 1707 text.setLength(_saveIndex); 1708 } 1709 else { 1710 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1711 } 1712 1713 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1714 _token = makeToken(_ttype); 1715 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1716 } 1717 _returnToken = _token; 1718 } 1719 1720 public final void mSEP_OR_PATH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1721 int _ttype; Token _token=null; int _begin=text.length(); 1722 _ttype = SEP_OR_PATH; 1723 int _saveIndex; 1724 1725 boolean synPredMatched134 = false; 1726 if (((LA(1)=='.') && (true) && (true))) { 1727 int _m134 = mark(); 1728 synPredMatched134 = true; 1729 inputState.guessing++; 1730 try { 1731 { 1732 mDOT(false); 1733 { 1734 switch ( LA(1)) { 1735 case 'A': case 'B': case 'C': case 'D': 1736 case 'E': case 'F': case 'G': case 'H': 1737 case 'I': case 'J': case 'K': case 'L': 1738 case 'M': case 'N': case 'O': case 'P': 1739 case 'Q': case 'R': case 'S': case 'T': 1740 case 'U': case 'V': case 'W': case 'X': 1741 case 'Y': case 'Z': case 'a': case 'b': 1742 case 'c': case 'd': case 'e': case 'f': 1743 case 'g': case 'h': case 'i': case 'j': 1744 case 'k': case 'l': case 'm': case 'n': 1745 case 'o': case 'p': case 'q': case 'r': 1746 case 's': case 't': case 'u': case 'v': 1747 case 'w': case 'x': case 'y': case 'z': 1748 { 1749 mALPHA(false); 1750 break; 1751 } 1752 case '_': 1753 { 1754 match('_'); 1755 break; 1756 } 1757 case ':': 1758 { 1759 mCOLON(false); 1760 break; 1761 } 1762 case '<': 1763 { 1764 mLANGLE(false); 1765 break; 1766 } 1767 default: 1768 { 1769 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1770 } 1771 } 1772 } 1773 } 1774 } 1775 catch (RecognitionException pe) { 1776 synPredMatched134 = false; 1777 } 1778 rewind(_m134); 1779 inputState.guessing--; 1780 } 1781 if ( synPredMatched134 ) { 1782 mDOT(false); 1783 if ( inputState.guessing==0 ) { 1784 _ttype = PATH ; 1785 } 1786 } 1787 else if ((LA(1)=='.') && (true) && (true)) { 1788 mDOT(false); 1789 if ( inputState.guessing==0 ) { 1790 _ttype = SEP ; 1791 } 1792 } 1793 else { 1794 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 1795 } 1796 1797 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1798 _token = makeToken(_ttype); 1799 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1800 } 1801 _returnToken = _token; 1802 } 1803 1804 public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1805 int _ttype; Token _token=null; int _begin=text.length(); 1806 _ttype = LPAREN; 1807 int _saveIndex; 1808 1809 match('('); 1810 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1811 _token = makeToken(_ttype); 1812 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1813 } 1814 _returnToken = _token; 1815 } 1816 1817 public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1818 int _ttype; Token _token=null; int _begin=text.length(); 1819 _ttype = RPAREN; 1820 int _saveIndex; 1821 1822 match(')'); 1823 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1824 _token = makeToken(_ttype); 1825 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1826 } 1827 _returnToken = _token; 1828 } 1829 1830 public final void mLBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1831 int _ttype; Token _token=null; int _begin=text.length(); 1832 _ttype = LBRACK; 1833 int _saveIndex; 1834 1835 match('['); 1836 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1837 _token = makeToken(_ttype); 1838 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1839 } 1840 _returnToken = _token; 1841 } 1842 1843 public final void mRBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1844 int _ttype; Token _token=null; int _begin=text.length(); 1845 _ttype = RBRACK; 1846 int _saveIndex; 1847 1848 match(']'); 1849 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1850 _token = makeToken(_ttype); 1851 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1852 } 1853 _returnToken = _token; 1854 } 1855 1856 public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1857 int _ttype; Token _token=null; int _begin=text.length(); 1858 _ttype = LCURLY; 1859 int _saveIndex; 1860 1861 match('{'); 1862 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1863 _token = makeToken(_ttype); 1864 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1865 } 1866 _returnToken = _token; 1867 } 1868 1869 public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1870 int _ttype; Token _token=null; int _begin=text.length(); 1871 _ttype = RCURLY; 1872 int _saveIndex; 1873 1874 match('}'); 1875 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1876 _token = makeToken(_ttype); 1877 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1878 } 1879 _returnToken = _token; 1880 } 1881 1882 public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1883 int _ttype; Token _token=null; int _begin=text.length(); 1884 _ttype = SEMI; 1885 int _saveIndex; 1886 1887 match(';'); 1888 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1889 _token = makeToken(_ttype); 1890 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1891 } 1892 _returnToken = _token; 1893 } 1894 1895 public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1896 int _ttype; Token _token=null; int _begin=text.length(); 1897 _ttype = COMMA; 1898 int _saveIndex; 1899 1900 match(','); 1901 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1902 _token = makeToken(_ttype); 1903 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1904 } 1905 _returnToken = _token; 1906 } 1907 1908 public final void mPATH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1909 int _ttype; Token _token=null; int _begin=text.length(); 1910 _ttype = PATH; 1911 int _saveIndex; 1912 1913 match('!'); 1914 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1915 _token = makeToken(_ttype); 1916 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1917 } 1918 _returnToken = _token; 1919 } 1920 1921 public final void mRPATH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1922 int _ttype; Token _token=null; int _begin=text.length(); 1923 _ttype = RPATH; 1924 int _saveIndex; 1925 1926 match('^'); 1927 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1928 _token = makeToken(_ttype); 1929 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1930 } 1931 _returnToken = _token; 1932 } 1933 1934 public final void mDATATYPE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1935 int _ttype; Token _token=null; int _begin=text.length(); 1936 _ttype = DATATYPE; 1937 int _saveIndex; 1938 1939 match("^^"); 1940 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1941 _token = makeToken(_ttype); 1942 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1943 } 1944 _returnToken = _token; 1945 } 1946 1947 protected final void mNAME_IT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1948 int _ttype; Token _token=null; int _begin=text.length(); 1949 _ttype = NAME_IT; 1950 int _saveIndex; 1951 1952 match(":-"); 1953 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1954 _token = makeToken(_ttype); 1955 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1956 } 1957 _returnToken = _token; 1958 } 1959 1960 public final void mARROW_R(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1961 int _ttype; Token _token=null; int _begin=text.length(); 1962 _ttype = ARROW_R; 1963 int _saveIndex; 1964 1965 match("=>"); 1966 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1967 _token = makeToken(_ttype); 1968 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1969 } 1970 _returnToken = _token; 1971 } 1972 1973 public final void mARROW_PATH_L(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1974 int _ttype; Token _token=null; int _begin=text.length(); 1975 _ttype = ARROW_PATH_L; 1976 int _saveIndex; 1977 1978 match(">-"); 1979 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1980 _token = makeToken(_ttype); 1981 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1982 } 1983 _returnToken = _token; 1984 } 1985 1986 public final void mARROW_PATH_R(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 1987 int _ttype; Token _token=null; int _begin=text.length(); 1988 _ttype = ARROW_PATH_R; 1989 int _saveIndex; 1990 1991 match("->"); 1992 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 1993 _token = makeToken(_ttype); 1994 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 1995 } 1996 _returnToken = _token; 1997 } 1998 1999 public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2000 int _ttype; Token _token=null; int _begin=text.length(); 2001 _ttype = EQUAL; 2002 int _saveIndex; 2003 2004 match("="); 2005 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2006 _token = makeToken(_ttype); 2007 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2008 } 2009 _returnToken = _token; 2010 } 2011 2012 public final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2013 int _ttype; Token _token=null; int _begin=text.length(); 2014 _ttype = SL_COMMENT; 2015 int _saveIndex; 2016 2017 match("#"); 2018 { 2019 _loop162: 2020 do { 2021 if ((_tokenSet_0.member(LA(1)))) { 2022 { 2023 match(_tokenSet_0); 2024 } 2025 } 2026 else { 2027 break _loop162; 2028 } 2029 2030 } while (true); 2031 } 2032 { 2033 if ((LA(1)=='\n'||LA(1)=='\r')) { 2034 mNL(false); 2035 } 2036 else { 2037 } 2038 2039 } 2040 if ( inputState.guessing==0 ) { 2041 _ttype = Token.SKIP; 2042 } 2043 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2044 _token = makeToken(_ttype); 2045 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2046 } 2047 _returnToken = _token; 2048 } 2049 2050 protected final void mNL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2051 int _ttype; Token _token=null; int _begin=text.length(); 2052 _ttype = NL; 2053 int _saveIndex; 2054 2055 boolean synPredMatched169 = false; 2056 if (((LA(1)=='\r') && (LA(2)=='\n') && (true))) { 2057 int _m169 = mark(); 2058 synPredMatched169 = true; 2059 inputState.guessing++; 2060 try { 2061 { 2062 mNL1(false); 2063 } 2064 } 2065 catch (RecognitionException pe) { 2066 synPredMatched169 = false; 2067 } 2068 rewind(_m169); 2069 inputState.guessing--; 2070 } 2071 if ( synPredMatched169 ) { 2072 mNL1(false); 2073 } 2074 else { 2075 boolean synPredMatched171 = false; 2076 if (((LA(1)=='\n'))) { 2077 int _m171 = mark(); 2078 synPredMatched171 = true; 2079 inputState.guessing++; 2080 try { 2081 { 2082 mNL2(false); 2083 } 2084 } 2085 catch (RecognitionException pe) { 2086 synPredMatched171 = false; 2087 } 2088 rewind(_m171); 2089 inputState.guessing--; 2090 } 2091 if ( synPredMatched171 ) { 2092 mNL2(false); 2093 } 2094 else { 2095 boolean synPredMatched173 = false; 2096 if (((LA(1)=='\r') && (true) && (true))) { 2097 int _m173 = mark(); 2098 synPredMatched173 = true; 2099 inputState.guessing++; 2100 try { 2101 { 2102 mNL3(false); 2103 } 2104 } 2105 catch (RecognitionException pe) { 2106 synPredMatched173 = false; 2107 } 2108 rewind(_m173); 2109 inputState.guessing--; 2110 } 2111 if ( synPredMatched173 ) { 2112 mNL3(false); 2113 } 2114 else { 2115 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 2116 } 2117 }} 2118 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2119 _token = makeToken(_ttype); 2120 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2121 } 2122 _returnToken = _token; 2123 } 2124 2125 protected final void mNL1(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2126 int _ttype; Token _token=null; int _begin=text.length(); 2127 _ttype = NL1; 2128 int _saveIndex; 2129 2130 match("\r\n"); 2131 if ( inputState.guessing==0 ) { 2132 newline(); 2133 } 2134 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2135 _token = makeToken(_ttype); 2136 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2137 } 2138 _returnToken = _token; 2139 } 2140 2141 protected final void mNL2(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2142 int _ttype; Token _token=null; int _begin=text.length(); 2143 _ttype = NL2; 2144 int _saveIndex; 2145 2146 match("\n"); 2147 if ( inputState.guessing==0 ) { 2148 newline(); 2149 } 2150 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2151 _token = makeToken(_ttype); 2152 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2153 } 2154 _returnToken = _token; 2155 } 2156 2157 protected final void mNL3(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2158 int _ttype; Token _token=null; int _begin=text.length(); 2159 _ttype = NL3; 2160 int _saveIndex; 2161 2162 match("\r"); 2163 if ( inputState.guessing==0 ) { 2164 newline(); 2165 } 2166 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2167 _token = makeToken(_ttype); 2168 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2169 } 2170 _returnToken = _token; 2171 } 2172 2173 public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2174 int _ttype; Token _token=null; int _begin=text.length(); 2175 _ttype = WS; 2176 int _saveIndex; 2177 2178 { 2179 switch ( LA(1)) { 2180 case ' ': 2181 { 2182 match(' '); 2183 break; 2184 } 2185 case '\t': 2186 { 2187 match('\t'); 2188 break; 2189 } 2190 case '\u000c': 2191 { 2192 match('\f'); 2193 break; 2194 } 2195 case '\n': case '\r': 2196 { 2197 mNL(false); 2198 break; 2199 } 2200 default: 2201 { 2202 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 2203 } 2204 } 2205 } 2206 if ( inputState.guessing==0 ) { 2207 _ttype = Token.SKIP; 2208 } 2209 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2210 _token = makeToken(_ttype); 2211 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2212 } 2213 _returnToken = _token; 2214 } 2215 2216 protected final void mNWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2217 int _ttype; Token _token=null; int _begin=text.length(); 2218 _ttype = NWS; 2219 int _saveIndex; 2220 2221 { 2222 match(_tokenSet_9); 2223 } 2224 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2225 _token = makeToken(_ttype); 2226 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2227 } 2228 _returnToken = _token; 2229 } 2230 2231 protected final void mNUMERIC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2232 int _ttype; Token _token=null; int _begin=text.length(); 2233 _ttype = NUMERIC; 2234 int _saveIndex; 2235 2236 { 2237 matchRange('0','9'); 2238 } 2239 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2240 _token = makeToken(_ttype); 2241 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2242 } 2243 _returnToken = _token; 2244 } 2245 2246 protected final void mQUOTE3S(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2247 int _ttype; Token _token=null; int _begin=text.length(); 2248 _ttype = QUOTE3S; 2249 int _saveIndex; 2250 2251 match("'''"); 2252 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2253 _token = makeToken(_ttype); 2254 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2255 } 2256 _returnToken = _token; 2257 } 2258 2259 protected final void mESCAPE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2260 int _ttype; Token _token=null; int _begin=text.length(); 2261 _ttype = ESCAPE; 2262 int _saveIndex; 2263 char ch = '\0'; 2264 2265 _saveIndex=text.length(); 2266 match('\\'); 2267 text.setLength(_saveIndex); 2268 { 2269 boolean synPredMatched212 = false; 2270 if (((_tokenSet_10.member(LA(1))) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true))) { 2271 int _m212 = mark(); 2272 synPredMatched212 = true; 2273 inputState.guessing++; 2274 try { 2275 { 2276 mESC_CHAR(false); 2277 } 2278 } 2279 catch (RecognitionException pe) { 2280 synPredMatched212 = false; 2281 } 2282 rewind(_m212); 2283 inputState.guessing--; 2284 } 2285 if ( synPredMatched212 ) { 2286 mESC_CHAR(false); 2287 } 2288 else if (((LA(1) >= '\u0000' && LA(1) <= '\ufffe')) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true)) { 2289 ch = LA(1); 2290 matchNot(EOF_CHAR); 2291 if ( inputState.guessing==0 ) { 2292 text.setLength(_begin); text.append("\\"+ch) ; 2293 } 2294 } 2295 else { 2296 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 2297 } 2298 2299 } 2300 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2301 _token = makeToken(_ttype); 2302 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2303 } 2304 _returnToken = _token; 2305 } 2306 2307 protected final void mQUOTE3D(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2308 int _ttype; Token _token=null; int _begin=text.length(); 2309 _ttype = QUOTE3D; 2310 int _saveIndex; 2311 2312 match('"'); 2313 match('"'); 2314 match('"'); 2315 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2316 _token = makeToken(_ttype); 2317 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2318 } 2319 _returnToken = _token; 2320 } 2321 2322 protected final void mESC_CHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2323 int _ttype; Token _token=null; int _begin=text.length(); 2324 _ttype = ESC_CHAR; 2325 int _saveIndex; 2326 Token h=null; 2327 2328 { 2329 switch ( LA(1)) { 2330 case 'n': 2331 { 2332 match('n'); 2333 if ( inputState.guessing==0 ) { 2334 text.setLength(_begin); text.append("\n") ; 2335 } 2336 break; 2337 } 2338 case 'r': 2339 { 2340 match('r'); 2341 if ( inputState.guessing==0 ) { 2342 text.setLength(_begin); text.append("\r") ; 2343 } 2344 break; 2345 } 2346 case 'b': 2347 { 2348 match('b'); 2349 if ( inputState.guessing==0 ) { 2350 text.setLength(_begin); text.append("\b") ; 2351 } 2352 break; 2353 } 2354 case 't': 2355 { 2356 match('t'); 2357 if ( inputState.guessing==0 ) { 2358 text.setLength(_begin); text.append("\t") ; 2359 } 2360 break; 2361 } 2362 case 'f': 2363 { 2364 match('f'); 2365 if ( inputState.guessing==0 ) { 2366 text.setLength(_begin); text.append("\f") ; 2367 } 2368 break; 2369 } 2370 case 'v': 2371 { 2372 match('v'); 2373 if ( inputState.guessing==0 ) { 2374 text.setLength(_begin); text.append("\f") ; 2375 } 2376 break; 2377 } 2378 case 'a': 2379 { 2380 match('a'); 2381 if ( inputState.guessing==0 ) { 2382 text.setLength(_begin); text.append("\007") ; 2383 } 2384 break; 2385 } 2386 case 'u': 2387 { 2388 match('u'); 2389 mHEX4(true); 2390 h=_returnToken; 2391 if ( inputState.guessing==0 ) { 2392 2393 char ch = (char)Integer.parseInt(h.getText(), 16) ; 2394 text.setLength(_begin); text.append(ch) ; 2395 2396 } 2397 break; 2398 } 2399 case '"': 2400 { 2401 match('"'); 2402 if ( inputState.guessing==0 ) { 2403 text.setLength(_begin); text.append("\"") ; 2404 } 2405 break; 2406 } 2407 case '\\': 2408 { 2409 match('\\'); 2410 if ( inputState.guessing==0 ) { 2411 text.setLength(_begin); text.append("\\") ; 2412 } 2413 break; 2414 } 2415 case '\'': 2416 { 2417 match('\''); 2418 if ( inputState.guessing==0 ) { 2419 text.setLength(_begin); text.append("'") ; 2420 } 2421 break; 2422 } 2423 default: 2424 { 2425 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 2426 } 2427 } 2428 } 2429 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2430 _token = makeToken(_ttype); 2431 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2432 } 2433 _returnToken = _token; 2434 } 2435 2436 protected final void mHEX4(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2437 int _ttype; Token _token=null; int _begin=text.length(); 2438 _ttype = HEX4; 2439 int _saveIndex; 2440 2441 mHEX_DIGIT(false); 2442 mHEX_DIGIT(false); 2443 mHEX_DIGIT(false); 2444 mHEX_DIGIT(false); 2445 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2446 _token = makeToken(_ttype); 2447 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2448 } 2449 _returnToken = _token; 2450 } 2451 2452 protected final void mHEX_DIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 2453 int _ttype; Token _token=null; int _begin=text.length(); 2454 _ttype = HEX_DIGIT; 2455 int _saveIndex; 2456 2457 { 2458 switch ( LA(1)) { 2459 case '0': case '1': case '2': case '3': 2460 case '4': case '5': case '6': case '7': 2461 case '8': case '9': 2462 { 2463 matchRange('0','9'); 2464 break; 2465 } 2466 case 'A': case 'B': case 'C': case 'D': 2467 case 'E': case 'F': 2468 { 2469 matchRange('A','F'); 2470 break; 2471 } 2472 case 'a': case 'b': case 'c': case 'd': 2473 case 'e': case 'f': 2474 { 2475 matchRange('a','f'); 2476 break; 2477 } 2478 default: 2479 { 2480 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 2481 } 2482 } 2483 } 2484 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 2485 _token = makeToken(_ttype); 2486 _token.setText(new String (text.getBuffer(), _begin, text.length()-_begin)); 2487 } 2488 _returnToken = _token; 2489 } 2490 2491 2492 private static final long[] mk_tokenSet_0() { 2493 long[] data = new long[2048]; 2494 data[0]=-9217L; 2495 for (int i = 1; i<=1022; i++) { data[i]=-1L; } 2496 data[1023]=9223372036854775807L; 2497 return data; 2498 } 2499 public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0()); 2500 private static final long[] mk_tokenSet_1() { 2501 long[] data = new long[1025]; 2502 data[1]=576460743847706622L; 2503 return data; 2504 } 2505 public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1()); 2506 private static final long[] mk_tokenSet_2() { 2507 long[] data = new long[3988]; 2508 data[0]=576223257791823872L; 2509 data[1]=576460745995190270L; 2510 data[2]=36028797018963968L; 2511 for (int i = 3; i<=12; i++) { data[i]=-1L; } 2512 data[13]=-4611686018427387905L; 2513 for (int i = 14; i<=127; i++) { data[i]=-1L; } 2514 data[128]=-9223372036854763520L; 2515 data[129]=-281474976710655L; 2516 for (int i = 130; i<=133; i++) { data[i]=-1L; } 2517 data[134]=65535L; 2518 for (int i = 176; i<=190; i++) { data[i]=-1L; } 2519 data[191]=281474976710655L; 2520 data[192]=-2L; 2521 for (int i = 193; i<=863; i++) { data[i]=-1L; } 2522 for (int i = 996; i<=1022; i++) { data[i]=-1L; } 2523 data[1023]=9223372036854775807L; 2524 return data; 2525 } 2526 public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2()); 2527 private static final long[] mk_tokenSet_3() { 2528 long[] data = new long[3988]; 2529 data[0]=576214461698801664L; 2530 data[1]=576460745995190270L; 2531 data[2]=36028797018963968L; 2532 for (int i = 3; i<=12; i++) { data[i]=-1L; } 2533 data[13]=-4611686018427387905L; 2534 for (int i = 14; i<=127; i++) { data[i]=-1L; } 2535 data[128]=-9223372036854763520L; 2536 data[129]=-281474976710655L; 2537 for (int i = 130; i<=133; i++) { data[i]=-1L; } 2538 data[134]=65535L; 2539 for (int i = 176; i<=190; i++) { data[i]=-1L; } 2540 data[191]=281474976710655L; 2541 data[192]=-2L; 2542 for (int i = 193; i<=863; i++) { data[i]=-1L; } 2543 for (int i = 996; i<=1022; i++) { data[i]=-1L; } 2544 data[1023]=9223372036854775807L; 2545 return data; 2546 } 2547 public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3()); 2548 private static final long[] mk_tokenSet_4() { 2549 long[] data = new long[1025]; 2550 data[0]=287992881640112128L; 2551 return data; 2552 } 2553 public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4()); 2554 private static final long[] mk_tokenSet_5() { 2555 long[] data = new long[2048]; 2556 data[0]=-576179277326712833L; 2557 data[1]=-576460743847706623L; 2558 for (int i = 2; i<=1022; i++) { data[i]=-1L; } 2559 data[1023]=9223372036854775807L; 2560 return data; 2561 } 2562 public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5()); 2563 private static final long[] mk_tokenSet_6() { 2564 long[] data = new long[1025]; 2565 data[0]=287948901175001088L; 2566 data[1]=576460743847706622L; 2567 return data; 2568 } 2569 public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6()); 2570 private static final long[] mk_tokenSet_7() { 2571 long[] data = new long[3988]; 2572 data[0]=287984085547089920L; 2573 data[1]=576460745995190270L; 2574 data[2]=36028797018963968L; 2575 for (int i = 3; i<=12; i++) { data[i]=-1L; } 2576 data[13]=-4611686018427387905L; 2577 for (int i = 14; i<=127; i++) { data[i]=-1L; } 2578 data[128]=-9223372036854763520L; 2579 data[129]=-281474976710655L; 2580 for (int i = 130; i<=133; i++) { data[i]=-1L; } 2581 data[134]=65535L; 2582 for (int i = 176; i<=190; i++) { data[i]=-1L; } 2583 data[191]=281474976710655L; 2584 data[192]=-2L; 2585 for (int i = 193; i<=863; i++) { data[i]=-1L; } 2586 for (int i = 996; i<=1022; i++) { data[i]=-1L; } 2587 data[1023]=9223372036854775807L; 2588 return data; 2589 } 2590 public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7()); 2591 private static final long[] mk_tokenSet_8() { 2592 long[] data = new long[2048]; 2593 data[0]=-1L; 2594 data[1]=-268435457L; 2595 for (int i = 2; i<=1022; i++) { data[i]=-1L; } 2596 data[1023]=9223372036854775807L; 2597 return data; 2598 } 2599 public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8()); 2600 private static final long[] mk_tokenSet_9() { 2601 long[] data = new long[2048]; 2602 data[0]=-4294981121L; 2603 for (int i = 1; i<=1022; i++) { data[i]=-1L; } 2604 data[1023]=9223372036854775807L; 2605 return data; 2606 } 2607 public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9()); 2608 private static final long[] mk_tokenSet_10() { 2609 long[] data = new long[1025]; 2610 data[0]=566935683072L; 2611 data[1]=32721766958759936L; 2612 return data; 2613 } 2614 public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10()); 2615 2616 } 2617 | Popular Tags |