001// $ANTLR 2.7.7 (20060906): "java.g" -> "GeneratedJavaRecognizer.java"$ 002 003package com.puppycrawl.tools.checkstyle.grammar; 004 005import com.puppycrawl.tools.checkstyle.DetailAstImpl; 006import java.text.MessageFormat; 007import antlr.CommonHiddenStreamToken; 008import antlr.TokenStreamSelector; 009 010import antlr.TokenBuffer; 011import antlr.TokenStreamException; 012import antlr.TokenStreamIOException; 013import antlr.ANTLRException; 014import antlr.LLkParser; 015import antlr.Token; 016import antlr.TokenStream; 017import antlr.RecognitionException; 018import antlr.NoViableAltException; 019import antlr.MismatchedTokenException; 020import antlr.SemanticException; 021import antlr.ParserSharedInputState; 022import antlr.collections.impl.BitSet; 023import antlr.collections.AST; 024import java.util.Hashtable; 025import antlr.ASTFactory; 026import antlr.ASTPair; 027import antlr.collections.impl.ASTArray; 028 029/** Java 1.5 Recognizer 030 * 031 * This grammar is in the PUBLIC DOMAIN 032 */ 033public class GeneratedJavaRecognizer extends antlr.LLkParser implements GeneratedJavaTokenTypes 034 { 035 036 /** 037 * Counts the number of LT seen in the typeArguments production. 038 * It is used in semantic predicates to ensure we have seen 039 * enough closing '>' characters; which actually may have been 040 * either GT, SR or BSR tokens. 041 */ 042 private int ltCounter = 0; 043 044 /** 045 * Counts the number of '>' characters that have been seen but 046 * have not yet been associated with the end of a typeParameters or 047 * typeArguments production. This is necessary because SR and BSR 048 * tokens have significance (the extra '>' characters) not only for the production 049 * that sees them but also productions higher in the stack (possibly right up to an outer-most 050 * typeParameters production). As the stack of the typeArguments/typeParameters productions 051 * unwind, any '>' characters seen prematurely through SRs or BSRs are reconciled. 052 */ 053 private int gtToReconcile = 0; 054 055 /** 056 * The most recently seen gt sequence (GT, SR or BSR) 057 * encountered in any type argument or type parameter production. 058 * We retain this so we can keep manage the synthetic GT tokens/ 059 * AST nodes we emit to have '<' & '>' balanced trees when encountering 060 * SR and BSR tokens. 061 */ 062 private DetailAstImpl currentGtSequence = null; 063 064 /** 065 * Consume a sequence of '>' characters (GT, SR or BSR) 066 * and match these against the '<' characters seen. 067 */ 068 private void consumeCurrentGtSequence(DetailAstImpl gtSequence) 069 { 070 currentGtSequence = gtSequence; 071 gtToReconcile += currentGtSequence.getText().length(); 072 ltCounter -= currentGtSequence.getText().length(); 073 } 074 075 /** 076 * Emits a single GT AST node with the line and column correctly 077 * set to its position in the source file. This must only 078 * ever be called when a typeParameters or typeArguments production 079 * is ending and there is at least one GT character to be emitted. 080 * 081 * @see #areThereGtsToEmit 082 */ 083 private DetailAstImpl emitSingleGt() 084 { 085 gtToReconcile -= 1; 086 CommonHiddenStreamToken gtToken = new CommonHiddenStreamToken(GENERIC_END, ">"); 087 gtToken.setLine(currentGtSequence.getLineNo()); 088 gtToken.setColumn(currentGtSequence.getColumnNo() 089 + (currentGtSequence.getText().length() - gtToReconcile)); 090 return (DetailAstImpl)astFactory.create(gtToken); 091 } 092 093 /** 094 * @return true if there is at least one '>' seen but 095 * not reconciled with the end of a typeParameters or 096 * typeArguments production; returns false otherwise 097 */ 098 private boolean areThereGtsToEmit() 099 { 100 return (gtToReconcile > 0); 101 } 102 103 /** 104 * @return true if there is exactly one '>' seen but 105 * not reconciled with the end of a typeParameters 106 * production; returns false otherwise 107 */ 108 private boolean isThereASingleGtToEmit() 109 { 110 return (gtToReconcile == 1); 111 } 112 113 /** 114 * @return true if the '<' and '>' are evenly matched 115 * at the current typeParameters/typeArguments nested depth 116 */ 117 private boolean areLtsAndGtsBalanced(int currentLtLevel) 118 { 119 return ((currentLtLevel != 0) || ltCounter == currentLtLevel); 120 } 121 122 /** 123 * This int value tracks the depth of a switch expression. Along with the 124 * IDENT to id rule at the end of the parser, this value helps us 125 * to know if the "yield" we are parsing is an IDENT, method call, class, 126 * field, etc. or if it is a java 13+ yield statement. Positive values 127 * indicate that we are within a (possibly nested) switch expression. 128 */ 129 private int switchBlockDepth = 0; 130 131protected GeneratedJavaRecognizer(TokenBuffer tokenBuf, int k) { 132 super(tokenBuf,k); 133 tokenNames = _tokenNames; 134 buildTokenTypeASTClassMap(); 135 astFactory = new ASTFactory(getTokenTypeToASTClassMap()); 136} 137 138public GeneratedJavaRecognizer(TokenBuffer tokenBuf) { 139 this(tokenBuf,2); 140} 141 142protected GeneratedJavaRecognizer(TokenStream lexer, int k) { 143 super(lexer,k); 144 tokenNames = _tokenNames; 145 buildTokenTypeASTClassMap(); 146 astFactory = new ASTFactory(getTokenTypeToASTClassMap()); 147} 148 149public GeneratedJavaRecognizer(TokenStream lexer) { 150 this(lexer,2); 151} 152 153public GeneratedJavaRecognizer(ParserSharedInputState state) { 154 super(state,2); 155 tokenNames = _tokenNames; 156 buildTokenTypeASTClassMap(); 157 astFactory = new ASTFactory(getTokenTypeToASTClassMap()); 158} 159 160 public final void compilationUnit() throws RecognitionException, TokenStreamException { 161 162 returnAST = null; 163 ASTPair currentAST = new ASTPair(); 164 AST compilationUnit_AST = null; 165 166 { 167 boolean synPredMatched4 = false; 168 if (((LA(1)==LITERAL_package||LA(1)==AT) && (_tokenSet_0.member(LA(2))))) { 169 int _m4 = mark(); 170 synPredMatched4 = true; 171 inputState.guessing++; 172 try { 173 { 174 annotations(); 175 match(LITERAL_package); 176 } 177 } 178 catch (RecognitionException pe) { 179 synPredMatched4 = false; 180 } 181 rewind(_m4); 182inputState.guessing--; 183 } 184 if ( synPredMatched4 ) { 185 packageDefinition(); 186 astFactory.addASTChild(currentAST, returnAST); 187 } 188 else if ((_tokenSet_1.member(LA(1))) && (_tokenSet_2.member(LA(2)))) { 189 } 190 else { 191 throw new NoViableAltException(LT(1), getFilename()); 192 } 193 194 } 195 { 196 _loop6: 197 do { 198 if ((LA(1)==SEMI||LA(1)==LITERAL_import) && (_tokenSet_2.member(LA(2)))) { 199 importDefinition(); 200 astFactory.addASTChild(currentAST, returnAST); 201 } 202 else { 203 break _loop6; 204 } 205 206 } while (true); 207 } 208 { 209 _loop8: 210 do { 211 if ((_tokenSet_3.member(LA(1)))) { 212 typeDefinition(); 213 astFactory.addASTChild(currentAST, returnAST); 214 } 215 else { 216 break _loop8; 217 } 218 219 } while (true); 220 } 221 match(Token.EOF_TYPE); 222 compilationUnit_AST = (AST)currentAST.root; 223 returnAST = compilationUnit_AST; 224 } 225 226 public final void annotations() throws RecognitionException, TokenStreamException { 227 228 returnAST = null; 229 ASTPair currentAST = new ASTPair(); 230 AST annotations_AST = null; 231 232 { 233 _loop76: 234 do { 235 if ((LA(1)==AT) && (_tokenSet_0.member(LA(2)))) { 236 annotation(); 237 astFactory.addASTChild(currentAST, returnAST); 238 } 239 else { 240 break _loop76; 241 } 242 243 } while (true); 244 } 245 if ( inputState.guessing==0 ) { 246 annotations_AST = (AST)currentAST.root; 247 annotations_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(ANNOTATIONS,"ANNOTATIONS")).add(annotations_AST)); 248 currentAST.root = annotations_AST; 249 currentAST.child = annotations_AST!=null &&annotations_AST.getFirstChild()!=null ? 250 annotations_AST.getFirstChild() : annotations_AST; 251 currentAST.advanceChildToEnd(); 252 } 253 annotations_AST = (AST)currentAST.root; 254 returnAST = annotations_AST; 255 } 256 257 public final void packageDefinition() throws RecognitionException, TokenStreamException { 258 259 returnAST = null; 260 ASTPair currentAST = new ASTPair(); 261 AST packageDefinition_AST = null; 262 Token p = null; 263 AST p_AST = null; 264 265 try { // for error handling 266 annotations(); 267 astFactory.addASTChild(currentAST, returnAST); 268 p = LT(1); 269 p_AST = astFactory.create(p); 270 astFactory.makeASTRoot(currentAST, p_AST); 271 match(LITERAL_package); 272 if ( inputState.guessing==0 ) { 273 p_AST.setType(PACKAGE_DEF); 274 } 275 identifier(); 276 astFactory.addASTChild(currentAST, returnAST); 277 AST tmp2_AST = null; 278 tmp2_AST = astFactory.create(LT(1)); 279 astFactory.addASTChild(currentAST, tmp2_AST); 280 match(SEMI); 281 packageDefinition_AST = (AST)currentAST.root; 282 } 283 catch (RecognitionException ex) { 284 if (inputState.guessing==0) { 285 reportError(ex); 286 recover(ex,_tokenSet_1); 287 } else { 288 throw ex; 289 } 290 } 291 returnAST = packageDefinition_AST; 292 } 293 294 public final void importDefinition() throws RecognitionException, TokenStreamException { 295 296 returnAST = null; 297 ASTPair currentAST = new ASTPair(); 298 AST importDefinition_AST = null; 299 Token i = null; 300 AST i_AST = null; 301 302 try { // for error handling 303 switch ( LA(1)) { 304 case LITERAL_import: 305 { 306 i = LT(1); 307 i_AST = astFactory.create(i); 308 astFactory.makeASTRoot(currentAST, i_AST); 309 match(LITERAL_import); 310 if ( inputState.guessing==0 ) { 311 i_AST.setType(IMPORT); 312 } 313 { 314 switch ( LA(1)) { 315 case LITERAL_static: 316 { 317 AST tmp3_AST = null; 318 tmp3_AST = astFactory.create(LT(1)); 319 astFactory.addASTChild(currentAST, tmp3_AST); 320 match(LITERAL_static); 321 if ( inputState.guessing==0 ) { 322 i_AST.setType(STATIC_IMPORT); 323 } 324 break; 325 } 326 case IDENT: 327 case LITERAL_record: 328 case LITERAL_yield: 329 { 330 break; 331 } 332 default: 333 { 334 throw new NoViableAltException(LT(1), getFilename()); 335 } 336 } 337 } 338 identifierStar(); 339 astFactory.addASTChild(currentAST, returnAST); 340 AST tmp4_AST = null; 341 tmp4_AST = astFactory.create(LT(1)); 342 astFactory.addASTChild(currentAST, tmp4_AST); 343 match(SEMI); 344 importDefinition_AST = (AST)currentAST.root; 345 break; 346 } 347 case SEMI: 348 { 349 AST tmp5_AST = null; 350 tmp5_AST = astFactory.create(LT(1)); 351 astFactory.addASTChild(currentAST, tmp5_AST); 352 match(SEMI); 353 importDefinition_AST = (AST)currentAST.root; 354 break; 355 } 356 default: 357 { 358 throw new NoViableAltException(LT(1), getFilename()); 359 } 360 } 361 } 362 catch (RecognitionException ex) { 363 if (inputState.guessing==0) { 364 reportError(ex); 365 recover(ex,_tokenSet_1); 366 } else { 367 throw ex; 368 } 369 } 370 returnAST = importDefinition_AST; 371 } 372 373 public final void typeDefinition() throws RecognitionException, TokenStreamException { 374 375 returnAST = null; 376 ASTPair currentAST = new ASTPair(); 377 AST typeDefinition_AST = null; 378 AST m_AST = null; 379 380 try { // for error handling 381 switch ( LA(1)) { 382 case FINAL: 383 case ABSTRACT: 384 case STRICTFP: 385 case LITERAL_private: 386 case LITERAL_public: 387 case LITERAL_protected: 388 case LITERAL_static: 389 case LITERAL_transient: 390 case LITERAL_native: 391 case LITERAL_synchronized: 392 case LITERAL_volatile: 393 case LITERAL_class: 394 case LITERAL_interface: 395 case LITERAL_default: 396 case ENUM: 397 case AT: 398 case LITERAL_record: 399 { 400 modifiers(); 401 m_AST = (AST)returnAST; 402 typeDefinitionInternal(m_AST); 403 astFactory.addASTChild(currentAST, returnAST); 404 typeDefinition_AST = (AST)currentAST.root; 405 break; 406 } 407 case SEMI: 408 { 409 AST tmp6_AST = null; 410 tmp6_AST = astFactory.create(LT(1)); 411 astFactory.addASTChild(currentAST, tmp6_AST); 412 match(SEMI); 413 typeDefinition_AST = (AST)currentAST.root; 414 break; 415 } 416 default: 417 { 418 throw new NoViableAltException(LT(1), getFilename()); 419 } 420 } 421 } 422 catch (RecognitionException ex) { 423 if (inputState.guessing==0) { 424 reportError(ex); 425 recover(ex,_tokenSet_4); 426 } else { 427 throw ex; 428 } 429 } 430 returnAST = typeDefinition_AST; 431 } 432 433 public final void identifier() throws RecognitionException, TokenStreamException { 434 435 returnAST = null; 436 ASTPair currentAST = new ASTPair(); 437 AST identifier_AST = null; 438 439 id(); 440 astFactory.addASTChild(currentAST, returnAST); 441 { 442 _loop62: 443 do { 444 if ((LA(1)==DOT)) { 445 AST tmp7_AST = null; 446 tmp7_AST = astFactory.create(LT(1)); 447 astFactory.makeASTRoot(currentAST, tmp7_AST); 448 match(DOT); 449 id(); 450 astFactory.addASTChild(currentAST, returnAST); 451 } 452 else { 453 break _loop62; 454 } 455 456 } while (true); 457 } 458 identifier_AST = (AST)currentAST.root; 459 returnAST = identifier_AST; 460 } 461 462 public final void identifierStar() throws RecognitionException, TokenStreamException { 463 464 returnAST = null; 465 ASTPair currentAST = new ASTPair(); 466 AST identifierStar_AST = null; 467 468 id(); 469 astFactory.addASTChild(currentAST, returnAST); 470 { 471 _loop65: 472 do { 473 if ((LA(1)==DOT) && (_tokenSet_0.member(LA(2)))) { 474 AST tmp8_AST = null; 475 tmp8_AST = astFactory.create(LT(1)); 476 astFactory.makeASTRoot(currentAST, tmp8_AST); 477 match(DOT); 478 id(); 479 astFactory.addASTChild(currentAST, returnAST); 480 } 481 else { 482 break _loop65; 483 } 484 485 } while (true); 486 } 487 { 488 switch ( LA(1)) { 489 case DOT: 490 { 491 AST tmp9_AST = null; 492 tmp9_AST = astFactory.create(LT(1)); 493 astFactory.makeASTRoot(currentAST, tmp9_AST); 494 match(DOT); 495 AST tmp10_AST = null; 496 tmp10_AST = astFactory.create(LT(1)); 497 astFactory.addASTChild(currentAST, tmp10_AST); 498 match(STAR); 499 break; 500 } 501 case SEMI: 502 { 503 break; 504 } 505 default: 506 { 507 throw new NoViableAltException(LT(1), getFilename()); 508 } 509 } 510 } 511 identifierStar_AST = (AST)currentAST.root; 512 returnAST = identifierStar_AST; 513 } 514 515 public final void modifiers() throws RecognitionException, TokenStreamException { 516 517 returnAST = null; 518 ASTPair currentAST = new ASTPair(); 519 AST modifiers_AST = null; 520 521 { 522 _loop69: 523 do { 524 if ((_tokenSet_5.member(LA(1)))) { 525 modifier(); 526 astFactory.addASTChild(currentAST, returnAST); 527 } 528 else if (((LA(1)==AT) && (_tokenSet_0.member(LA(2))))&&(LA(1)==AT && !LT(2).getText().equals("interface"))) { 529 annotation(); 530 astFactory.addASTChild(currentAST, returnAST); 531 } 532 else { 533 break _loop69; 534 } 535 536 } while (true); 537 } 538 if ( inputState.guessing==0 ) { 539 modifiers_AST = (AST)currentAST.root; 540 modifiers_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(MODIFIERS,"MODIFIERS")).add(modifiers_AST)); 541 currentAST.root = modifiers_AST; 542 currentAST.child = modifiers_AST!=null &&modifiers_AST.getFirstChild()!=null ? 543 modifiers_AST.getFirstChild() : modifiers_AST; 544 currentAST.advanceChildToEnd(); 545 } 546 modifiers_AST = (AST)currentAST.root; 547 returnAST = modifiers_AST; 548 } 549 550 protected final void typeDefinitionInternal( 551 AST modifiers 552 ) throws RecognitionException, TokenStreamException { 553 554 returnAST = null; 555 ASTPair currentAST = new ASTPair(); 556 AST typeDefinitionInternal_AST = null; 557 558 switch ( LA(1)) { 559 case LITERAL_class: 560 { 561 classDefinition(modifiers); 562 astFactory.addASTChild(currentAST, returnAST); 563 typeDefinitionInternal_AST = (AST)currentAST.root; 564 break; 565 } 566 case LITERAL_interface: 567 { 568 interfaceDefinition(modifiers); 569 astFactory.addASTChild(currentAST, returnAST); 570 typeDefinitionInternal_AST = (AST)currentAST.root; 571 break; 572 } 573 case ENUM: 574 { 575 enumDefinition(modifiers); 576 astFactory.addASTChild(currentAST, returnAST); 577 typeDefinitionInternal_AST = (AST)currentAST.root; 578 break; 579 } 580 case AT: 581 { 582 annotationDefinition(modifiers); 583 astFactory.addASTChild(currentAST, returnAST); 584 typeDefinitionInternal_AST = (AST)currentAST.root; 585 break; 586 } 587 case LITERAL_record: 588 { 589 recordDefinition(modifiers); 590 astFactory.addASTChild(currentAST, returnAST); 591 typeDefinitionInternal_AST = (AST)currentAST.root; 592 break; 593 } 594 default: 595 { 596 throw new NoViableAltException(LT(1), getFilename()); 597 } 598 } 599 returnAST = typeDefinitionInternal_AST; 600 } 601 602 public final void classDefinition( 603 AST modifiers 604 ) throws RecognitionException, TokenStreamException { 605 606 returnAST = null; 607 ASTPair currentAST = new ASTPair(); 608 AST classDefinition_AST = null; 609 Token c = null; 610 AST c_AST = null; 611 AST id_AST = null; 612 AST tp_AST = null; 613 AST sc_AST = null; 614 AST ic_AST = null; 615 AST cb_AST = null; 616 617 c = LT(1); 618 c_AST = astFactory.create(c); 619 match(LITERAL_class); 620 id(); 621 id_AST = (AST)returnAST; 622 { 623 switch ( LA(1)) { 624 case LT: 625 { 626 typeParameters(); 627 tp_AST = (AST)returnAST; 628 break; 629 } 630 case LITERAL_extends: 631 case LCURLY: 632 case LITERAL_implements: 633 { 634 break; 635 } 636 default: 637 { 638 throw new NoViableAltException(LT(1), getFilename()); 639 } 640 } 641 } 642 superClassClause(); 643 sc_AST = (AST)returnAST; 644 implementsClause(); 645 ic_AST = (AST)returnAST; 646 classBlock(); 647 cb_AST = (AST)returnAST; 648 if ( inputState.guessing==0 ) { 649 classDefinition_AST = (AST)currentAST.root; 650 classDefinition_AST = (AST)astFactory.make( (new ASTArray(8)).add(astFactory.create(CLASS_DEF,"CLASS_DEF")).add(modifiers).add(c_AST).add(id_AST).add(tp_AST).add(sc_AST).add(ic_AST).add(cb_AST)); 651 currentAST.root = classDefinition_AST; 652 currentAST.child = classDefinition_AST!=null &&classDefinition_AST.getFirstChild()!=null ? 653 classDefinition_AST.getFirstChild() : classDefinition_AST; 654 currentAST.advanceChildToEnd(); 655 } 656 returnAST = classDefinition_AST; 657 } 658 659 public final void interfaceDefinition( 660 AST modifiers 661 ) throws RecognitionException, TokenStreamException { 662 663 returnAST = null; 664 ASTPair currentAST = new ASTPair(); 665 AST interfaceDefinition_AST = null; 666 Token i = null; 667 AST i_AST = null; 668 AST id_AST = null; 669 AST tp_AST = null; 670 AST ie_AST = null; 671 AST cb_AST = null; 672 673 i = LT(1); 674 i_AST = astFactory.create(i); 675 match(LITERAL_interface); 676 id(); 677 id_AST = (AST)returnAST; 678 { 679 switch ( LA(1)) { 680 case LT: 681 { 682 typeParameters(); 683 tp_AST = (AST)returnAST; 684 break; 685 } 686 case LITERAL_extends: 687 case LCURLY: 688 { 689 break; 690 } 691 default: 692 { 693 throw new NoViableAltException(LT(1), getFilename()); 694 } 695 } 696 } 697 interfaceExtends(); 698 ie_AST = (AST)returnAST; 699 classBlock(); 700 cb_AST = (AST)returnAST; 701 if ( inputState.guessing==0 ) { 702 interfaceDefinition_AST = (AST)currentAST.root; 703 interfaceDefinition_AST = (AST)astFactory.make( (new ASTArray(7)).add(astFactory.create(INTERFACE_DEF,"INTERFACE_DEF")).add(modifiers).add(i_AST).add(id_AST).add(tp_AST).add(ie_AST).add(cb_AST)); 704 currentAST.root = interfaceDefinition_AST; 705 currentAST.child = interfaceDefinition_AST!=null &&interfaceDefinition_AST.getFirstChild()!=null ? 706 interfaceDefinition_AST.getFirstChild() : interfaceDefinition_AST; 707 currentAST.advanceChildToEnd(); 708 } 709 returnAST = interfaceDefinition_AST; 710 } 711 712 public final void enumDefinition( 713 AST modifiers 714 ) throws RecognitionException, TokenStreamException { 715 716 returnAST = null; 717 ASTPair currentAST = new ASTPair(); 718 AST enumDefinition_AST = null; 719 Token e = null; 720 AST e_AST = null; 721 AST id_AST = null; 722 AST ic_AST = null; 723 AST eb_AST = null; 724 725 e = LT(1); 726 e_AST = astFactory.create(e); 727 match(ENUM); 728 id(); 729 id_AST = (AST)returnAST; 730 implementsClause(); 731 ic_AST = (AST)returnAST; 732 enumBlock(); 733 eb_AST = (AST)returnAST; 734 if ( inputState.guessing==0 ) { 735 enumDefinition_AST = (AST)currentAST.root; 736 enumDefinition_AST = (AST)astFactory.make( (new ASTArray(6)).add(astFactory.create(ENUM_DEF,"ENUM_DEF")).add(modifiers).add(e_AST).add(id_AST).add(ic_AST).add(eb_AST)); 737 currentAST.root = enumDefinition_AST; 738 currentAST.child = enumDefinition_AST!=null &&enumDefinition_AST.getFirstChild()!=null ? 739 enumDefinition_AST.getFirstChild() : enumDefinition_AST; 740 currentAST.advanceChildToEnd(); 741 } 742 returnAST = enumDefinition_AST; 743 } 744 745 public final void annotationDefinition( 746 AST modifiers 747 ) throws RecognitionException, TokenStreamException { 748 749 returnAST = null; 750 ASTPair currentAST = new ASTPair(); 751 AST annotationDefinition_AST = null; 752 Token a = null; 753 AST a_AST = null; 754 Token i = null; 755 AST i_AST = null; 756 AST id_AST = null; 757 AST ab_AST = null; 758 759 a = LT(1); 760 a_AST = astFactory.create(a); 761 match(AT); 762 i = LT(1); 763 i_AST = astFactory.create(i); 764 match(LITERAL_interface); 765 id(); 766 id_AST = (AST)returnAST; 767 annotationBlock(); 768 ab_AST = (AST)returnAST; 769 if ( inputState.guessing==0 ) { 770 annotationDefinition_AST = (AST)currentAST.root; 771 annotationDefinition_AST = (AST)astFactory.make( (new ASTArray(6)).add(astFactory.create(ANNOTATION_DEF,"ANNOTATION_DEF")).add(modifiers).add(a_AST).add(i_AST).add(id_AST).add(ab_AST)); 772 currentAST.root = annotationDefinition_AST; 773 currentAST.child = annotationDefinition_AST!=null &&annotationDefinition_AST.getFirstChild()!=null ? 774 annotationDefinition_AST.getFirstChild() : annotationDefinition_AST; 775 currentAST.advanceChildToEnd(); 776 } 777 returnAST = annotationDefinition_AST; 778 } 779 780 public final void recordDefinition( 781 AST modifiers 782 ) throws RecognitionException, TokenStreamException { 783 784 returnAST = null; 785 ASTPair currentAST = new ASTPair(); 786 AST recordDefinition_AST = null; 787 Token r = null; 788 AST r_AST = null; 789 AST id_AST = null; 790 AST tp_AST = null; 791 AST rc_AST = null; 792 AST ic_AST = null; 793 AST rb_AST = null; 794 795 r = LT(1); 796 r_AST = astFactory.create(r); 797 match(LITERAL_record); 798 id(); 799 id_AST = (AST)returnAST; 800 { 801 switch ( LA(1)) { 802 case LT: 803 { 804 typeParameters(); 805 tp_AST = (AST)returnAST; 806 break; 807 } 808 case LPAREN: 809 { 810 break; 811 } 812 default: 813 { 814 throw new NoViableAltException(LT(1), getFilename()); 815 } 816 } 817 } 818 recordComponentsList(); 819 rc_AST = (AST)returnAST; 820 implementsClause(); 821 ic_AST = (AST)returnAST; 822 recordBodyDeclaration(); 823 rb_AST = (AST)returnAST; 824 if ( inputState.guessing==0 ) { 825 recordDefinition_AST = (AST)currentAST.root; 826 recordDefinition_AST = (AST)astFactory.make( (new ASTArray(8)).add(astFactory.create(RECORD_DEF,"RECORD_DEF")).add(modifiers).add(r_AST).add(id_AST).add(tp_AST).add(ic_AST).add(rc_AST).add(rb_AST)); 827 currentAST.root = recordDefinition_AST; 828 currentAST.child = recordDefinition_AST!=null &&recordDefinition_AST.getFirstChild()!=null ? 829 recordDefinition_AST.getFirstChild() : recordDefinition_AST; 830 currentAST.advanceChildToEnd(); 831 } 832 returnAST = recordDefinition_AST; 833 } 834 835 public final void typeSpec( 836 boolean addImagNode 837 ) throws RecognitionException, TokenStreamException { 838 839 returnAST = null; 840 ASTPair currentAST = new ASTPair(); 841 AST typeSpec_AST = null; 842 843 switch ( LA(1)) { 844 case IDENT: 845 case AT: 846 case LITERAL_record: 847 case LITERAL_yield: 848 { 849 classTypeSpec(addImagNode); 850 astFactory.addASTChild(currentAST, returnAST); 851 typeSpec_AST = (AST)currentAST.root; 852 break; 853 } 854 case LITERAL_void: 855 case LITERAL_boolean: 856 case LITERAL_byte: 857 case LITERAL_char: 858 case LITERAL_short: 859 case LITERAL_int: 860 case LITERAL_float: 861 case LITERAL_long: 862 case LITERAL_double: 863 { 864 builtInTypeSpec(addImagNode); 865 astFactory.addASTChild(currentAST, returnAST); 866 typeSpec_AST = (AST)currentAST.root; 867 break; 868 } 869 default: 870 { 871 throw new NoViableAltException(LT(1), getFilename()); 872 } 873 } 874 returnAST = typeSpec_AST; 875 } 876 877 public final void classTypeSpec( 878 boolean addImagNode 879 ) throws RecognitionException, TokenStreamException { 880 881 returnAST = null; 882 ASTPair currentAST = new ASTPair(); 883 AST classTypeSpec_AST = null; 884 Token lb = null; 885 AST lb_AST = null; 886 887 classOrInterfaceType(addImagNode); 888 astFactory.addASTChild(currentAST, returnAST); 889 { 890 _loop24: 891 do { 892 if ((LA(1)==LBRACK||LA(1)==AT) && (_tokenSet_6.member(LA(2)))) { 893 { 894 if (((LA(1)==LBRACK||LA(1)==AT) && (_tokenSet_6.member(LA(2))))&&(LA(1) == AT)) { 895 annotations(); 896 astFactory.addASTChild(currentAST, returnAST); 897 } 898 else if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) { 899 } 900 else { 901 throw new NoViableAltException(LT(1), getFilename()); 902 } 903 904 } 905 lb = LT(1); 906 lb_AST = astFactory.create(lb); 907 astFactory.makeASTRoot(currentAST, lb_AST); 908 match(LBRACK); 909 if ( inputState.guessing==0 ) { 910 lb_AST.setType(ARRAY_DECLARATOR); 911 } 912 AST tmp11_AST = null; 913 tmp11_AST = astFactory.create(LT(1)); 914 astFactory.addASTChild(currentAST, tmp11_AST); 915 match(RBRACK); 916 } 917 else { 918 break _loop24; 919 } 920 921 } while (true); 922 } 923 if ( inputState.guessing==0 ) { 924 classTypeSpec_AST = (AST)currentAST.root; 925 926 if ( addImagNode ) { 927 classTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(classTypeSpec_AST)); 928 } 929 930 currentAST.root = classTypeSpec_AST; 931 currentAST.child = classTypeSpec_AST!=null &&classTypeSpec_AST.getFirstChild()!=null ? 932 classTypeSpec_AST.getFirstChild() : classTypeSpec_AST; 933 currentAST.advanceChildToEnd(); 934 } 935 classTypeSpec_AST = (AST)currentAST.root; 936 returnAST = classTypeSpec_AST; 937 } 938 939 public final void builtInTypeSpec( 940 boolean addImagNode 941 ) throws RecognitionException, TokenStreamException { 942 943 returnAST = null; 944 ASTPair currentAST = new ASTPair(); 945 AST builtInTypeSpec_AST = null; 946 Token lb = null; 947 AST lb_AST = null; 948 949 builtInType(); 950 astFactory.addASTChild(currentAST, returnAST); 951 { 952 _loop54: 953 do { 954 if ((LA(1)==LBRACK||LA(1)==AT) && (_tokenSet_6.member(LA(2)))) { 955 { 956 if (((LA(1)==LBRACK||LA(1)==AT) && (_tokenSet_6.member(LA(2))))&&(LA(1) == AT)) { 957 annotations(); 958 astFactory.addASTChild(currentAST, returnAST); 959 } 960 else if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) { 961 } 962 else { 963 throw new NoViableAltException(LT(1), getFilename()); 964 } 965 966 } 967 lb = LT(1); 968 lb_AST = astFactory.create(lb); 969 astFactory.makeASTRoot(currentAST, lb_AST); 970 match(LBRACK); 971 if ( inputState.guessing==0 ) { 972 lb_AST.setType(ARRAY_DECLARATOR); 973 } 974 AST tmp12_AST = null; 975 tmp12_AST = astFactory.create(LT(1)); 976 astFactory.addASTChild(currentAST, tmp12_AST); 977 match(RBRACK); 978 } 979 else { 980 break _loop54; 981 } 982 983 } while (true); 984 } 985 if ( inputState.guessing==0 ) { 986 builtInTypeSpec_AST = (AST)currentAST.root; 987 988 if ( addImagNode ) { 989 builtInTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(builtInTypeSpec_AST)); 990 } 991 992 currentAST.root = builtInTypeSpec_AST; 993 currentAST.child = builtInTypeSpec_AST!=null &&builtInTypeSpec_AST.getFirstChild()!=null ? 994 builtInTypeSpec_AST.getFirstChild() : builtInTypeSpec_AST; 995 currentAST.advanceChildToEnd(); 996 } 997 builtInTypeSpec_AST = (AST)currentAST.root; 998 returnAST = builtInTypeSpec_AST; 999 } 1000 1001 public final void variableLengthParameterTypeSpec() throws RecognitionException, TokenStreamException { 1002 1003 returnAST = null; 1004 ASTPair currentAST = new ASTPair(); 1005 AST variableLengthParameterTypeSpec_AST = null; 1006 Token lb = null; 1007 AST lb_AST = null; 1008 1009 { 1010 switch ( LA(1)) { 1011 case IDENT: 1012 case AT: 1013 case LITERAL_record: 1014 case LITERAL_yield: 1015 { 1016 classOrInterfaceType(false); 1017 astFactory.addASTChild(currentAST, returnAST); 1018 break; 1019 } 1020 case LITERAL_void: 1021 case LITERAL_boolean: 1022 case LITERAL_byte: 1023 case LITERAL_char: 1024 case LITERAL_short: 1025 case LITERAL_int: 1026 case LITERAL_float: 1027 case LITERAL_long: 1028 case LITERAL_double: 1029 { 1030 builtInType(); 1031 astFactory.addASTChild(currentAST, returnAST); 1032 break; 1033 } 1034 default: 1035 { 1036 throw new NoViableAltException(LT(1), getFilename()); 1037 } 1038 } 1039 } 1040 { 1041 if (((_tokenSet_7.member(LA(1))) && (_tokenSet_6.member(LA(2))))&&(LA(1) == AT)) { 1042 annotations(); 1043 astFactory.addASTChild(currentAST, returnAST); 1044 } 1045 else if ((LA(1)==LBRACK||LA(1)==ELLIPSIS) && (_tokenSet_6.member(LA(2)))) { 1046 } 1047 else { 1048 throw new NoViableAltException(LT(1), getFilename()); 1049 } 1050 1051 } 1052 { 1053 _loop20: 1054 do { 1055 if ((LA(1)==LBRACK)) { 1056 lb = LT(1); 1057 lb_AST = astFactory.create(lb); 1058 astFactory.makeASTRoot(currentAST, lb_AST); 1059 match(LBRACK); 1060 if ( inputState.guessing==0 ) { 1061 lb_AST.setType(ARRAY_DECLARATOR); 1062 } 1063 AST tmp13_AST = null; 1064 tmp13_AST = astFactory.create(LT(1)); 1065 astFactory.addASTChild(currentAST, tmp13_AST); 1066 match(RBRACK); 1067 { 1068 if (((_tokenSet_7.member(LA(1))) && (_tokenSet_6.member(LA(2))))&&(LA(1) == AT)) { 1069 annotations(); 1070 astFactory.addASTChild(currentAST, returnAST); 1071 } 1072 else if ((LA(1)==LBRACK||LA(1)==ELLIPSIS) && (_tokenSet_6.member(LA(2)))) { 1073 } 1074 else { 1075 throw new NoViableAltException(LT(1), getFilename()); 1076 } 1077 1078 } 1079 } 1080 else { 1081 break _loop20; 1082 } 1083 1084 } while (true); 1085 } 1086 variableLengthParameterTypeSpec_AST = (AST)currentAST.root; 1087 returnAST = variableLengthParameterTypeSpec_AST; 1088 } 1089 1090 public final void classOrInterfaceType( 1091 boolean addImagNode 1092 ) throws RecognitionException, TokenStreamException { 1093 1094 returnAST = null; 1095 ASTPair currentAST = new ASTPair(); 1096 AST classOrInterfaceType_AST = null; 1097 1098 { 1099 if (((_tokenSet_8.member(LA(1))) && (_tokenSet_9.member(LA(2))))&&(LA(1) == AT)) { 1100 annotations(); 1101 astFactory.addASTChild(currentAST, returnAST); 1102 } 1103 else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_9.member(LA(2)))) { 1104 } 1105 else { 1106 throw new NoViableAltException(LT(1), getFilename()); 1107 } 1108 1109 } 1110 id(); 1111 astFactory.addASTChild(currentAST, returnAST); 1112 { 1113 if ((LA(1)==LT) && (_tokenSet_9.member(LA(2)))) { 1114 typeArguments(addImagNode); 1115 astFactory.addASTChild(currentAST, returnAST); 1116 } 1117 else if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2)))) { 1118 } 1119 else { 1120 throw new NoViableAltException(LT(1), getFilename()); 1121 } 1122 1123 } 1124 { 1125 _loop31: 1126 do { 1127 if ((LA(1)==DOT) && (_tokenSet_8.member(LA(2)))) { 1128 AST tmp14_AST = null; 1129 tmp14_AST = astFactory.create(LT(1)); 1130 astFactory.makeASTRoot(currentAST, tmp14_AST); 1131 match(DOT); 1132 { 1133 if (((_tokenSet_8.member(LA(1))) && (_tokenSet_9.member(LA(2))))&&(LA(1) == AT)) { 1134 annotations(); 1135 astFactory.addASTChild(currentAST, returnAST); 1136 } 1137 else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_9.member(LA(2)))) { 1138 } 1139 else { 1140 throw new NoViableAltException(LT(1), getFilename()); 1141 } 1142 1143 } 1144 id(); 1145 astFactory.addASTChild(currentAST, returnAST); 1146 { 1147 if ((LA(1)==LT) && (_tokenSet_9.member(LA(2)))) { 1148 typeArguments(addImagNode); 1149 astFactory.addASTChild(currentAST, returnAST); 1150 } 1151 else if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2)))) { 1152 } 1153 else { 1154 throw new NoViableAltException(LT(1), getFilename()); 1155 } 1156 1157 } 1158 } 1159 else { 1160 break _loop31; 1161 } 1162 1163 } while (true); 1164 } 1165 classOrInterfaceType_AST = (AST)currentAST.root; 1166 returnAST = classOrInterfaceType_AST; 1167 } 1168 1169 public final void builtInType() throws RecognitionException, TokenStreamException { 1170 1171 returnAST = null; 1172 ASTPair currentAST = new ASTPair(); 1173 AST builtInType_AST = null; 1174 1175 switch ( LA(1)) { 1176 case LITERAL_void: 1177 { 1178 AST tmp15_AST = null; 1179 tmp15_AST = astFactory.create(LT(1)); 1180 astFactory.addASTChild(currentAST, tmp15_AST); 1181 match(LITERAL_void); 1182 builtInType_AST = (AST)currentAST.root; 1183 break; 1184 } 1185 case LITERAL_boolean: 1186 { 1187 AST tmp16_AST = null; 1188 tmp16_AST = astFactory.create(LT(1)); 1189 astFactory.addASTChild(currentAST, tmp16_AST); 1190 match(LITERAL_boolean); 1191 builtInType_AST = (AST)currentAST.root; 1192 break; 1193 } 1194 case LITERAL_byte: 1195 { 1196 AST tmp17_AST = null; 1197 tmp17_AST = astFactory.create(LT(1)); 1198 astFactory.addASTChild(currentAST, tmp17_AST); 1199 match(LITERAL_byte); 1200 builtInType_AST = (AST)currentAST.root; 1201 break; 1202 } 1203 case LITERAL_char: 1204 { 1205 AST tmp18_AST = null; 1206 tmp18_AST = astFactory.create(LT(1)); 1207 astFactory.addASTChild(currentAST, tmp18_AST); 1208 match(LITERAL_char); 1209 builtInType_AST = (AST)currentAST.root; 1210 break; 1211 } 1212 case LITERAL_short: 1213 { 1214 AST tmp19_AST = null; 1215 tmp19_AST = astFactory.create(LT(1)); 1216 astFactory.addASTChild(currentAST, tmp19_AST); 1217 match(LITERAL_short); 1218 builtInType_AST = (AST)currentAST.root; 1219 break; 1220 } 1221 case LITERAL_int: 1222 { 1223 AST tmp20_AST = null; 1224 tmp20_AST = astFactory.create(LT(1)); 1225 astFactory.addASTChild(currentAST, tmp20_AST); 1226 match(LITERAL_int); 1227 builtInType_AST = (AST)currentAST.root; 1228 break; 1229 } 1230 case LITERAL_float: 1231 { 1232 AST tmp21_AST = null; 1233 tmp21_AST = astFactory.create(LT(1)); 1234 astFactory.addASTChild(currentAST, tmp21_AST); 1235 match(LITERAL_float); 1236 builtInType_AST = (AST)currentAST.root; 1237 break; 1238 } 1239 case LITERAL_long: 1240 { 1241 AST tmp22_AST = null; 1242 tmp22_AST = astFactory.create(LT(1)); 1243 astFactory.addASTChild(currentAST, tmp22_AST); 1244 match(LITERAL_long); 1245 builtInType_AST = (AST)currentAST.root; 1246 break; 1247 } 1248 case LITERAL_double: 1249 { 1250 AST tmp23_AST = null; 1251 tmp23_AST = astFactory.create(LT(1)); 1252 astFactory.addASTChild(currentAST, tmp23_AST); 1253 match(LITERAL_double); 1254 builtInType_AST = (AST)currentAST.root; 1255 break; 1256 } 1257 default: 1258 { 1259 throw new NoViableAltException(LT(1), getFilename()); 1260 } 1261 } 1262 returnAST = builtInType_AST; 1263 } 1264 1265 public final void id() throws RecognitionException, TokenStreamException { 1266 1267 returnAST = null; 1268 ASTPair currentAST = new ASTPair(); 1269 AST id_AST = null; 1270 1271 switch ( LA(1)) { 1272 case IDENT: 1273 { 1274 AST tmp24_AST = null; 1275 tmp24_AST = astFactory.create(LT(1)); 1276 astFactory.addASTChild(currentAST, tmp24_AST); 1277 match(IDENT); 1278 id_AST = (AST)currentAST.root; 1279 break; 1280 } 1281 case LITERAL_record: 1282 { 1283 recordKey(); 1284 astFactory.addASTChild(currentAST, returnAST); 1285 id_AST = (AST)currentAST.root; 1286 break; 1287 } 1288 case LITERAL_yield: 1289 { 1290 yieldKey(); 1291 astFactory.addASTChild(currentAST, returnAST); 1292 id_AST = (AST)currentAST.root; 1293 break; 1294 } 1295 default: 1296 { 1297 throw new NoViableAltException(LT(1), getFilename()); 1298 } 1299 } 1300 returnAST = id_AST; 1301 } 1302 1303 public final void typeArguments( 1304 boolean addImagNode 1305 ) throws RecognitionException, TokenStreamException { 1306 1307 returnAST = null; 1308 ASTPair currentAST = new ASTPair(); 1309 AST typeArguments_AST = null; 1310 Token lt = null; 1311 AST lt_AST = null; 1312 int currentLtLevel = 0; 1313 1314 if ( inputState.guessing==0 ) { 1315 currentLtLevel = ltCounter; 1316 } 1317 lt = LT(1); 1318 lt_AST = astFactory.create(lt); 1319 astFactory.addASTChild(currentAST, lt_AST); 1320 match(LT); 1321 if ( inputState.guessing==0 ) { 1322 lt_AST.setType(GENERIC_START); ;ltCounter++; 1323 } 1324 { 1325 if ((_tokenSet_11.member(LA(1))) && (_tokenSet_9.member(LA(2)))) { 1326 typeArgument(addImagNode); 1327 astFactory.addASTChild(currentAST, returnAST); 1328 { 1329 _loop43: 1330 do { 1331 if (((LA(1)==COMMA) && (_tokenSet_11.member(LA(2))))&&(gtToReconcile == 0)) { 1332 AST tmp25_AST = null; 1333 tmp25_AST = astFactory.create(LT(1)); 1334 astFactory.addASTChild(currentAST, tmp25_AST); 1335 match(COMMA); 1336 typeArgument(addImagNode); 1337 astFactory.addASTChild(currentAST, returnAST); 1338 } 1339 else { 1340 break _loop43; 1341 } 1342 1343 } while (true); 1344 } 1345 } 1346 else if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2)))) { 1347 } 1348 else { 1349 throw new NoViableAltException(LT(1), getFilename()); 1350 } 1351 1352 } 1353 { 1354 if ((_tokenSet_12.member(LA(1))) && (_tokenSet_9.member(LA(2)))) { 1355 typeArgumentsOrParametersEnd(); 1356 astFactory.addASTChild(currentAST, returnAST); 1357 } 1358 else if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2)))) { 1359 } 1360 else { 1361 throw new NoViableAltException(LT(1), getFilename()); 1362 } 1363 1364 } 1365 if ( inputState.guessing==0 ) { 1366 1367 if (areThereGtsToEmit()) 1368 { 1369 astFactory.addASTChild(currentAST, emitSingleGt()); 1370 } 1371 1372 } 1373 if (!(areLtsAndGtsBalanced(currentLtLevel))) 1374 throw new SemanticException("areLtsAndGtsBalanced(currentLtLevel)"); 1375 if ( inputState.guessing==0 ) { 1376 typeArguments_AST = (AST)currentAST.root; 1377 typeArguments_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE_ARGUMENTS,"TYPE_ARGUMENTS")).add(typeArguments_AST)); 1378 currentAST.root = typeArguments_AST; 1379 currentAST.child = typeArguments_AST!=null &&typeArguments_AST.getFirstChild()!=null ? 1380 typeArguments_AST.getFirstChild() : typeArguments_AST; 1381 currentAST.advanceChildToEnd(); 1382 } 1383 typeArguments_AST = (AST)currentAST.root; 1384 returnAST = typeArguments_AST; 1385 } 1386 1387 public final void typeArgument( 1388 boolean addImagNode 1389 ) throws RecognitionException, TokenStreamException { 1390 1391 returnAST = null; 1392 ASTPair currentAST = new ASTPair(); 1393 AST typeArgument_AST = null; 1394 1395 { 1396 { 1397 if (((_tokenSet_11.member(LA(1))) && (_tokenSet_9.member(LA(2))))&&(LA(1) == AT)) { 1398 annotations(); 1399 astFactory.addASTChild(currentAST, returnAST); 1400 } 1401 else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_9.member(LA(2)))) { 1402 } 1403 else { 1404 throw new NoViableAltException(LT(1), getFilename()); 1405 } 1406 1407 } 1408 { 1409 switch ( LA(1)) { 1410 case IDENT: 1411 case AT: 1412 case LITERAL_record: 1413 case LITERAL_yield: 1414 { 1415 classTypeSpec(addImagNode); 1416 astFactory.addASTChild(currentAST, returnAST); 1417 break; 1418 } 1419 case LITERAL_void: 1420 case LITERAL_boolean: 1421 case LITERAL_byte: 1422 case LITERAL_char: 1423 case LITERAL_short: 1424 case LITERAL_int: 1425 case LITERAL_float: 1426 case LITERAL_long: 1427 case LITERAL_double: 1428 { 1429 builtInTypeSpec(addImagNode); 1430 astFactory.addASTChild(currentAST, returnAST); 1431 break; 1432 } 1433 case QUESTION: 1434 { 1435 wildcardType(addImagNode); 1436 astFactory.addASTChild(currentAST, returnAST); 1437 break; 1438 } 1439 default: 1440 { 1441 throw new NoViableAltException(LT(1), getFilename()); 1442 } 1443 } 1444 } 1445 } 1446 if ( inputState.guessing==0 ) { 1447 typeArgument_AST = (AST)currentAST.root; 1448 typeArgument_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE_ARGUMENT,"TYPE_ARGUMENT")).add(typeArgument_AST)); 1449 currentAST.root = typeArgument_AST; 1450 currentAST.child = typeArgument_AST!=null &&typeArgument_AST.getFirstChild()!=null ? 1451 typeArgument_AST.getFirstChild() : typeArgument_AST; 1452 currentAST.advanceChildToEnd(); 1453 } 1454 typeArgument_AST = (AST)currentAST.root; 1455 returnAST = typeArgument_AST; 1456 } 1457 1458 public final void wildcardType( 1459 boolean addImagNode 1460 ) throws RecognitionException, TokenStreamException { 1461 1462 returnAST = null; 1463 ASTPair currentAST = new ASTPair(); 1464 AST wildcardType_AST = null; 1465 Token q = null; 1466 AST q_AST = null; 1467 1468 q = LT(1); 1469 q_AST = astFactory.create(q); 1470 astFactory.addASTChild(currentAST, q_AST); 1471 match(QUESTION); 1472 if ( inputState.guessing==0 ) { 1473 q_AST.setType(WILDCARD_TYPE); 1474 } 1475 { 1476 boolean synPredMatched39 = false; 1477 if (((LA(1)==LITERAL_extends||LA(1)==LITERAL_super) && (_tokenSet_13.member(LA(2))))) { 1478 int _m39 = mark(); 1479 synPredMatched39 = true; 1480 inputState.guessing++; 1481 try { 1482 { 1483 switch ( LA(1)) { 1484 case LITERAL_extends: 1485 { 1486 match(LITERAL_extends); 1487 break; 1488 } 1489 case LITERAL_super: 1490 { 1491 match(LITERAL_super); 1492 break; 1493 } 1494 default: 1495 { 1496 throw new NoViableAltException(LT(1), getFilename()); 1497 } 1498 } 1499 } 1500 } 1501 catch (RecognitionException pe) { 1502 synPredMatched39 = false; 1503 } 1504 rewind(_m39); 1505inputState.guessing--; 1506 } 1507 if ( synPredMatched39 ) { 1508 typeArgumentBounds(addImagNode); 1509 astFactory.addASTChild(currentAST, returnAST); 1510 } 1511 else if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2)))) { 1512 } 1513 else { 1514 throw new NoViableAltException(LT(1), getFilename()); 1515 } 1516 1517 } 1518 wildcardType_AST = (AST)currentAST.root; 1519 returnAST = wildcardType_AST; 1520 } 1521 1522 public final void typeArgumentBounds( 1523 boolean addImagNode 1524 ) throws RecognitionException, TokenStreamException { 1525 1526 returnAST = null; 1527 ASTPair currentAST = new ASTPair(); 1528 AST typeArgumentBounds_AST = null; 1529 Token e = null; 1530 AST e_AST = null; 1531 Token s = null; 1532 AST s_AST = null; 1533 Token lb = null; 1534 AST lb_AST = null; 1535 1536 { 1537 switch ( LA(1)) { 1538 case LITERAL_extends: 1539 { 1540 e = LT(1); 1541 e_AST = astFactory.create(e); 1542 astFactory.makeASTRoot(currentAST, e_AST); 1543 match(LITERAL_extends); 1544 if ( inputState.guessing==0 ) { 1545 e_AST.setType(TYPE_UPPER_BOUNDS); 1546 } 1547 break; 1548 } 1549 case LITERAL_super: 1550 { 1551 s = LT(1); 1552 s_AST = astFactory.create(s); 1553 astFactory.makeASTRoot(currentAST, s_AST); 1554 match(LITERAL_super); 1555 if ( inputState.guessing==0 ) { 1556 s_AST.setType(TYPE_LOWER_BOUNDS); 1557 } 1558 break; 1559 } 1560 default: 1561 { 1562 throw new NoViableAltException(LT(1), getFilename()); 1563 } 1564 } 1565 } 1566 { 1567 switch ( LA(1)) { 1568 case IDENT: 1569 case AT: 1570 case LITERAL_record: 1571 case LITERAL_yield: 1572 { 1573 classOrInterfaceType(addImagNode); 1574 astFactory.addASTChild(currentAST, returnAST); 1575 break; 1576 } 1577 case LITERAL_void: 1578 case LITERAL_boolean: 1579 case LITERAL_byte: 1580 case LITERAL_char: 1581 case LITERAL_short: 1582 case LITERAL_int: 1583 case LITERAL_float: 1584 case LITERAL_long: 1585 case LITERAL_double: 1586 { 1587 builtInType(); 1588 astFactory.addASTChild(currentAST, returnAST); 1589 break; 1590 } 1591 default: 1592 { 1593 throw new NoViableAltException(LT(1), getFilename()); 1594 } 1595 } 1596 } 1597 { 1598 _loop50: 1599 do { 1600 if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) { 1601 lb = LT(1); 1602 lb_AST = astFactory.create(lb); 1603 astFactory.makeASTRoot(currentAST, lb_AST); 1604 match(LBRACK); 1605 if ( inputState.guessing==0 ) { 1606 lb_AST.setType(ARRAY_DECLARATOR); 1607 } 1608 AST tmp26_AST = null; 1609 tmp26_AST = astFactory.create(LT(1)); 1610 astFactory.addASTChild(currentAST, tmp26_AST); 1611 match(RBRACK); 1612 } 1613 else { 1614 break _loop50; 1615 } 1616 1617 } while (true); 1618 } 1619 typeArgumentBounds_AST = (AST)currentAST.root; 1620 returnAST = typeArgumentBounds_AST; 1621 } 1622 1623 protected final void typeArgumentsOrParametersEnd() throws RecognitionException, TokenStreamException { 1624 1625 returnAST = null; 1626 ASTPair currentAST = new ASTPair(); 1627 AST typeArgumentsOrParametersEnd_AST = null; 1628 Token g = null; 1629 AST g_AST = null; 1630 Token sr = null; 1631 AST sr_AST = null; 1632 Token bsr = null; 1633 AST bsr_AST = null; 1634 1635 switch ( LA(1)) { 1636 case GT: 1637 { 1638 g = LT(1); 1639 g_AST = astFactory.create(g); 1640 match(GT); 1641 if ( inputState.guessing==0 ) { 1642 consumeCurrentGtSequence((DetailAstImpl)g_AST); 1643 } 1644 break; 1645 } 1646 case SR: 1647 { 1648 sr = LT(1); 1649 sr_AST = astFactory.create(sr); 1650 match(SR); 1651 if ( inputState.guessing==0 ) { 1652 consumeCurrentGtSequence((DetailAstImpl)sr_AST); 1653 } 1654 break; 1655 } 1656 case BSR: 1657 { 1658 bsr = LT(1); 1659 bsr_AST = astFactory.create(bsr); 1660 match(BSR); 1661 if ( inputState.guessing==0 ) { 1662 consumeCurrentGtSequence((DetailAstImpl)bsr_AST); 1663 } 1664 break; 1665 } 1666 default: 1667 { 1668 throw new NoViableAltException(LT(1), getFilename()); 1669 } 1670 } 1671 returnAST = typeArgumentsOrParametersEnd_AST; 1672 } 1673 1674 public final void type() throws RecognitionException, TokenStreamException { 1675 1676 returnAST = null; 1677 ASTPair currentAST = new ASTPair(); 1678 AST type_AST = null; 1679 1680 { 1681 if (((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2))))&&(LA(1) == AT)) { 1682 annotations(); 1683 astFactory.addASTChild(currentAST, returnAST); 1684 } 1685 else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2)))) { 1686 } 1687 else { 1688 throw new NoViableAltException(LT(1), getFilename()); 1689 } 1690 1691 } 1692 { 1693 switch ( LA(1)) { 1694 case IDENT: 1695 case AT: 1696 case LITERAL_record: 1697 case LITERAL_yield: 1698 { 1699 classOrInterfaceType(false); 1700 astFactory.addASTChild(currentAST, returnAST); 1701 break; 1702 } 1703 case LITERAL_void: 1704 case LITERAL_boolean: 1705 case LITERAL_byte: 1706 case LITERAL_char: 1707 case LITERAL_short: 1708 case LITERAL_int: 1709 case LITERAL_float: 1710 case LITERAL_long: 1711 case LITERAL_double: 1712 { 1713 builtInType(); 1714 astFactory.addASTChild(currentAST, returnAST); 1715 break; 1716 } 1717 default: 1718 { 1719 throw new NoViableAltException(LT(1), getFilename()); 1720 } 1721 } 1722 } 1723 type_AST = (AST)currentAST.root; 1724 returnAST = type_AST; 1725 } 1726 1727/** A declaration is the creation of a reference or primitive-type variable 1728 * Create a separate Type/Var tree for each var in the var list. 1729 @throws RecognitionException if recognition problem occurs. 1730 @throws TokenStreamException if problem occurs while generating a stream of tokens. 1731 */ 1732 public final void declaration() throws RecognitionException, TokenStreamException { 1733 1734 returnAST = null; 1735 ASTPair currentAST = new ASTPair(); 1736 AST declaration_AST = null; 1737 AST m_AST = null; 1738 AST t_AST = null; 1739 AST v_AST = null; 1740 1741 modifiers(); 1742 m_AST = (AST)returnAST; 1743 typeSpec(false); 1744 t_AST = (AST)returnAST; 1745 variableDefinitions(m_AST,t_AST); 1746 v_AST = (AST)returnAST; 1747 if ( inputState.guessing==0 ) { 1748 declaration_AST = (AST)currentAST.root; 1749 declaration_AST = v_AST; 1750 currentAST.root = declaration_AST; 1751 currentAST.child = declaration_AST!=null &&declaration_AST.getFirstChild()!=null ? 1752 declaration_AST.getFirstChild() : declaration_AST; 1753 currentAST.advanceChildToEnd(); 1754 } 1755 returnAST = declaration_AST; 1756 } 1757 1758 public final void variableDefinitions( 1759 AST mods, AST t 1760 ) throws RecognitionException, TokenStreamException { 1761 1762 returnAST = null; 1763 ASTPair currentAST = new ASTPair(); 1764 AST variableDefinitions_AST = null; 1765 1766 variableDeclarator((AST) getASTFactory().dupTree(mods), 1767 //dupList as this also copies siblings (like TYPE_ARGUMENTS) 1768 (AST) getASTFactory().dupList(t)); 1769 astFactory.addASTChild(currentAST, returnAST); 1770 { 1771 _loop193: 1772 do { 1773 if ((LA(1)==COMMA)) { 1774 AST tmp27_AST = null; 1775 tmp27_AST = astFactory.create(LT(1)); 1776 astFactory.addASTChild(currentAST, tmp27_AST); 1777 match(COMMA); 1778 variableDeclarator((AST) getASTFactory().dupTree(mods), 1779 //dupList as this also copies siblings (like TYPE_ARGUMENTS) 1780 (AST) getASTFactory().dupList(t)); 1781 astFactory.addASTChild(currentAST, returnAST); 1782 } 1783 else { 1784 break _loop193; 1785 } 1786 1787 } while (true); 1788 } 1789 variableDefinitions_AST = (AST)currentAST.root; 1790 returnAST = variableDefinitions_AST; 1791 } 1792 1793 public final void modifier() throws RecognitionException, TokenStreamException { 1794 1795 returnAST = null; 1796 ASTPair currentAST = new ASTPair(); 1797 AST modifier_AST = null; 1798 1799 switch ( LA(1)) { 1800 case LITERAL_private: 1801 { 1802 AST tmp28_AST = null; 1803 tmp28_AST = astFactory.create(LT(1)); 1804 astFactory.addASTChild(currentAST, tmp28_AST); 1805 match(LITERAL_private); 1806 modifier_AST = (AST)currentAST.root; 1807 break; 1808 } 1809 case LITERAL_public: 1810 { 1811 AST tmp29_AST = null; 1812 tmp29_AST = astFactory.create(LT(1)); 1813 astFactory.addASTChild(currentAST, tmp29_AST); 1814 match(LITERAL_public); 1815 modifier_AST = (AST)currentAST.root; 1816 break; 1817 } 1818 case LITERAL_protected: 1819 { 1820 AST tmp30_AST = null; 1821 tmp30_AST = astFactory.create(LT(1)); 1822 astFactory.addASTChild(currentAST, tmp30_AST); 1823 match(LITERAL_protected); 1824 modifier_AST = (AST)currentAST.root; 1825 break; 1826 } 1827 case LITERAL_static: 1828 { 1829 AST tmp31_AST = null; 1830 tmp31_AST = astFactory.create(LT(1)); 1831 astFactory.addASTChild(currentAST, tmp31_AST); 1832 match(LITERAL_static); 1833 modifier_AST = (AST)currentAST.root; 1834 break; 1835 } 1836 case LITERAL_transient: 1837 { 1838 AST tmp32_AST = null; 1839 tmp32_AST = astFactory.create(LT(1)); 1840 astFactory.addASTChild(currentAST, tmp32_AST); 1841 match(LITERAL_transient); 1842 modifier_AST = (AST)currentAST.root; 1843 break; 1844 } 1845 case FINAL: 1846 { 1847 AST tmp33_AST = null; 1848 tmp33_AST = astFactory.create(LT(1)); 1849 astFactory.addASTChild(currentAST, tmp33_AST); 1850 match(FINAL); 1851 modifier_AST = (AST)currentAST.root; 1852 break; 1853 } 1854 case ABSTRACT: 1855 { 1856 AST tmp34_AST = null; 1857 tmp34_AST = astFactory.create(LT(1)); 1858 astFactory.addASTChild(currentAST, tmp34_AST); 1859 match(ABSTRACT); 1860 modifier_AST = (AST)currentAST.root; 1861 break; 1862 } 1863 case LITERAL_native: 1864 { 1865 AST tmp35_AST = null; 1866 tmp35_AST = astFactory.create(LT(1)); 1867 astFactory.addASTChild(currentAST, tmp35_AST); 1868 match(LITERAL_native); 1869 modifier_AST = (AST)currentAST.root; 1870 break; 1871 } 1872 case LITERAL_synchronized: 1873 { 1874 AST tmp36_AST = null; 1875 tmp36_AST = astFactory.create(LT(1)); 1876 astFactory.addASTChild(currentAST, tmp36_AST); 1877 match(LITERAL_synchronized); 1878 modifier_AST = (AST)currentAST.root; 1879 break; 1880 } 1881 case LITERAL_volatile: 1882 { 1883 AST tmp37_AST = null; 1884 tmp37_AST = astFactory.create(LT(1)); 1885 astFactory.addASTChild(currentAST, tmp37_AST); 1886 match(LITERAL_volatile); 1887 modifier_AST = (AST)currentAST.root; 1888 break; 1889 } 1890 case STRICTFP: 1891 { 1892 AST tmp38_AST = null; 1893 tmp38_AST = astFactory.create(LT(1)); 1894 astFactory.addASTChild(currentAST, tmp38_AST); 1895 match(STRICTFP); 1896 modifier_AST = (AST)currentAST.root; 1897 break; 1898 } 1899 case LITERAL_default: 1900 { 1901 AST tmp39_AST = null; 1902 tmp39_AST = astFactory.create(LT(1)); 1903 astFactory.addASTChild(currentAST, tmp39_AST); 1904 match(LITERAL_default); 1905 modifier_AST = (AST)currentAST.root; 1906 break; 1907 } 1908 default: 1909 { 1910 throw new NoViableAltException(LT(1), getFilename()); 1911 } 1912 } 1913 returnAST = modifier_AST; 1914 } 1915 1916 public final void annotation() throws RecognitionException, TokenStreamException { 1917 1918 returnAST = null; 1919 ASTPair currentAST = new ASTPair(); 1920 AST annotation_AST = null; 1921 AST i_AST = null; 1922 Token l = null; 1923 AST l_AST = null; 1924 AST args_AST = null; 1925 Token r = null; 1926 AST r_AST = null; 1927 1928 AST tmp40_AST = null; 1929 tmp40_AST = astFactory.create(LT(1)); 1930 match(AT); 1931 identifier(); 1932 i_AST = (AST)returnAST; 1933 { 1934 switch ( LA(1)) { 1935 case LPAREN: 1936 { 1937 l = LT(1); 1938 l_AST = astFactory.create(l); 1939 match(LPAREN); 1940 { 1941 switch ( LA(1)) { 1942 case LITERAL_void: 1943 case LITERAL_boolean: 1944 case LITERAL_byte: 1945 case LITERAL_char: 1946 case LITERAL_short: 1947 case LITERAL_int: 1948 case LITERAL_float: 1949 case LITERAL_long: 1950 case LITERAL_double: 1951 case IDENT: 1952 case LCURLY: 1953 case LPAREN: 1954 case LITERAL_this: 1955 case LITERAL_super: 1956 case LITERAL_switch: 1957 case PLUS: 1958 case MINUS: 1959 case INC: 1960 case DEC: 1961 case BNOT: 1962 case LNOT: 1963 case LITERAL_true: 1964 case LITERAL_false: 1965 case LITERAL_null: 1966 case LITERAL_new: 1967 case NUM_INT: 1968 case CHAR_LITERAL: 1969 case STRING_LITERAL: 1970 case NUM_FLOAT: 1971 case NUM_LONG: 1972 case NUM_DOUBLE: 1973 case AT: 1974 case LITERAL_record: 1975 case TEXT_BLOCK_CONTENT: 1976 case LITERAL_yield: 1977 { 1978 annotationArguments(); 1979 args_AST = (AST)returnAST; 1980 break; 1981 } 1982 case RPAREN: 1983 { 1984 break; 1985 } 1986 default: 1987 { 1988 throw new NoViableAltException(LT(1), getFilename()); 1989 } 1990 } 1991 } 1992 r = LT(1); 1993 r_AST = astFactory.create(r); 1994 match(RPAREN); 1995 break; 1996 } 1997 case FINAL: 1998 case ABSTRACT: 1999 case STRICTFP: 2000 case LITERAL_package: 2001 case SEMI: 2002 case LBRACK: 2003 case LITERAL_void: 2004 case LITERAL_boolean: 2005 case LITERAL_byte: 2006 case LITERAL_char: 2007 case LITERAL_short: 2008 case LITERAL_int: 2009 case LITERAL_float: 2010 case LITERAL_long: 2011 case LITERAL_double: 2012 case IDENT: 2013 case LITERAL_private: 2014 case LITERAL_public: 2015 case LITERAL_protected: 2016 case LITERAL_static: 2017 case LITERAL_transient: 2018 case LITERAL_native: 2019 case LITERAL_synchronized: 2020 case LITERAL_volatile: 2021 case LITERAL_class: 2022 case LITERAL_interface: 2023 case RCURLY: 2024 case COMMA: 2025 case RPAREN: 2026 case LITERAL_this: 2027 case LITERAL_default: 2028 case QUESTION: 2029 case LT: 2030 case ENUM: 2031 case AT: 2032 case ELLIPSIS: 2033 case LITERAL_record: 2034 case LITERAL_yield: 2035 { 2036 break; 2037 } 2038 default: 2039 { 2040 throw new NoViableAltException(LT(1), getFilename()); 2041 } 2042 } 2043 } 2044 if ( inputState.guessing==0 ) { 2045 annotation_AST = (AST)currentAST.root; 2046 annotation_AST = (AST)astFactory.make( (new ASTArray(6)).add(astFactory.create(ANNOTATION,"ANNOTATION")).add(tmp40_AST).add(i_AST).add(l_AST).add(args_AST).add(r_AST)); 2047 currentAST.root = annotation_AST; 2048 currentAST.child = annotation_AST!=null &&annotation_AST.getFirstChild()!=null ? 2049 annotation_AST.getFirstChild() : annotation_AST; 2050 currentAST.advanceChildToEnd(); 2051 } 2052 returnAST = annotation_AST; 2053 } 2054 2055 public final void annotationArguments() throws RecognitionException, TokenStreamException { 2056 2057 returnAST = null; 2058 ASTPair currentAST = new ASTPair(); 2059 AST annotationArguments_AST = null; 2060 2061 if ((_tokenSet_15.member(LA(1))) && (_tokenSet_16.member(LA(2)))) { 2062 annotationMemberValueInitializer(); 2063 astFactory.addASTChild(currentAST, returnAST); 2064 annotationArguments_AST = (AST)currentAST.root; 2065 } 2066 else if ((_tokenSet_0.member(LA(1))) && (LA(2)==ASSIGN)) { 2067 annotationMemberValuePairs(); 2068 astFactory.addASTChild(currentAST, returnAST); 2069 annotationArguments_AST = (AST)currentAST.root; 2070 } 2071 else { 2072 throw new NoViableAltException(LT(1), getFilename()); 2073 } 2074 2075 returnAST = annotationArguments_AST; 2076 } 2077 2078 public final void annotationMemberValueInitializer() throws RecognitionException, TokenStreamException { 2079 2080 returnAST = null; 2081 ASTPair currentAST = new ASTPair(); 2082 AST annotationMemberValueInitializer_AST = null; 2083 2084 boolean synPredMatched84 = false; 2085 if (((_tokenSet_17.member(LA(1))) && (_tokenSet_18.member(LA(2))))) { 2086 int _m84 = mark(); 2087 synPredMatched84 = true; 2088 inputState.guessing++; 2089 try { 2090 { 2091 annotationExpression(); 2092 } 2093 } 2094 catch (RecognitionException pe) { 2095 synPredMatched84 = false; 2096 } 2097 rewind(_m84); 2098inputState.guessing--; 2099 } 2100 if ( synPredMatched84 ) { 2101 annotationExpression(); 2102 astFactory.addASTChild(currentAST, returnAST); 2103 annotationMemberValueInitializer_AST = (AST)currentAST.root; 2104 } 2105 else if ((LA(1)==AT) && (_tokenSet_0.member(LA(2)))) { 2106 annotation(); 2107 astFactory.addASTChild(currentAST, returnAST); 2108 annotationMemberValueInitializer_AST = (AST)currentAST.root; 2109 } 2110 else if ((LA(1)==LCURLY)) { 2111 annotationMemberArrayInitializer(); 2112 astFactory.addASTChild(currentAST, returnAST); 2113 annotationMemberValueInitializer_AST = (AST)currentAST.root; 2114 } 2115 else { 2116 throw new NoViableAltException(LT(1), getFilename()); 2117 } 2118 2119 returnAST = annotationMemberValueInitializer_AST; 2120 } 2121 2122 public final void annotationMemberValuePairs() throws RecognitionException, TokenStreamException { 2123 2124 returnAST = null; 2125 ASTPair currentAST = new ASTPair(); 2126 AST annotationMemberValuePairs_AST = null; 2127 2128 annotationMemberValuePair(); 2129 astFactory.addASTChild(currentAST, returnAST); 2130 { 2131 _loop80: 2132 do { 2133 if ((LA(1)==COMMA)) { 2134 AST tmp41_AST = null; 2135 tmp41_AST = astFactory.create(LT(1)); 2136 astFactory.addASTChild(currentAST, tmp41_AST); 2137 match(COMMA); 2138 annotationMemberValuePair(); 2139 astFactory.addASTChild(currentAST, returnAST); 2140 } 2141 else { 2142 break _loop80; 2143 } 2144 2145 } while (true); 2146 } 2147 annotationMemberValuePairs_AST = (AST)currentAST.root; 2148 returnAST = annotationMemberValuePairs_AST; 2149 } 2150 2151 public final void annotationMemberValuePair() throws RecognitionException, TokenStreamException { 2152 2153 returnAST = null; 2154 ASTPair currentAST = new ASTPair(); 2155 AST annotationMemberValuePair_AST = null; 2156 AST i_AST = null; 2157 Token a = null; 2158 AST a_AST = null; 2159 AST v_AST = null; 2160 2161 id(); 2162 i_AST = (AST)returnAST; 2163 a = LT(1); 2164 a_AST = astFactory.create(a); 2165 match(ASSIGN); 2166 annotationMemberValueInitializer(); 2167 v_AST = (AST)returnAST; 2168 if ( inputState.guessing==0 ) { 2169 annotationMemberValuePair_AST = (AST)currentAST.root; 2170 annotationMemberValuePair_AST = 2171 (AST)astFactory.make( (new ASTArray(4)).add(astFactory.create(ANNOTATION_MEMBER_VALUE_PAIR,"ANNOTATION_MEMBER_VALUE_PAIR")).add(i_AST).add(a_AST).add(v_AST)); 2172 currentAST.root = annotationMemberValuePair_AST; 2173 currentAST.child = annotationMemberValuePair_AST!=null &&annotationMemberValuePair_AST.getFirstChild()!=null ? 2174 annotationMemberValuePair_AST.getFirstChild() : annotationMemberValuePair_AST; 2175 currentAST.advanceChildToEnd(); 2176 } 2177 returnAST = annotationMemberValuePair_AST; 2178 } 2179 2180 public final void annotationExpression() throws RecognitionException, TokenStreamException { 2181 2182 returnAST = null; 2183 ASTPair currentAST = new ASTPair(); 2184 AST annotationExpression_AST = null; 2185 2186 conditionalExpression(); 2187 astFactory.addASTChild(currentAST, returnAST); 2188 if ( inputState.guessing==0 ) { 2189 annotationExpression_AST = (AST)currentAST.root; 2190 annotationExpression_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(EXPR,"EXPR")).add(annotationExpression_AST)); 2191 currentAST.root = annotationExpression_AST; 2192 currentAST.child = annotationExpression_AST!=null &&annotationExpression_AST.getFirstChild()!=null ? 2193 annotationExpression_AST.getFirstChild() : annotationExpression_AST; 2194 currentAST.advanceChildToEnd(); 2195 } 2196 annotationExpression_AST = (AST)currentAST.root; 2197 returnAST = annotationExpression_AST; 2198 } 2199 2200 public final void annotationMemberArrayInitializer() throws RecognitionException, TokenStreamException { 2201 2202 returnAST = null; 2203 ASTPair currentAST = new ASTPair(); 2204 AST annotationMemberArrayInitializer_AST = null; 2205 Token lc = null; 2206 AST lc_AST = null; 2207 2208 lc = LT(1); 2209 lc_AST = astFactory.create(lc); 2210 astFactory.makeASTRoot(currentAST, lc_AST); 2211 match(LCURLY); 2212 if ( inputState.guessing==0 ) { 2213 lc_AST.setType(ANNOTATION_ARRAY_INIT); 2214 } 2215 { 2216 switch ( LA(1)) { 2217 case LITERAL_void: 2218 case LITERAL_boolean: 2219 case LITERAL_byte: 2220 case LITERAL_char: 2221 case LITERAL_short: 2222 case LITERAL_int: 2223 case LITERAL_float: 2224 case LITERAL_long: 2225 case LITERAL_double: 2226 case IDENT: 2227 case LPAREN: 2228 case LITERAL_this: 2229 case LITERAL_super: 2230 case LITERAL_switch: 2231 case PLUS: 2232 case MINUS: 2233 case INC: 2234 case DEC: 2235 case BNOT: 2236 case LNOT: 2237 case LITERAL_true: 2238 case LITERAL_false: 2239 case LITERAL_null: 2240 case LITERAL_new: 2241 case NUM_INT: 2242 case CHAR_LITERAL: 2243 case STRING_LITERAL: 2244 case NUM_FLOAT: 2245 case NUM_LONG: 2246 case NUM_DOUBLE: 2247 case AT: 2248 case LITERAL_record: 2249 case TEXT_BLOCK_CONTENT: 2250 case LITERAL_yield: 2251 { 2252 annotationMemberArrayValueInitializer(); 2253 astFactory.addASTChild(currentAST, returnAST); 2254 { 2255 _loop88: 2256 do { 2257 if ((LA(1)==COMMA) && (_tokenSet_17.member(LA(2)))) { 2258 AST tmp42_AST = null; 2259 tmp42_AST = astFactory.create(LT(1)); 2260 astFactory.addASTChild(currentAST, tmp42_AST); 2261 match(COMMA); 2262 annotationMemberArrayValueInitializer(); 2263 astFactory.addASTChild(currentAST, returnAST); 2264 } 2265 else { 2266 break _loop88; 2267 } 2268 2269 } while (true); 2270 } 2271 { 2272 switch ( LA(1)) { 2273 case COMMA: 2274 { 2275 AST tmp43_AST = null; 2276 tmp43_AST = astFactory.create(LT(1)); 2277 astFactory.addASTChild(currentAST, tmp43_AST); 2278 match(COMMA); 2279 break; 2280 } 2281 case RCURLY: 2282 { 2283 break; 2284 } 2285 default: 2286 { 2287 throw new NoViableAltException(LT(1), getFilename()); 2288 } 2289 } 2290 } 2291 break; 2292 } 2293 case RCURLY: 2294 { 2295 break; 2296 } 2297 default: 2298 { 2299 throw new NoViableAltException(LT(1), getFilename()); 2300 } 2301 } 2302 } 2303 AST tmp44_AST = null; 2304 tmp44_AST = astFactory.create(LT(1)); 2305 astFactory.addASTChild(currentAST, tmp44_AST); 2306 match(RCURLY); 2307 annotationMemberArrayInitializer_AST = (AST)currentAST.root; 2308 returnAST = annotationMemberArrayInitializer_AST; 2309 } 2310 2311 public final void annotationMemberArrayValueInitializer() throws RecognitionException, TokenStreamException { 2312 2313 returnAST = null; 2314 ASTPair currentAST = new ASTPair(); 2315 AST annotationMemberArrayValueInitializer_AST = null; 2316 2317 boolean synPredMatched92 = false; 2318 if (((_tokenSet_17.member(LA(1))) && (_tokenSet_19.member(LA(2))))) { 2319 int _m92 = mark(); 2320 synPredMatched92 = true; 2321 inputState.guessing++; 2322 try { 2323 { 2324 annotationExpression(); 2325 } 2326 } 2327 catch (RecognitionException pe) { 2328 synPredMatched92 = false; 2329 } 2330 rewind(_m92); 2331inputState.guessing--; 2332 } 2333 if ( synPredMatched92 ) { 2334 annotationExpression(); 2335 astFactory.addASTChild(currentAST, returnAST); 2336 annotationMemberArrayValueInitializer_AST = (AST)currentAST.root; 2337 } 2338 else if ((LA(1)==AT) && (_tokenSet_0.member(LA(2)))) { 2339 annotation(); 2340 astFactory.addASTChild(currentAST, returnAST); 2341 annotationMemberArrayValueInitializer_AST = (AST)currentAST.root; 2342 } 2343 else { 2344 throw new NoViableAltException(LT(1), getFilename()); 2345 } 2346 2347 returnAST = annotationMemberArrayValueInitializer_AST; 2348 } 2349 2350 public final void conditionalExpression() throws RecognitionException, TokenStreamException { 2351 2352 returnAST = null; 2353 ASTPair currentAST = new ASTPair(); 2354 AST conditionalExpression_AST = null; 2355 2356 logicalOrExpression(); 2357 astFactory.addASTChild(currentAST, returnAST); 2358 { 2359 switch ( LA(1)) { 2360 case QUESTION: 2361 { 2362 AST tmp45_AST = null; 2363 tmp45_AST = astFactory.create(LT(1)); 2364 astFactory.makeASTRoot(currentAST, tmp45_AST); 2365 match(QUESTION); 2366 { 2367 boolean synPredMatched352 = false; 2368 if (((_tokenSet_20.member(LA(1))) && (_tokenSet_21.member(LA(2))))) { 2369 int _m352 = mark(); 2370 synPredMatched352 = true; 2371 inputState.guessing++; 2372 try { 2373 { 2374 lambdaExpression(); 2375 } 2376 } 2377 catch (RecognitionException pe) { 2378 synPredMatched352 = false; 2379 } 2380 rewind(_m352); 2381inputState.guessing--; 2382 } 2383 if ( synPredMatched352 ) { 2384 lambdaExpression(); 2385 astFactory.addASTChild(currentAST, returnAST); 2386 } 2387 else if ((_tokenSet_17.member(LA(1))) && (_tokenSet_22.member(LA(2)))) { 2388 assignmentExpression(); 2389 astFactory.addASTChild(currentAST, returnAST); 2390 } 2391 else { 2392 throw new NoViableAltException(LT(1), getFilename()); 2393 } 2394 2395 } 2396 AST tmp46_AST = null; 2397 tmp46_AST = astFactory.create(LT(1)); 2398 astFactory.addASTChild(currentAST, tmp46_AST); 2399 match(COLON); 2400 { 2401 boolean synPredMatched355 = false; 2402 if (((_tokenSet_20.member(LA(1))) && (_tokenSet_21.member(LA(2))))) { 2403 int _m355 = mark(); 2404 synPredMatched355 = true; 2405 inputState.guessing++; 2406 try { 2407 { 2408 lambdaExpression(); 2409 } 2410 } 2411 catch (RecognitionException pe) { 2412 synPredMatched355 = false; 2413 } 2414 rewind(_m355); 2415inputState.guessing--; 2416 } 2417 if ( synPredMatched355 ) { 2418 lambdaExpression(); 2419 astFactory.addASTChild(currentAST, returnAST); 2420 } 2421 else if ((_tokenSet_17.member(LA(1))) && (_tokenSet_23.member(LA(2)))) { 2422 conditionalExpression(); 2423 astFactory.addASTChild(currentAST, returnAST); 2424 } 2425 else { 2426 throw new NoViableAltException(LT(1), getFilename()); 2427 } 2428 2429 } 2430 break; 2431 } 2432 case FINAL: 2433 case ABSTRACT: 2434 case STRICTFP: 2435 case SEMI: 2436 case RBRACK: 2437 case LITERAL_void: 2438 case LITERAL_boolean: 2439 case LITERAL_byte: 2440 case LITERAL_char: 2441 case LITERAL_short: 2442 case LITERAL_int: 2443 case LITERAL_float: 2444 case LITERAL_long: 2445 case LITERAL_double: 2446 case IDENT: 2447 case STAR: 2448 case LITERAL_private: 2449 case LITERAL_public: 2450 case LITERAL_protected: 2451 case LITERAL_static: 2452 case LITERAL_transient: 2453 case LITERAL_native: 2454 case LITERAL_synchronized: 2455 case LITERAL_volatile: 2456 case LITERAL_class: 2457 case LITERAL_interface: 2458 case LCURLY: 2459 case RCURLY: 2460 case COMMA: 2461 case LPAREN: 2462 case RPAREN: 2463 case LITERAL_this: 2464 case LITERAL_super: 2465 case ASSIGN: 2466 case COLON: 2467 case LITERAL_if: 2468 case LITERAL_while: 2469 case LITERAL_do: 2470 case LITERAL_break: 2471 case LITERAL_continue: 2472 case LITERAL_return: 2473 case LITERAL_switch: 2474 case LITERAL_throw: 2475 case LITERAL_for: 2476 case LITERAL_else: 2477 case LITERAL_case: 2478 case LITERAL_default: 2479 case LITERAL_try: 2480 case PLUS_ASSIGN: 2481 case MINUS_ASSIGN: 2482 case STAR_ASSIGN: 2483 case DIV_ASSIGN: 2484 case MOD_ASSIGN: 2485 case SR_ASSIGN: 2486 case BSR_ASSIGN: 2487 case SL_ASSIGN: 2488 case BAND_ASSIGN: 2489 case BXOR_ASSIGN: 2490 case BOR_ASSIGN: 2491 case LT: 2492 case GT: 2493 case LE: 2494 case GE: 2495 case LITERAL_instanceof: 2496 case SL: 2497 case SR: 2498 case BSR: 2499 case PLUS: 2500 case MINUS: 2501 case DIV: 2502 case MOD: 2503 case INC: 2504 case DEC: 2505 case BNOT: 2506 case LNOT: 2507 case LITERAL_true: 2508 case LITERAL_false: 2509 case LITERAL_null: 2510 case LITERAL_new: 2511 case NUM_INT: 2512 case CHAR_LITERAL: 2513 case STRING_LITERAL: 2514 case NUM_FLOAT: 2515 case NUM_LONG: 2516 case NUM_DOUBLE: 2517 case ASSERT: 2518 case ENUM: 2519 case AT: 2520 case LAMBDA: 2521 case LITERAL_record: 2522 case TEXT_BLOCK_CONTENT: 2523 case LITERAL_yield: 2524 { 2525 break; 2526 } 2527 default: 2528 { 2529 throw new NoViableAltException(LT(1), getFilename()); 2530 } 2531 } 2532 } 2533 conditionalExpression_AST = (AST)currentAST.root; 2534 returnAST = conditionalExpression_AST; 2535 } 2536 2537 public final void typeParameters() throws RecognitionException, TokenStreamException { 2538 2539 returnAST = null; 2540 ASTPair currentAST = new ASTPair(); 2541 AST typeParameters_AST = null; 2542 Token lt = null; 2543 AST lt_AST = null; 2544 int currentLtLevel = 0; 2545 2546 if ( inputState.guessing==0 ) { 2547 currentLtLevel = ltCounter; 2548 } 2549 lt = LT(1); 2550 lt_AST = astFactory.create(lt); 2551 astFactory.addASTChild(currentAST, lt_AST); 2552 match(LT); 2553 if ( inputState.guessing==0 ) { 2554 lt_AST.setType(GENERIC_START); ltCounter++; 2555 } 2556 typeParameter(); 2557 astFactory.addASTChild(currentAST, returnAST); 2558 { 2559 _loop124: 2560 do { 2561 if ((LA(1)==COMMA)) { 2562 AST tmp47_AST = null; 2563 tmp47_AST = astFactory.create(LT(1)); 2564 astFactory.addASTChild(currentAST, tmp47_AST); 2565 match(COMMA); 2566 typeParameter(); 2567 astFactory.addASTChild(currentAST, returnAST); 2568 } 2569 else { 2570 break _loop124; 2571 } 2572 2573 } while (true); 2574 } 2575 { 2576 switch ( LA(1)) { 2577 case GT: 2578 case SR: 2579 case BSR: 2580 { 2581 typeArgumentsOrParametersEnd(); 2582 astFactory.addASTChild(currentAST, returnAST); 2583 break; 2584 } 2585 case LITERAL_void: 2586 case LITERAL_boolean: 2587 case LITERAL_byte: 2588 case LITERAL_char: 2589 case LITERAL_short: 2590 case LITERAL_int: 2591 case LITERAL_float: 2592 case LITERAL_long: 2593 case LITERAL_double: 2594 case IDENT: 2595 case LITERAL_extends: 2596 case LCURLY: 2597 case LITERAL_implements: 2598 case LPAREN: 2599 case AT: 2600 case LITERAL_record: 2601 case LITERAL_yield: 2602 { 2603 break; 2604 } 2605 default: 2606 { 2607 throw new NoViableAltException(LT(1), getFilename()); 2608 } 2609 } 2610 } 2611 if ( inputState.guessing==0 ) { 2612 2613 if (isThereASingleGtToEmit()) { 2614 astFactory.addASTChild(currentAST, emitSingleGt()); 2615 } 2616 2617 } 2618 if (!(areLtsAndGtsBalanced(currentLtLevel))) 2619 throw new SemanticException("areLtsAndGtsBalanced(currentLtLevel)"); 2620 if ( inputState.guessing==0 ) { 2621 typeParameters_AST = (AST)currentAST.root; 2622 typeParameters_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE_PARAMETERS,"TYPE_PARAMETERS")).add(typeParameters_AST)); 2623 currentAST.root = typeParameters_AST; 2624 currentAST.child = typeParameters_AST!=null &&typeParameters_AST.getFirstChild()!=null ? 2625 typeParameters_AST.getFirstChild() : typeParameters_AST; 2626 currentAST.advanceChildToEnd(); 2627 } 2628 typeParameters_AST = (AST)currentAST.root; 2629 returnAST = typeParameters_AST; 2630 } 2631 2632 public final void recordComponentsList() throws RecognitionException, TokenStreamException { 2633 2634 returnAST = null; 2635 ASTPair currentAST = new ASTPair(); 2636 AST recordComponentsList_AST = null; 2637 2638 AST tmp48_AST = null; 2639 tmp48_AST = astFactory.create(LT(1)); 2640 astFactory.addASTChild(currentAST, tmp48_AST); 2641 match(LPAREN); 2642 recordComponents(); 2643 astFactory.addASTChild(currentAST, returnAST); 2644 AST tmp49_AST = null; 2645 tmp49_AST = astFactory.create(LT(1)); 2646 astFactory.addASTChild(currentAST, tmp49_AST); 2647 match(RPAREN); 2648 recordComponentsList_AST = (AST)currentAST.root; 2649 returnAST = recordComponentsList_AST; 2650 } 2651 2652 public final void implementsClause() throws RecognitionException, TokenStreamException { 2653 2654 returnAST = null; 2655 ASTPair currentAST = new ASTPair(); 2656 AST implementsClause_AST = null; 2657 Token i = null; 2658 AST i_AST = null; 2659 2660 { 2661 switch ( LA(1)) { 2662 case LITERAL_implements: 2663 { 2664 i = LT(1); 2665 i_AST = astFactory.create(i); 2666 astFactory.makeASTRoot(currentAST, i_AST); 2667 match(LITERAL_implements); 2668 if ( inputState.guessing==0 ) { 2669 i_AST.setType(IMPLEMENTS_CLAUSE); 2670 } 2671 classOrInterfaceType(false); 2672 astFactory.addASTChild(currentAST, returnAST); 2673 { 2674 _loop171: 2675 do { 2676 if ((LA(1)==COMMA)) { 2677 AST tmp50_AST = null; 2678 tmp50_AST = astFactory.create(LT(1)); 2679 astFactory.addASTChild(currentAST, tmp50_AST); 2680 match(COMMA); 2681 classOrInterfaceType(false); 2682 astFactory.addASTChild(currentAST, returnAST); 2683 } 2684 else { 2685 break _loop171; 2686 } 2687 2688 } while (true); 2689 } 2690 break; 2691 } 2692 case LCURLY: 2693 { 2694 break; 2695 } 2696 default: 2697 { 2698 throw new NoViableAltException(LT(1), getFilename()); 2699 } 2700 } 2701 } 2702 implementsClause_AST = (AST)currentAST.root; 2703 returnAST = implementsClause_AST; 2704 } 2705 2706 public final void recordBodyDeclaration() throws RecognitionException, TokenStreamException { 2707 2708 returnAST = null; 2709 ASTPair currentAST = new ASTPair(); 2710 AST recordBodyDeclaration_AST = null; 2711 2712 AST tmp51_AST = null; 2713 tmp51_AST = astFactory.create(LT(1)); 2714 astFactory.addASTChild(currentAST, tmp51_AST); 2715 match(LCURLY); 2716 { 2717 _loop112: 2718 do { 2719 boolean synPredMatched111 = false; 2720 if (((_tokenSet_24.member(LA(1))) && (_tokenSet_25.member(LA(2))))) { 2721 int _m111 = mark(); 2722 synPredMatched111 = true; 2723 inputState.guessing++; 2724 try { 2725 { 2726 compactConstructorDeclaration(); 2727 } 2728 } 2729 catch (RecognitionException pe) { 2730 synPredMatched111 = false; 2731 } 2732 rewind(_m111); 2733inputState.guessing--; 2734 } 2735 if ( synPredMatched111 ) { 2736 compactConstructorDeclaration(); 2737 astFactory.addASTChild(currentAST, returnAST); 2738 } 2739 else if ((_tokenSet_26.member(LA(1))) && (_tokenSet_27.member(LA(2)))) { 2740 field(); 2741 astFactory.addASTChild(currentAST, returnAST); 2742 } 2743 else if ((LA(1)==SEMI)) { 2744 AST tmp52_AST = null; 2745 tmp52_AST = astFactory.create(LT(1)); 2746 astFactory.addASTChild(currentAST, tmp52_AST); 2747 match(SEMI); 2748 } 2749 else { 2750 break _loop112; 2751 } 2752 2753 } while (true); 2754 } 2755 AST tmp53_AST = null; 2756 tmp53_AST = astFactory.create(LT(1)); 2757 astFactory.addASTChild(currentAST, tmp53_AST); 2758 match(RCURLY); 2759 if ( inputState.guessing==0 ) { 2760 recordBodyDeclaration_AST = (AST)currentAST.root; 2761 recordBodyDeclaration_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(recordBodyDeclaration_AST)); 2762 currentAST.root = recordBodyDeclaration_AST; 2763 currentAST.child = recordBodyDeclaration_AST!=null &&recordBodyDeclaration_AST.getFirstChild()!=null ? 2764 recordBodyDeclaration_AST.getFirstChild() : recordBodyDeclaration_AST; 2765 currentAST.advanceChildToEnd(); 2766 } 2767 recordBodyDeclaration_AST = (AST)currentAST.root; 2768 returnAST = recordBodyDeclaration_AST; 2769 } 2770 2771 public final void recordComponents() throws RecognitionException, TokenStreamException { 2772 2773 returnAST = null; 2774 ASTPair currentAST = new ASTPair(); 2775 AST recordComponents_AST = null; 2776 2777 { 2778 boolean synPredMatched100 = false; 2779 if (((_tokenSet_13.member(LA(1))) && (_tokenSet_28.member(LA(2))))) { 2780 int _m100 = mark(); 2781 synPredMatched100 = true; 2782 inputState.guessing++; 2783 try { 2784 { 2785 recordComponent(); 2786 } 2787 } 2788 catch (RecognitionException pe) { 2789 synPredMatched100 = false; 2790 } 2791 rewind(_m100); 2792inputState.guessing--; 2793 } 2794 if ( synPredMatched100 ) { 2795 recordComponent(); 2796 astFactory.addASTChild(currentAST, returnAST); 2797 { 2798 _loop104: 2799 do { 2800 boolean synPredMatched103 = false; 2801 if (((LA(1)==COMMA) && (_tokenSet_13.member(LA(2))))) { 2802 int _m103 = mark(); 2803 synPredMatched103 = true; 2804 inputState.guessing++; 2805 try { 2806 { 2807 match(COMMA); 2808 recordComponent(); 2809 } 2810 } 2811 catch (RecognitionException pe) { 2812 synPredMatched103 = false; 2813 } 2814 rewind(_m103); 2815inputState.guessing--; 2816 } 2817 if ( synPredMatched103 ) { 2818 AST tmp54_AST = null; 2819 tmp54_AST = astFactory.create(LT(1)); 2820 astFactory.addASTChild(currentAST, tmp54_AST); 2821 match(COMMA); 2822 recordComponent(); 2823 astFactory.addASTChild(currentAST, returnAST); 2824 } 2825 else { 2826 break _loop104; 2827 } 2828 2829 } while (true); 2830 } 2831 { 2832 switch ( LA(1)) { 2833 case COMMA: 2834 { 2835 AST tmp55_AST = null; 2836 tmp55_AST = astFactory.create(LT(1)); 2837 astFactory.addASTChild(currentAST, tmp55_AST); 2838 match(COMMA); 2839 recordComponentVariableLength(); 2840 astFactory.addASTChild(currentAST, returnAST); 2841 break; 2842 } 2843 case RPAREN: 2844 { 2845 break; 2846 } 2847 default: 2848 { 2849 throw new NoViableAltException(LT(1), getFilename()); 2850 } 2851 } 2852 } 2853 } 2854 else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_29.member(LA(2)))) { 2855 recordComponentVariableLength(); 2856 astFactory.addASTChild(currentAST, returnAST); 2857 } 2858 else if ((LA(1)==RPAREN)) { 2859 } 2860 else { 2861 throw new NoViableAltException(LT(1), getFilename()); 2862 } 2863 2864 } 2865 if ( inputState.guessing==0 ) { 2866 recordComponents_AST = (AST)currentAST.root; 2867 recordComponents_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(RECORD_COMPONENTS,"RECORD_COMPONENTS")).add(recordComponents_AST)); 2868 currentAST.root = recordComponents_AST; 2869 currentAST.child = recordComponents_AST!=null &&recordComponents_AST.getFirstChild()!=null ? 2870 recordComponents_AST.getFirstChild() : recordComponents_AST; 2871 currentAST.advanceChildToEnd(); 2872 } 2873 recordComponents_AST = (AST)currentAST.root; 2874 returnAST = recordComponents_AST; 2875 } 2876 2877 public final void recordComponent() throws RecognitionException, TokenStreamException { 2878 2879 returnAST = null; 2880 ASTPair currentAST = new ASTPair(); 2881 AST recordComponent_AST = null; 2882 AST a_AST = null; 2883 AST t_AST = null; 2884 AST i_AST = null; 2885 AST d_AST = null; 2886 2887 annotations(); 2888 a_AST = (AST)returnAST; 2889 typeSpec(false); 2890 t_AST = (AST)returnAST; 2891 id(); 2892 i_AST = (AST)returnAST; 2893 declaratorBrackets(t_AST); 2894 d_AST = (AST)returnAST; 2895 if ( inputState.guessing==0 ) { 2896 recordComponent_AST = (AST)currentAST.root; 2897 recordComponent_AST = (AST)astFactory.make( (new ASTArray(4)).add(astFactory.create(RECORD_COMPONENT_DEF,"RECORD_COMPONENT_DEF")).add(a_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(d_AST))).add(i_AST)); 2898 currentAST.root = recordComponent_AST; 2899 currentAST.child = recordComponent_AST!=null &&recordComponent_AST.getFirstChild()!=null ? 2900 recordComponent_AST.getFirstChild() : recordComponent_AST; 2901 currentAST.advanceChildToEnd(); 2902 } 2903 returnAST = recordComponent_AST; 2904 } 2905 2906 public final void recordComponentVariableLength() throws RecognitionException, TokenStreamException { 2907 2908 returnAST = null; 2909 ASTPair currentAST = new ASTPair(); 2910 AST recordComponentVariableLength_AST = null; 2911 AST a_AST = null; 2912 AST t_AST = null; 2913 Token e = null; 2914 AST e_AST = null; 2915 AST i_AST = null; 2916 AST d_AST = null; 2917 2918 annotations(); 2919 a_AST = (AST)returnAST; 2920 variableLengthParameterTypeSpec(); 2921 t_AST = (AST)returnAST; 2922 e = LT(1); 2923 e_AST = astFactory.create(e); 2924 match(ELLIPSIS); 2925 id(); 2926 i_AST = (AST)returnAST; 2927 declaratorBrackets(t_AST); 2928 d_AST = (AST)returnAST; 2929 if ( inputState.guessing==0 ) { 2930 recordComponentVariableLength_AST = (AST)currentAST.root; 2931 recordComponentVariableLength_AST = (AST)astFactory.make( (new ASTArray(5)).add(astFactory.create(RECORD_COMPONENT_DEF,"RECORD_COMPONENT_DEF")).add(a_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(d_AST))).add(e_AST).add(i_AST)); 2932 currentAST.root = recordComponentVariableLength_AST; 2933 currentAST.child = recordComponentVariableLength_AST!=null &&recordComponentVariableLength_AST.getFirstChild()!=null ? 2934 recordComponentVariableLength_AST.getFirstChild() : recordComponentVariableLength_AST; 2935 currentAST.advanceChildToEnd(); 2936 } 2937 returnAST = recordComponentVariableLength_AST; 2938 } 2939 2940 public final void declaratorBrackets( 2941 AST typ 2942 ) throws RecognitionException, TokenStreamException { 2943 2944 returnAST = null; 2945 ASTPair currentAST = new ASTPair(); 2946 AST declaratorBrackets_AST = null; 2947 AST an_AST = null; 2948 Token lb = null; 2949 AST lb_AST = null; 2950 Token rb = null; 2951 AST rb_AST = null; 2952 AST db_AST = null; 2953 2954 if ((LA(1)==LBRACK||LA(1)==AT) && (_tokenSet_6.member(LA(2)))) { 2955 { 2956 if (((LA(1)==LBRACK||LA(1)==AT) && (_tokenSet_6.member(LA(2))))&&(LA(1) == AT)) { 2957 annotations(); 2958 an_AST = (AST)returnAST; 2959 } 2960 else if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) { 2961 } 2962 else { 2963 throw new NoViableAltException(LT(1), getFilename()); 2964 } 2965 2966 } 2967 lb = LT(1); 2968 lb_AST = astFactory.create(lb); 2969 match(LBRACK); 2970 if ( inputState.guessing==0 ) { 2971 lb_AST.setType(ARRAY_DECLARATOR); 2972 } 2973 rb = LT(1); 2974 rb_AST = astFactory.create(rb); 2975 match(RBRACK); 2976 declaratorBrackets((AST)astFactory.make( (new ASTArray(4)).add(lb_AST).add(typ).add(an_AST).add(rb_AST))); 2977 db_AST = (AST)returnAST; 2978 if ( inputState.guessing==0 ) { 2979 declaratorBrackets_AST = (AST)currentAST.root; 2980 declaratorBrackets_AST = db_AST; 2981 currentAST.root = declaratorBrackets_AST; 2982 currentAST.child = declaratorBrackets_AST!=null &&declaratorBrackets_AST.getFirstChild()!=null ? 2983 declaratorBrackets_AST.getFirstChild() : declaratorBrackets_AST; 2984 currentAST.advanceChildToEnd(); 2985 } 2986 } 2987 else if ((_tokenSet_30.member(LA(1))) && (_tokenSet_31.member(LA(2)))) { 2988 if ( inputState.guessing==0 ) { 2989 declaratorBrackets_AST = (AST)currentAST.root; 2990 declaratorBrackets_AST = typ; 2991 currentAST.root = declaratorBrackets_AST; 2992 currentAST.child = declaratorBrackets_AST!=null &&declaratorBrackets_AST.getFirstChild()!=null ? 2993 declaratorBrackets_AST.getFirstChild() : declaratorBrackets_AST; 2994 currentAST.advanceChildToEnd(); 2995 } 2996 } 2997 else { 2998 throw new NoViableAltException(LT(1), getFilename()); 2999 } 3000 3001 returnAST = declaratorBrackets_AST; 3002 } 3003 3004 public final void compactConstructorDeclaration() throws RecognitionException, TokenStreamException { 3005 3006 returnAST = null; 3007 ASTPair currentAST = new ASTPair(); 3008 AST compactConstructorDeclaration_AST = null; 3009 AST m_AST = null; 3010 AST i_AST = null; 3011 AST c_AST = null; 3012 3013 modifiers(); 3014 m_AST = (AST)returnAST; 3015 id(); 3016 i_AST = (AST)returnAST; 3017 constructorBody(); 3018 c_AST = (AST)returnAST; 3019 if ( inputState.guessing==0 ) { 3020 compactConstructorDeclaration_AST = (AST)currentAST.root; 3021 compactConstructorDeclaration_AST = (AST)astFactory.make( (new ASTArray(4)).add(astFactory.create(COMPACT_CTOR_DEF,"COMPACT_CTOR_DEF")).add(m_AST).add(i_AST).add(c_AST)); 3022 currentAST.root = compactConstructorDeclaration_AST; 3023 currentAST.child = compactConstructorDeclaration_AST!=null &&compactConstructorDeclaration_AST.getFirstChild()!=null ? 3024 compactConstructorDeclaration_AST.getFirstChild() : compactConstructorDeclaration_AST; 3025 currentAST.advanceChildToEnd(); 3026 } 3027 returnAST = compactConstructorDeclaration_AST; 3028 } 3029 3030 public final void field() throws RecognitionException, TokenStreamException { 3031 3032 returnAST = null; 3033 ASTPair currentAST = new ASTPair(); 3034 AST field_AST = null; 3035 AST mods_AST = null; 3036 AST td_AST = null; 3037 AST tp_AST = null; 3038 AST h_AST = null; 3039 AST s_AST = null; 3040 AST t_AST = null; 3041 AST id_AST = null; 3042 AST param_AST = null; 3043 AST rt_AST = null; 3044 AST tc_AST = null; 3045 AST s2_AST = null; 3046 Token s5 = null; 3047 AST s5_AST = null; 3048 AST v_AST = null; 3049 Token s6 = null; 3050 AST s6_AST = null; 3051 Token si = null; 3052 AST si_AST = null; 3053 AST s3_AST = null; 3054 AST s4_AST = null; 3055 3056 if ((_tokenSet_32.member(LA(1))) && (_tokenSet_33.member(LA(2)))) { 3057 modifiers(); 3058 mods_AST = (AST)returnAST; 3059 { 3060 if ((_tokenSet_34.member(LA(1))) && (_tokenSet_35.member(LA(2)))) { 3061 typeDefinitionInternal(mods_AST); 3062 td_AST = (AST)returnAST; 3063 if ( inputState.guessing==0 ) { 3064 field_AST = (AST)currentAST.root; 3065 field_AST = td_AST; 3066 currentAST.root = field_AST; 3067 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ? 3068 field_AST.getFirstChild() : field_AST; 3069 currentAST.advanceChildToEnd(); 3070 } 3071 } 3072 else if ((_tokenSet_36.member(LA(1))) && (_tokenSet_14.member(LA(2)))) { 3073 { 3074 switch ( LA(1)) { 3075 case LT: 3076 { 3077 typeParameters(); 3078 tp_AST = (AST)returnAST; 3079 break; 3080 } 3081 case LITERAL_void: 3082 case LITERAL_boolean: 3083 case LITERAL_byte: 3084 case LITERAL_char: 3085 case LITERAL_short: 3086 case LITERAL_int: 3087 case LITERAL_float: 3088 case LITERAL_long: 3089 case LITERAL_double: 3090 case IDENT: 3091 case AT: 3092 case LITERAL_record: 3093 case LITERAL_yield: 3094 { 3095 break; 3096 } 3097 default: 3098 { 3099 throw new NoViableAltException(LT(1), getFilename()); 3100 } 3101 } 3102 } 3103 { 3104 if ((_tokenSet_0.member(LA(1))) && (LA(2)==LPAREN)) { 3105 ctorHead(); 3106 h_AST = (AST)returnAST; 3107 constructorBody(); 3108 s_AST = (AST)returnAST; 3109 if ( inputState.guessing==0 ) { 3110 field_AST = (AST)currentAST.root; 3111 field_AST = (AST)astFactory.make( (new ASTArray(5)).add(astFactory.create(CTOR_DEF,"CTOR_DEF")).add(mods_AST).add(tp_AST).add(h_AST).add(s_AST)); 3112 currentAST.root = field_AST; 3113 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ? 3114 field_AST.getFirstChild() : field_AST; 3115 currentAST.advanceChildToEnd(); 3116 } 3117 } 3118 else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_28.member(LA(2)))) { 3119 typeSpec(false); 3120 t_AST = (AST)returnAST; 3121 { 3122 if ((_tokenSet_0.member(LA(1))) && (LA(2)==LPAREN)) { 3123 id(); 3124 id_AST = (AST)returnAST; 3125 AST tmp56_AST = null; 3126 tmp56_AST = astFactory.create(LT(1)); 3127 match(LPAREN); 3128 parameterDeclarationList(); 3129 param_AST = (AST)returnAST; 3130 AST tmp57_AST = null; 3131 tmp57_AST = astFactory.create(LT(1)); 3132 match(RPAREN); 3133 declaratorBrackets(t_AST); 3134 rt_AST = (AST)returnAST; 3135 { 3136 switch ( LA(1)) { 3137 case LITERAL_throws: 3138 { 3139 throwsClause(); 3140 tc_AST = (AST)returnAST; 3141 break; 3142 } 3143 case SEMI: 3144 case LCURLY: 3145 { 3146 break; 3147 } 3148 default: 3149 { 3150 throw new NoViableAltException(LT(1), getFilename()); 3151 } 3152 } 3153 } 3154 { 3155 switch ( LA(1)) { 3156 case LCURLY: 3157 { 3158 compoundStatement(); 3159 s2_AST = (AST)returnAST; 3160 break; 3161 } 3162 case SEMI: 3163 { 3164 s5 = LT(1); 3165 s5_AST = astFactory.create(s5); 3166 match(SEMI); 3167 break; 3168 } 3169 default: 3170 { 3171 throw new NoViableAltException(LT(1), getFilename()); 3172 } 3173 } 3174 } 3175 if ( inputState.guessing==0 ) { 3176 field_AST = (AST)currentAST.root; 3177 field_AST = (AST)astFactory.make( (new ASTArray(11)).add(astFactory.create(METHOD_DEF,"METHOD_DEF")).add(mods_AST).add(tp_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(rt_AST))).add(id_AST).add(tmp56_AST).add(param_AST).add(tmp57_AST).add(tc_AST).add(s2_AST).add(s5_AST)); 3178 currentAST.root = field_AST; 3179 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ? 3180 field_AST.getFirstChild() : field_AST; 3181 currentAST.advanceChildToEnd(); 3182 } 3183 } 3184 else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_37.member(LA(2)))) { 3185 variableDefinitions(mods_AST,t_AST); 3186 v_AST = (AST)returnAST; 3187 { 3188 if ((LA(1)==SEMI) && (_tokenSet_38.member(LA(2)))) { 3189 s6 = LT(1); 3190 s6_AST = astFactory.create(s6); 3191 match(SEMI); 3192 } 3193 else if ((_tokenSet_38.member(LA(1))) && (_tokenSet_39.member(LA(2)))) { 3194 } 3195 else { 3196 throw new NoViableAltException(LT(1), getFilename()); 3197 } 3198 3199 } 3200 if ( inputState.guessing==0 ) { 3201 field_AST = (AST)currentAST.root; 3202 3203 field_AST = v_AST; 3204 v_AST.addChild(s6_AST); 3205 3206 currentAST.root = field_AST; 3207 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ? 3208 field_AST.getFirstChild() : field_AST; 3209 currentAST.advanceChildToEnd(); 3210 } 3211 } 3212 else { 3213 throw new NoViableAltException(LT(1), getFilename()); 3214 } 3215 3216 } 3217 } 3218 else { 3219 throw new NoViableAltException(LT(1), getFilename()); 3220 } 3221 3222 } 3223 } 3224 else { 3225 throw new NoViableAltException(LT(1), getFilename()); 3226 } 3227 3228 } 3229 } 3230 else if ((LA(1)==LITERAL_static) && (LA(2)==LCURLY)) { 3231 si = LT(1); 3232 si_AST = astFactory.create(si); 3233 match(LITERAL_static); 3234 compoundStatement(); 3235 s3_AST = (AST)returnAST; 3236 if ( inputState.guessing==0 ) { 3237 field_AST = (AST)currentAST.root; 3238 si_AST.setType(STATIC_INIT); 3239 si_AST.setText("STATIC_INIT"); 3240 field_AST = (AST)astFactory.make( (new ASTArray(2)).add(si_AST).add(s3_AST)); 3241 currentAST.root = field_AST; 3242 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ? 3243 field_AST.getFirstChild() : field_AST; 3244 currentAST.advanceChildToEnd(); 3245 } 3246 } 3247 else if ((LA(1)==LCURLY)) { 3248 compoundStatement(); 3249 s4_AST = (AST)returnAST; 3250 if ( inputState.guessing==0 ) { 3251 field_AST = (AST)currentAST.root; 3252 field_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(INSTANCE_INIT,"INSTANCE_INIT")).add(s4_AST)); 3253 currentAST.root = field_AST; 3254 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ? 3255 field_AST.getFirstChild() : field_AST; 3256 currentAST.advanceChildToEnd(); 3257 } 3258 } 3259 else { 3260 throw new NoViableAltException(LT(1), getFilename()); 3261 } 3262 3263 returnAST = field_AST; 3264 } 3265 3266 public final void constructorBody() throws RecognitionException, TokenStreamException { 3267 3268 returnAST = null; 3269 ASTPair currentAST = new ASTPair(); 3270 AST constructorBody_AST = null; 3271 Token lc = null; 3272 AST lc_AST = null; 3273 3274 lc = LT(1); 3275 lc_AST = astFactory.create(lc); 3276 astFactory.makeASTRoot(currentAST, lc_AST); 3277 match(LCURLY); 3278 if ( inputState.guessing==0 ) { 3279 lc_AST.setType(SLIST); 3280 } 3281 { 3282 boolean synPredMatched183 = false; 3283 if (((_tokenSet_40.member(LA(1))) && (_tokenSet_41.member(LA(2))))) { 3284 int _m183 = mark(); 3285 synPredMatched183 = true; 3286 inputState.guessing++; 3287 try { 3288 { 3289 explicitConstructorInvocation(); 3290 } 3291 } 3292 catch (RecognitionException pe) { 3293 synPredMatched183 = false; 3294 } 3295 rewind(_m183); 3296inputState.guessing--; 3297 } 3298 if ( synPredMatched183 ) { 3299 explicitConstructorInvocation(); 3300 astFactory.addASTChild(currentAST, returnAST); 3301 } 3302 else if ((_tokenSet_42.member(LA(1))) && (_tokenSet_43.member(LA(2)))) { 3303 } 3304 else { 3305 throw new NoViableAltException(LT(1), getFilename()); 3306 } 3307 3308 } 3309 { 3310 _loop185: 3311 do { 3312 if ((_tokenSet_44.member(LA(1)))) { 3313 statement(); 3314 astFactory.addASTChild(currentAST, returnAST); 3315 } 3316 else { 3317 break _loop185; 3318 } 3319 3320 } while (true); 3321 } 3322 AST tmp58_AST = null; 3323 tmp58_AST = astFactory.create(LT(1)); 3324 astFactory.addASTChild(currentAST, tmp58_AST); 3325 match(RCURLY); 3326 constructorBody_AST = (AST)currentAST.root; 3327 returnAST = constructorBody_AST; 3328 } 3329 3330 public final void superClassClause() throws RecognitionException, TokenStreamException { 3331 3332 returnAST = null; 3333 ASTPair currentAST = new ASTPair(); 3334 AST superClassClause_AST = null; 3335 Token e = null; 3336 AST e_AST = null; 3337 AST c_AST = null; 3338 3339 { 3340 switch ( LA(1)) { 3341 case LITERAL_extends: 3342 { 3343 e = LT(1); 3344 e_AST = astFactory.create(e); 3345 astFactory.makeASTRoot(currentAST, e_AST); 3346 match(LITERAL_extends); 3347 if ( inputState.guessing==0 ) { 3348 e_AST.setType(EXTENDS_CLAUSE); 3349 } 3350 classOrInterfaceType(false); 3351 c_AST = (AST)returnAST; 3352 astFactory.addASTChild(currentAST, returnAST); 3353 break; 3354 } 3355 case LCURLY: 3356 case LITERAL_implements: 3357 { 3358 break; 3359 } 3360 default: 3361 { 3362 throw new NoViableAltException(LT(1), getFilename()); 3363 } 3364 } 3365 } 3366 superClassClause_AST = (AST)currentAST.root; 3367 returnAST = superClassClause_AST; 3368 } 3369 3370 public final void classBlock() throws RecognitionException, TokenStreamException { 3371 3372 returnAST = null; 3373 ASTPair currentAST = new ASTPair(); 3374 AST classBlock_AST = null; 3375 3376 AST tmp59_AST = null; 3377 tmp59_AST = astFactory.create(LT(1)); 3378 astFactory.addASTChild(currentAST, tmp59_AST); 3379 match(LCURLY); 3380 { 3381 _loop163: 3382 do { 3383 switch ( LA(1)) { 3384 case FINAL: 3385 case ABSTRACT: 3386 case STRICTFP: 3387 case LITERAL_void: 3388 case LITERAL_boolean: 3389 case LITERAL_byte: 3390 case LITERAL_char: 3391 case LITERAL_short: 3392 case LITERAL_int: 3393 case LITERAL_float: 3394 case LITERAL_long: 3395 case LITERAL_double: 3396 case IDENT: 3397 case LITERAL_private: 3398 case LITERAL_public: 3399 case LITERAL_protected: 3400 case LITERAL_static: 3401 case LITERAL_transient: 3402 case LITERAL_native: 3403 case LITERAL_synchronized: 3404 case LITERAL_volatile: 3405 case LITERAL_class: 3406 case LITERAL_interface: 3407 case LCURLY: 3408 case LITERAL_default: 3409 case LT: 3410 case ENUM: 3411 case AT: 3412 case LITERAL_record: 3413 case LITERAL_yield: 3414 { 3415 field(); 3416 astFactory.addASTChild(currentAST, returnAST); 3417 break; 3418 } 3419 case SEMI: 3420 { 3421 AST tmp60_AST = null; 3422 tmp60_AST = astFactory.create(LT(1)); 3423 astFactory.addASTChild(currentAST, tmp60_AST); 3424 match(SEMI); 3425 break; 3426 } 3427 default: 3428 { 3429 break _loop163; 3430 } 3431 } 3432 } while (true); 3433 } 3434 AST tmp61_AST = null; 3435 tmp61_AST = astFactory.create(LT(1)); 3436 astFactory.addASTChild(currentAST, tmp61_AST); 3437 match(RCURLY); 3438 if ( inputState.guessing==0 ) { 3439 classBlock_AST = (AST)currentAST.root; 3440 classBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(classBlock_AST)); 3441 currentAST.root = classBlock_AST; 3442 currentAST.child = classBlock_AST!=null &&classBlock_AST.getFirstChild()!=null ? 3443 classBlock_AST.getFirstChild() : classBlock_AST; 3444 currentAST.advanceChildToEnd(); 3445 } 3446 classBlock_AST = (AST)currentAST.root; 3447 returnAST = classBlock_AST; 3448 } 3449 3450 public final void interfaceExtends() throws RecognitionException, TokenStreamException { 3451 3452 returnAST = null; 3453 ASTPair currentAST = new ASTPair(); 3454 AST interfaceExtends_AST = null; 3455 Token e = null; 3456 AST e_AST = null; 3457 3458 { 3459 switch ( LA(1)) { 3460 case LITERAL_extends: 3461 { 3462 e = LT(1); 3463 e_AST = astFactory.create(e); 3464 astFactory.makeASTRoot(currentAST, e_AST); 3465 match(LITERAL_extends); 3466 if ( inputState.guessing==0 ) { 3467 e_AST.setType(EXTENDS_CLAUSE); 3468 } 3469 classOrInterfaceType(false); 3470 astFactory.addASTChild(currentAST, returnAST); 3471 { 3472 _loop167: 3473 do { 3474 if ((LA(1)==COMMA)) { 3475 AST tmp62_AST = null; 3476 tmp62_AST = astFactory.create(LT(1)); 3477 astFactory.addASTChild(currentAST, tmp62_AST); 3478 match(COMMA); 3479 classOrInterfaceType(false); 3480 astFactory.addASTChild(currentAST, returnAST); 3481 } 3482 else { 3483 break _loop167; 3484 } 3485 3486 } while (true); 3487 } 3488 break; 3489 } 3490 case LCURLY: 3491 { 3492 break; 3493 } 3494 default: 3495 { 3496 throw new NoViableAltException(LT(1), getFilename()); 3497 } 3498 } 3499 } 3500 interfaceExtends_AST = (AST)currentAST.root; 3501 returnAST = interfaceExtends_AST; 3502 } 3503 3504 public final void enumBlock() throws RecognitionException, TokenStreamException { 3505 3506 returnAST = null; 3507 ASTPair currentAST = new ASTPair(); 3508 AST enumBlock_AST = null; 3509 3510 AST tmp63_AST = null; 3511 tmp63_AST = astFactory.create(LT(1)); 3512 astFactory.addASTChild(currentAST, tmp63_AST); 3513 match(LCURLY); 3514 { 3515 switch ( LA(1)) { 3516 case IDENT: 3517 case AT: 3518 case LITERAL_record: 3519 case LITERAL_yield: 3520 { 3521 enumConstant(); 3522 astFactory.addASTChild(currentAST, returnAST); 3523 { 3524 _loop144: 3525 do { 3526 if ((LA(1)==COMMA) && (_tokenSet_8.member(LA(2)))) { 3527 AST tmp64_AST = null; 3528 tmp64_AST = astFactory.create(LT(1)); 3529 astFactory.addASTChild(currentAST, tmp64_AST); 3530 match(COMMA); 3531 enumConstant(); 3532 astFactory.addASTChild(currentAST, returnAST); 3533 } 3534 else { 3535 break _loop144; 3536 } 3537 3538 } while (true); 3539 } 3540 { 3541 switch ( LA(1)) { 3542 case COMMA: 3543 { 3544 AST tmp65_AST = null; 3545 tmp65_AST = astFactory.create(LT(1)); 3546 astFactory.addASTChild(currentAST, tmp65_AST); 3547 match(COMMA); 3548 break; 3549 } 3550 case SEMI: 3551 case RCURLY: 3552 { 3553 break; 3554 } 3555 default: 3556 { 3557 throw new NoViableAltException(LT(1), getFilename()); 3558 } 3559 } 3560 } 3561 break; 3562 } 3563 case SEMI: 3564 case RCURLY: 3565 { 3566 break; 3567 } 3568 default: 3569 { 3570 throw new NoViableAltException(LT(1), getFilename()); 3571 } 3572 } 3573 } 3574 { 3575 switch ( LA(1)) { 3576 case SEMI: 3577 { 3578 AST tmp66_AST = null; 3579 tmp66_AST = astFactory.create(LT(1)); 3580 astFactory.addASTChild(currentAST, tmp66_AST); 3581 match(SEMI); 3582 { 3583 _loop148: 3584 do { 3585 switch ( LA(1)) { 3586 case FINAL: 3587 case ABSTRACT: 3588 case STRICTFP: 3589 case LITERAL_void: 3590 case LITERAL_boolean: 3591 case LITERAL_byte: 3592 case LITERAL_char: 3593 case LITERAL_short: 3594 case LITERAL_int: 3595 case LITERAL_float: 3596 case LITERAL_long: 3597 case LITERAL_double: 3598 case IDENT: 3599 case LITERAL_private: 3600 case LITERAL_public: 3601 case LITERAL_protected: 3602 case LITERAL_static: 3603 case LITERAL_transient: 3604 case LITERAL_native: 3605 case LITERAL_synchronized: 3606 case LITERAL_volatile: 3607 case LITERAL_class: 3608 case LITERAL_interface: 3609 case LCURLY: 3610 case LITERAL_default: 3611 case LT: 3612 case ENUM: 3613 case AT: 3614 case LITERAL_record: 3615 case LITERAL_yield: 3616 { 3617 field(); 3618 astFactory.addASTChild(currentAST, returnAST); 3619 break; 3620 } 3621 case SEMI: 3622 { 3623 AST tmp67_AST = null; 3624 tmp67_AST = astFactory.create(LT(1)); 3625 astFactory.addASTChild(currentAST, tmp67_AST); 3626 match(SEMI); 3627 break; 3628 } 3629 default: 3630 { 3631 break _loop148; 3632 } 3633 } 3634 } while (true); 3635 } 3636 break; 3637 } 3638 case RCURLY: 3639 { 3640 break; 3641 } 3642 default: 3643 { 3644 throw new NoViableAltException(LT(1), getFilename()); 3645 } 3646 } 3647 } 3648 AST tmp68_AST = null; 3649 tmp68_AST = astFactory.create(LT(1)); 3650 astFactory.addASTChild(currentAST, tmp68_AST); 3651 match(RCURLY); 3652 if ( inputState.guessing==0 ) { 3653 enumBlock_AST = (AST)currentAST.root; 3654 enumBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(enumBlock_AST)); 3655 currentAST.root = enumBlock_AST; 3656 currentAST.child = enumBlock_AST!=null &&enumBlock_AST.getFirstChild()!=null ? 3657 enumBlock_AST.getFirstChild() : enumBlock_AST; 3658 currentAST.advanceChildToEnd(); 3659 } 3660 enumBlock_AST = (AST)currentAST.root; 3661 returnAST = enumBlock_AST; 3662 } 3663 3664 public final void annotationBlock() throws RecognitionException, TokenStreamException { 3665 3666 returnAST = null; 3667 ASTPair currentAST = new ASTPair(); 3668 AST annotationBlock_AST = null; 3669 3670 AST tmp69_AST = null; 3671 tmp69_AST = astFactory.create(LT(1)); 3672 astFactory.addASTChild(currentAST, tmp69_AST); 3673 match(LCURLY); 3674 { 3675 _loop135: 3676 do { 3677 switch ( LA(1)) { 3678 case FINAL: 3679 case ABSTRACT: 3680 case STRICTFP: 3681 case LITERAL_void: 3682 case LITERAL_boolean: 3683 case LITERAL_byte: 3684 case LITERAL_char: 3685 case LITERAL_short: 3686 case LITERAL_int: 3687 case LITERAL_float: 3688 case LITERAL_long: 3689 case LITERAL_double: 3690 case IDENT: 3691 case LITERAL_private: 3692 case LITERAL_public: 3693 case LITERAL_protected: 3694 case LITERAL_static: 3695 case LITERAL_transient: 3696 case LITERAL_native: 3697 case LITERAL_synchronized: 3698 case LITERAL_volatile: 3699 case LITERAL_class: 3700 case LITERAL_interface: 3701 case LITERAL_default: 3702 case ENUM: 3703 case AT: 3704 case LITERAL_record: 3705 case LITERAL_yield: 3706 { 3707 annotationField(); 3708 astFactory.addASTChild(currentAST, returnAST); 3709 break; 3710 } 3711 case SEMI: 3712 { 3713 AST tmp70_AST = null; 3714 tmp70_AST = astFactory.create(LT(1)); 3715 astFactory.addASTChild(currentAST, tmp70_AST); 3716 match(SEMI); 3717 break; 3718 } 3719 default: 3720 { 3721 break _loop135; 3722 } 3723 } 3724 } while (true); 3725 } 3726 AST tmp71_AST = null; 3727 tmp71_AST = astFactory.create(LT(1)); 3728 astFactory.addASTChild(currentAST, tmp71_AST); 3729 match(RCURLY); 3730 if ( inputState.guessing==0 ) { 3731 annotationBlock_AST = (AST)currentAST.root; 3732 annotationBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(annotationBlock_AST)); 3733 currentAST.root = annotationBlock_AST; 3734 currentAST.child = annotationBlock_AST!=null &&annotationBlock_AST.getFirstChild()!=null ? 3735 annotationBlock_AST.getFirstChild() : annotationBlock_AST; 3736 currentAST.advanceChildToEnd(); 3737 } 3738 annotationBlock_AST = (AST)currentAST.root; 3739 returnAST = annotationBlock_AST; 3740 } 3741 3742 public final void typeParameter() throws RecognitionException, TokenStreamException { 3743 3744 returnAST = null; 3745 ASTPair currentAST = new ASTPair(); 3746 AST typeParameter_AST = null; 3747 AST id_AST = null; 3748 3749 { 3750 if (((_tokenSet_8.member(LA(1))) && (_tokenSet_45.member(LA(2))))&&(LA(1) == AT)) { 3751 annotations(); 3752 astFactory.addASTChild(currentAST, returnAST); 3753 } 3754 else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_45.member(LA(2)))) { 3755 } 3756 else { 3757 throw new NoViableAltException(LT(1), getFilename()); 3758 } 3759 3760 } 3761 { 3762 id(); 3763 id_AST = (AST)returnAST; 3764 astFactory.addASTChild(currentAST, returnAST); 3765 } 3766 { 3767 if ((LA(1)==LITERAL_extends) && (_tokenSet_8.member(LA(2)))) { 3768 typeParameterBounds(); 3769 astFactory.addASTChild(currentAST, returnAST); 3770 } 3771 else if ((_tokenSet_45.member(LA(1))) && (_tokenSet_46.member(LA(2)))) { 3772 } 3773 else { 3774 throw new NoViableAltException(LT(1), getFilename()); 3775 } 3776 3777 } 3778 if ( inputState.guessing==0 ) { 3779 typeParameter_AST = (AST)currentAST.root; 3780 typeParameter_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE_PARAMETER,"TYPE_PARAMETER")).add(typeParameter_AST)); 3781 currentAST.root = typeParameter_AST; 3782 currentAST.child = typeParameter_AST!=null &&typeParameter_AST.getFirstChild()!=null ? 3783 typeParameter_AST.getFirstChild() : typeParameter_AST; 3784 currentAST.advanceChildToEnd(); 3785 } 3786 typeParameter_AST = (AST)currentAST.root; 3787 returnAST = typeParameter_AST; 3788 } 3789 3790 public final void typeParameterBounds() throws RecognitionException, TokenStreamException { 3791 3792 returnAST = null; 3793 ASTPair currentAST = new ASTPair(); 3794 AST typeParameterBounds_AST = null; 3795 Token e = null; 3796 AST e_AST = null; 3797 Token b = null; 3798 AST b_AST = null; 3799 3800 e = LT(1); 3801 e_AST = astFactory.create(e); 3802 astFactory.makeASTRoot(currentAST, e_AST); 3803 match(LITERAL_extends); 3804 classOrInterfaceType(true); 3805 astFactory.addASTChild(currentAST, returnAST); 3806 { 3807 _loop132: 3808 do { 3809 if ((LA(1)==BAND)) { 3810 b = LT(1); 3811 b_AST = astFactory.create(b); 3812 astFactory.addASTChild(currentAST, b_AST); 3813 match(BAND); 3814 if ( inputState.guessing==0 ) { 3815 b_AST.setType(TYPE_EXTENSION_AND); 3816 } 3817 classOrInterfaceType(true); 3818 astFactory.addASTChild(currentAST, returnAST); 3819 } 3820 else { 3821 break _loop132; 3822 } 3823 3824 } while (true); 3825 } 3826 if ( inputState.guessing==0 ) { 3827 e_AST.setType(TYPE_UPPER_BOUNDS); 3828 } 3829 typeParameterBounds_AST = (AST)currentAST.root; 3830 returnAST = typeParameterBounds_AST; 3831 } 3832 3833 public final void annotationField() throws RecognitionException, TokenStreamException { 3834 3835 returnAST = null; 3836 ASTPair currentAST = new ASTPair(); 3837 AST annotationField_AST = null; 3838 AST mods_AST = null; 3839 AST td_AST = null; 3840 AST t_AST = null; 3841 AST i_AST = null; 3842 AST rt_AST = null; 3843 AST d_AST = null; 3844 Token s = null; 3845 AST s_AST = null; 3846 AST v_AST = null; 3847 Token s6 = null; 3848 AST s6_AST = null; 3849 3850 modifiers(); 3851 mods_AST = (AST)returnAST; 3852 { 3853 if ((_tokenSet_34.member(LA(1))) && (_tokenSet_35.member(LA(2)))) { 3854 typeDefinitionInternal(mods_AST); 3855 td_AST = (AST)returnAST; 3856 if ( inputState.guessing==0 ) { 3857 annotationField_AST = (AST)currentAST.root; 3858 annotationField_AST = td_AST; 3859 currentAST.root = annotationField_AST; 3860 currentAST.child = annotationField_AST!=null &&annotationField_AST.getFirstChild()!=null ? 3861 annotationField_AST.getFirstChild() : annotationField_AST; 3862 currentAST.advanceChildToEnd(); 3863 } 3864 } 3865 else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_28.member(LA(2)))) { 3866 typeSpec(false); 3867 t_AST = (AST)returnAST; 3868 { 3869 if ((_tokenSet_0.member(LA(1))) && (LA(2)==LPAREN)) { 3870 id(); 3871 i_AST = (AST)returnAST; 3872 AST tmp72_AST = null; 3873 tmp72_AST = astFactory.create(LT(1)); 3874 match(LPAREN); 3875 AST tmp73_AST = null; 3876 tmp73_AST = astFactory.create(LT(1)); 3877 match(RPAREN); 3878 declaratorBrackets(t_AST); 3879 rt_AST = (AST)returnAST; 3880 { 3881 switch ( LA(1)) { 3882 case LITERAL_default: 3883 { 3884 annotationDefault(); 3885 d_AST = (AST)returnAST; 3886 break; 3887 } 3888 case SEMI: 3889 { 3890 break; 3891 } 3892 default: 3893 { 3894 throw new NoViableAltException(LT(1), getFilename()); 3895 } 3896 } 3897 } 3898 s = LT(1); 3899 s_AST = astFactory.create(s); 3900 match(SEMI); 3901 if ( inputState.guessing==0 ) { 3902 annotationField_AST = (AST)currentAST.root; 3903 annotationField_AST = 3904 (AST)astFactory.make( (new ASTArray(8)).add(astFactory.create(ANNOTATION_FIELD_DEF,"ANNOTATION_FIELD_DEF")).add(mods_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(rt_AST))).add(i_AST).add(tmp72_AST).add(tmp73_AST).add(d_AST).add(s_AST)); 3905 currentAST.root = annotationField_AST; 3906 currentAST.child = annotationField_AST!=null &&annotationField_AST.getFirstChild()!=null ? 3907 annotationField_AST.getFirstChild() : annotationField_AST; 3908 currentAST.advanceChildToEnd(); 3909 } 3910 } 3911 else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_47.member(LA(2)))) { 3912 variableDefinitions(mods_AST,t_AST); 3913 v_AST = (AST)returnAST; 3914 s6 = LT(1); 3915 s6_AST = astFactory.create(s6); 3916 match(SEMI); 3917 if ( inputState.guessing==0 ) { 3918 annotationField_AST = (AST)currentAST.root; 3919 3920 annotationField_AST = v_AST; 3921 v_AST.addChild(s6_AST); 3922 3923 currentAST.root = annotationField_AST; 3924 currentAST.child = annotationField_AST!=null &&annotationField_AST.getFirstChild()!=null ? 3925 annotationField_AST.getFirstChild() : annotationField_AST; 3926 currentAST.advanceChildToEnd(); 3927 } 3928 } 3929 else { 3930 throw new NoViableAltException(LT(1), getFilename()); 3931 } 3932 3933 } 3934 } 3935 else { 3936 throw new NoViableAltException(LT(1), getFilename()); 3937 } 3938 3939 } 3940 returnAST = annotationField_AST; 3941 } 3942 3943 public final void annotationDefault() throws RecognitionException, TokenStreamException { 3944 3945 returnAST = null; 3946 ASTPair currentAST = new ASTPair(); 3947 AST annotationDefault_AST = null; 3948 3949 AST tmp74_AST = null; 3950 tmp74_AST = astFactory.create(LT(1)); 3951 astFactory.makeASTRoot(currentAST, tmp74_AST); 3952 match(LITERAL_default); 3953 annotationMemberValueInitializer(); 3954 astFactory.addASTChild(currentAST, returnAST); 3955 annotationDefault_AST = (AST)currentAST.root; 3956 returnAST = annotationDefault_AST; 3957 } 3958 3959 public final void enumConstant() throws RecognitionException, TokenStreamException { 3960 3961 returnAST = null; 3962 ASTPair currentAST = new ASTPair(); 3963 AST enumConstant_AST = null; 3964 AST an_AST = null; 3965 AST i_AST = null; 3966 Token l = null; 3967 AST l_AST = null; 3968 AST args_AST = null; 3969 Token r = null; 3970 AST r_AST = null; 3971 AST b_AST = null; 3972 3973 annotations(); 3974 an_AST = (AST)returnAST; 3975 id(); 3976 i_AST = (AST)returnAST; 3977 { 3978 switch ( LA(1)) { 3979 case LPAREN: 3980 { 3981 l = LT(1); 3982 l_AST = astFactory.create(l); 3983 match(LPAREN); 3984 argList(); 3985 args_AST = (AST)returnAST; 3986 r = LT(1); 3987 r_AST = astFactory.create(r); 3988 match(RPAREN); 3989 break; 3990 } 3991 case SEMI: 3992 case LCURLY: 3993 case RCURLY: 3994 case COMMA: 3995 { 3996 break; 3997 } 3998 default: 3999 { 4000 throw new NoViableAltException(LT(1), getFilename()); 4001 } 4002 } 4003 } 4004 { 4005 switch ( LA(1)) { 4006 case LCURLY: 4007 { 4008 enumConstantBlock(); 4009 b_AST = (AST)returnAST; 4010 break; 4011 } 4012 case SEMI: 4013 case RCURLY: 4014 case COMMA: 4015 { 4016 break; 4017 } 4018 default: 4019 { 4020 throw new NoViableAltException(LT(1), getFilename()); 4021 } 4022 } 4023 } 4024 if ( inputState.guessing==0 ) { 4025 enumConstant_AST = (AST)currentAST.root; 4026 enumConstant_AST = (AST)astFactory.make( (new ASTArray(7)).add(astFactory.create(ENUM_CONSTANT_DEF,"ENUM_CONSTANT_DEF")).add(an_AST).add(i_AST).add(l_AST).add(args_AST).add(r_AST).add(b_AST)); 4027 currentAST.root = enumConstant_AST; 4028 currentAST.child = enumConstant_AST!=null &&enumConstant_AST.getFirstChild()!=null ? 4029 enumConstant_AST.getFirstChild() : enumConstant_AST; 4030 currentAST.advanceChildToEnd(); 4031 } 4032 returnAST = enumConstant_AST; 4033 } 4034 4035 public final void argList() throws RecognitionException, TokenStreamException { 4036 4037 returnAST = null; 4038 ASTPair currentAST = new ASTPair(); 4039 AST argList_AST = null; 4040 4041 { 4042 if (((_tokenSet_17.member(LA(1))))&&(LA(1)!=RPAREN)) { 4043 expressionList(); 4044 astFactory.addASTChild(currentAST, returnAST); 4045 } 4046 else if ((LA(1)==RPAREN)) { 4047 if ( inputState.guessing==0 ) { 4048 argList_AST = (AST)currentAST.root; 4049 argList_AST = astFactory.create(ELIST,"ELIST"); 4050 currentAST.root = argList_AST; 4051 currentAST.child = argList_AST!=null &&argList_AST.getFirstChild()!=null ? 4052 argList_AST.getFirstChild() : argList_AST; 4053 currentAST.advanceChildToEnd(); 4054 } 4055 } 4056 else { 4057 throw new NoViableAltException(LT(1), getFilename()); 4058 } 4059 4060 } 4061 argList_AST = (AST)currentAST.root; 4062 returnAST = argList_AST; 4063 } 4064 4065 public final void enumConstantBlock() throws RecognitionException, TokenStreamException { 4066 4067 returnAST = null; 4068 ASTPair currentAST = new ASTPair(); 4069 AST enumConstantBlock_AST = null; 4070 4071 AST tmp75_AST = null; 4072 tmp75_AST = astFactory.create(LT(1)); 4073 astFactory.addASTChild(currentAST, tmp75_AST); 4074 match(LCURLY); 4075 { 4076 _loop154: 4077 do { 4078 switch ( LA(1)) { 4079 case FINAL: 4080 case ABSTRACT: 4081 case STRICTFP: 4082 case LITERAL_void: 4083 case LITERAL_boolean: 4084 case LITERAL_byte: 4085 case LITERAL_char: 4086 case LITERAL_short: 4087 case LITERAL_int: 4088 case LITERAL_float: 4089 case LITERAL_long: 4090 case LITERAL_double: 4091 case IDENT: 4092 case LITERAL_private: 4093 case LITERAL_public: 4094 case LITERAL_protected: 4095 case LITERAL_static: 4096 case LITERAL_transient: 4097 case LITERAL_native: 4098 case LITERAL_synchronized: 4099 case LITERAL_volatile: 4100 case LITERAL_class: 4101 case LITERAL_interface: 4102 case LCURLY: 4103 case LITERAL_default: 4104 case LT: 4105 case ENUM: 4106 case AT: 4107 case LITERAL_record: 4108 case LITERAL_yield: 4109 { 4110 enumConstantField(); 4111 astFactory.addASTChild(currentAST, returnAST); 4112 break; 4113 } 4114 case SEMI: 4115 { 4116 AST tmp76_AST = null; 4117 tmp76_AST = astFactory.create(LT(1)); 4118 astFactory.addASTChild(currentAST, tmp76_AST); 4119 match(SEMI); 4120 break; 4121 } 4122 default: 4123 { 4124 break _loop154; 4125 } 4126 } 4127 } while (true); 4128 } 4129 AST tmp77_AST = null; 4130 tmp77_AST = astFactory.create(LT(1)); 4131 astFactory.addASTChild(currentAST, tmp77_AST); 4132 match(RCURLY); 4133 if ( inputState.guessing==0 ) { 4134 enumConstantBlock_AST = (AST)currentAST.root; 4135 enumConstantBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(enumConstantBlock_AST)); 4136 currentAST.root = enumConstantBlock_AST; 4137 currentAST.child = enumConstantBlock_AST!=null &&enumConstantBlock_AST.getFirstChild()!=null ? 4138 enumConstantBlock_AST.getFirstChild() : enumConstantBlock_AST; 4139 currentAST.advanceChildToEnd(); 4140 } 4141 enumConstantBlock_AST = (AST)currentAST.root; 4142 returnAST = enumConstantBlock_AST; 4143 } 4144 4145 public final void enumConstantField() throws RecognitionException, TokenStreamException { 4146 4147 returnAST = null; 4148 ASTPair currentAST = new ASTPair(); 4149 AST enumConstantField_AST = null; 4150 AST mods_AST = null; 4151 AST td_AST = null; 4152 AST tp_AST = null; 4153 AST t_AST = null; 4154 AST id_AST = null; 4155 AST param_AST = null; 4156 AST rt_AST = null; 4157 AST tc_AST = null; 4158 AST s2_AST = null; 4159 Token s3 = null; 4160 AST s3_AST = null; 4161 AST v_AST = null; 4162 Token s6 = null; 4163 AST s6_AST = null; 4164 AST s4_AST = null; 4165 4166 switch ( LA(1)) { 4167 case FINAL: 4168 case ABSTRACT: 4169 case STRICTFP: 4170 case LITERAL_void: 4171 case LITERAL_boolean: 4172 case LITERAL_byte: 4173 case LITERAL_char: 4174 case LITERAL_short: 4175 case LITERAL_int: 4176 case LITERAL_float: 4177 case LITERAL_long: 4178 case LITERAL_double: 4179 case IDENT: 4180 case LITERAL_private: 4181 case LITERAL_public: 4182 case LITERAL_protected: 4183 case LITERAL_static: 4184 case LITERAL_transient: 4185 case LITERAL_native: 4186 case LITERAL_synchronized: 4187 case LITERAL_volatile: 4188 case LITERAL_class: 4189 case LITERAL_interface: 4190 case LITERAL_default: 4191 case LT: 4192 case ENUM: 4193 case AT: 4194 case LITERAL_record: 4195 case LITERAL_yield: 4196 { 4197 modifiers(); 4198 mods_AST = (AST)returnAST; 4199 { 4200 if ((_tokenSet_34.member(LA(1))) && (_tokenSet_35.member(LA(2)))) { 4201 typeDefinitionInternal(mods_AST); 4202 td_AST = (AST)returnAST; 4203 if ( inputState.guessing==0 ) { 4204 enumConstantField_AST = (AST)currentAST.root; 4205 enumConstantField_AST = td_AST; 4206 currentAST.root = enumConstantField_AST; 4207 currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ? 4208 enumConstantField_AST.getFirstChild() : enumConstantField_AST; 4209 currentAST.advanceChildToEnd(); 4210 } 4211 } 4212 else if ((_tokenSet_36.member(LA(1))) && (_tokenSet_28.member(LA(2)))) { 4213 { 4214 switch ( LA(1)) { 4215 case LT: 4216 { 4217 typeParameters(); 4218 tp_AST = (AST)returnAST; 4219 break; 4220 } 4221 case LITERAL_void: 4222 case LITERAL_boolean: 4223 case LITERAL_byte: 4224 case LITERAL_char: 4225 case LITERAL_short: 4226 case LITERAL_int: 4227 case LITERAL_float: 4228 case LITERAL_long: 4229 case LITERAL_double: 4230 case IDENT: 4231 case AT: 4232 case LITERAL_record: 4233 case LITERAL_yield: 4234 { 4235 break; 4236 } 4237 default: 4238 { 4239 throw new NoViableAltException(LT(1), getFilename()); 4240 } 4241 } 4242 } 4243 typeSpec(false); 4244 t_AST = (AST)returnAST; 4245 { 4246 if ((_tokenSet_0.member(LA(1))) && (LA(2)==LPAREN)) { 4247 id(); 4248 id_AST = (AST)returnAST; 4249 AST tmp78_AST = null; 4250 tmp78_AST = astFactory.create(LT(1)); 4251 match(LPAREN); 4252 parameterDeclarationList(); 4253 param_AST = (AST)returnAST; 4254 AST tmp79_AST = null; 4255 tmp79_AST = astFactory.create(LT(1)); 4256 match(RPAREN); 4257 declaratorBrackets(t_AST); 4258 rt_AST = (AST)returnAST; 4259 { 4260 switch ( LA(1)) { 4261 case LITERAL_throws: 4262 { 4263 throwsClause(); 4264 tc_AST = (AST)returnAST; 4265 break; 4266 } 4267 case SEMI: 4268 case LCURLY: 4269 { 4270 break; 4271 } 4272 default: 4273 { 4274 throw new NoViableAltException(LT(1), getFilename()); 4275 } 4276 } 4277 } 4278 { 4279 switch ( LA(1)) { 4280 case LCURLY: 4281 { 4282 compoundStatement(); 4283 s2_AST = (AST)returnAST; 4284 break; 4285 } 4286 case SEMI: 4287 { 4288 s3 = LT(1); 4289 s3_AST = astFactory.create(s3); 4290 match(SEMI); 4291 break; 4292 } 4293 default: 4294 { 4295 throw new NoViableAltException(LT(1), getFilename()); 4296 } 4297 } 4298 } 4299 if ( inputState.guessing==0 ) { 4300 enumConstantField_AST = (AST)currentAST.root; 4301 enumConstantField_AST = (AST)astFactory.make( (new ASTArray(11)).add(astFactory.create(METHOD_DEF,"METHOD_DEF")).add(mods_AST).add(tp_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(rt_AST))).add(id_AST).add(tmp78_AST).add(param_AST).add(tmp79_AST).add(tc_AST).add(s2_AST).add(s3_AST)); 4302 currentAST.root = enumConstantField_AST; 4303 currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ? 4304 enumConstantField_AST.getFirstChild() : enumConstantField_AST; 4305 currentAST.advanceChildToEnd(); 4306 } 4307 } 4308 else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_47.member(LA(2)))) { 4309 variableDefinitions(mods_AST,t_AST); 4310 v_AST = (AST)returnAST; 4311 s6 = LT(1); 4312 s6_AST = astFactory.create(s6); 4313 match(SEMI); 4314 if ( inputState.guessing==0 ) { 4315 enumConstantField_AST = (AST)currentAST.root; 4316 4317 enumConstantField_AST = v_AST; 4318 v_AST.addChild(s6_AST); 4319 4320 currentAST.root = enumConstantField_AST; 4321 currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ? 4322 enumConstantField_AST.getFirstChild() : enumConstantField_AST; 4323 currentAST.advanceChildToEnd(); 4324 } 4325 } 4326 else { 4327 throw new NoViableAltException(LT(1), getFilename()); 4328 } 4329 4330 } 4331 } 4332 else { 4333 throw new NoViableAltException(LT(1), getFilename()); 4334 } 4335 4336 } 4337 break; 4338 } 4339 case LCURLY: 4340 { 4341 compoundStatement(); 4342 s4_AST = (AST)returnAST; 4343 if ( inputState.guessing==0 ) { 4344 enumConstantField_AST = (AST)currentAST.root; 4345 enumConstantField_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(INSTANCE_INIT,"INSTANCE_INIT")).add(s4_AST)); 4346 currentAST.root = enumConstantField_AST; 4347 currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ? 4348 enumConstantField_AST.getFirstChild() : enumConstantField_AST; 4349 currentAST.advanceChildToEnd(); 4350 } 4351 break; 4352 } 4353 default: 4354 { 4355 throw new NoViableAltException(LT(1), getFilename()); 4356 } 4357 } 4358 returnAST = enumConstantField_AST; 4359 } 4360 4361 public final void parameterDeclarationList() throws RecognitionException, TokenStreamException { 4362 4363 returnAST = null; 4364 ASTPair currentAST = new ASTPair(); 4365 AST parameterDeclarationList_AST = null; 4366 4367 { 4368 boolean synPredMatched215 = false; 4369 if (((_tokenSet_48.member(LA(1))) && (_tokenSet_49.member(LA(2))))) { 4370 int _m215 = mark(); 4371 synPredMatched215 = true; 4372 inputState.guessing++; 4373 try { 4374 { 4375 parameterDeclaration(); 4376 } 4377 } 4378 catch (RecognitionException pe) { 4379 synPredMatched215 = false; 4380 } 4381 rewind(_m215); 4382inputState.guessing--; 4383 } 4384 if ( synPredMatched215 ) { 4385 parameterDeclaration(); 4386 astFactory.addASTChild(currentAST, returnAST); 4387 { 4388 _loop219: 4389 do { 4390 boolean synPredMatched218 = false; 4391 if (((LA(1)==COMMA) && (_tokenSet_48.member(LA(2))))) { 4392 int _m218 = mark(); 4393 synPredMatched218 = true; 4394 inputState.guessing++; 4395 try { 4396 { 4397 match(COMMA); 4398 parameterDeclaration(); 4399 } 4400 } 4401 catch (RecognitionException pe) { 4402 synPredMatched218 = false; 4403 } 4404 rewind(_m218); 4405inputState.guessing--; 4406 } 4407 if ( synPredMatched218 ) { 4408 AST tmp80_AST = null; 4409 tmp80_AST = astFactory.create(LT(1)); 4410 astFactory.addASTChild(currentAST, tmp80_AST); 4411 match(COMMA); 4412 parameterDeclaration(); 4413 astFactory.addASTChild(currentAST, returnAST); 4414 } 4415 else { 4416 break _loop219; 4417 } 4418 4419 } while (true); 4420 } 4421 { 4422 switch ( LA(1)) { 4423 case COMMA: 4424 { 4425 AST tmp81_AST = null; 4426 tmp81_AST = astFactory.create(LT(1)); 4427 astFactory.addASTChild(currentAST, tmp81_AST); 4428 match(COMMA); 4429 variableLengthParameterDeclaration(); 4430 astFactory.addASTChild(currentAST, returnAST); 4431 break; 4432 } 4433 case RPAREN: 4434 { 4435 break; 4436 } 4437 default: 4438 { 4439 throw new NoViableAltException(LT(1), getFilename()); 4440 } 4441 } 4442 } 4443 } 4444 else if ((_tokenSet_50.member(LA(1))) && (_tokenSet_51.member(LA(2)))) { 4445 variableLengthParameterDeclaration(); 4446 astFactory.addASTChild(currentAST, returnAST); 4447 } 4448 else if ((LA(1)==RPAREN)) { 4449 } 4450 else { 4451 throw new NoViableAltException(LT(1), getFilename()); 4452 } 4453 4454 } 4455 if ( inputState.guessing==0 ) { 4456 parameterDeclarationList_AST = (AST)currentAST.root; 4457 parameterDeclarationList_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(PARAMETERS,"PARAMETERS")).add(parameterDeclarationList_AST)); 4458 currentAST.root = parameterDeclarationList_AST; 4459 currentAST.child = parameterDeclarationList_AST!=null &¶meterDeclarationList_AST.getFirstChild()!=null ? 4460 parameterDeclarationList_AST.getFirstChild() : parameterDeclarationList_AST; 4461 currentAST.advanceChildToEnd(); 4462 } 4463 parameterDeclarationList_AST = (AST)currentAST.root; 4464 returnAST = parameterDeclarationList_AST; 4465 } 4466 4467 public final void throwsClause() throws RecognitionException, TokenStreamException { 4468 4469 returnAST = null; 4470 ASTPair currentAST = new ASTPair(); 4471 AST throwsClause_AST = null; 4472 4473 AST tmp82_AST = null; 4474 tmp82_AST = astFactory.create(LT(1)); 4475 astFactory.makeASTRoot(currentAST, tmp82_AST); 4476 match(LITERAL_throws); 4477 { 4478 if (((_tokenSet_8.member(LA(1))) && (_tokenSet_52.member(LA(2))))&&(LA(1) == AT)) { 4479 annotations(); 4480 astFactory.addASTChild(currentAST, returnAST); 4481 } 4482 else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_53.member(LA(2)))) { 4483 } 4484 else { 4485 throw new NoViableAltException(LT(1), getFilename()); 4486 } 4487 4488 } 4489 identifier(); 4490 astFactory.addASTChild(currentAST, returnAST); 4491 { 4492 _loop211: 4493 do { 4494 if ((LA(1)==COMMA)) { 4495 AST tmp83_AST = null; 4496 tmp83_AST = astFactory.create(LT(1)); 4497 astFactory.addASTChild(currentAST, tmp83_AST); 4498 match(COMMA); 4499 { 4500 if (((_tokenSet_8.member(LA(1))) && (_tokenSet_52.member(LA(2))))&&(LA(1) == AT)) { 4501 annotations(); 4502 astFactory.addASTChild(currentAST, returnAST); 4503 } 4504 else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_53.member(LA(2)))) { 4505 } 4506 else { 4507 throw new NoViableAltException(LT(1), getFilename()); 4508 } 4509 4510 } 4511 identifier(); 4512 astFactory.addASTChild(currentAST, returnAST); 4513 } 4514 else { 4515 break _loop211; 4516 } 4517 4518 } while (true); 4519 } 4520 throwsClause_AST = (AST)currentAST.root; 4521 returnAST = throwsClause_AST; 4522 } 4523 4524 public final void compoundStatement() throws RecognitionException, TokenStreamException { 4525 4526 returnAST = null; 4527 ASTPair currentAST = new ASTPair(); 4528 AST compoundStatement_AST = null; 4529 Token lc = null; 4530 AST lc_AST = null; 4531 4532 lc = LT(1); 4533 lc_AST = astFactory.create(lc); 4534 astFactory.makeASTRoot(currentAST, lc_AST); 4535 match(LCURLY); 4536 if ( inputState.guessing==0 ) { 4537 lc_AST.setType(SLIST); 4538 } 4539 { 4540 _loop239: 4541 do { 4542 if ((_tokenSet_44.member(LA(1)))) { 4543 statement(); 4544 astFactory.addASTChild(currentAST, returnAST); 4545 } 4546 else { 4547 break _loop239; 4548 } 4549 4550 } while (true); 4551 } 4552 AST tmp84_AST = null; 4553 tmp84_AST = astFactory.create(LT(1)); 4554 astFactory.addASTChild(currentAST, tmp84_AST); 4555 match(RCURLY); 4556 compoundStatement_AST = (AST)currentAST.root; 4557 returnAST = compoundStatement_AST; 4558 } 4559 4560 public final void ctorHead() throws RecognitionException, TokenStreamException { 4561 4562 returnAST = null; 4563 ASTPair currentAST = new ASTPair(); 4564 AST ctorHead_AST = null; 4565 4566 id(); 4567 astFactory.addASTChild(currentAST, returnAST); 4568 AST tmp85_AST = null; 4569 tmp85_AST = astFactory.create(LT(1)); 4570 astFactory.addASTChild(currentAST, tmp85_AST); 4571 match(LPAREN); 4572 parameterDeclarationList(); 4573 astFactory.addASTChild(currentAST, returnAST); 4574 AST tmp86_AST = null; 4575 tmp86_AST = astFactory.create(LT(1)); 4576 astFactory.addASTChild(currentAST, tmp86_AST); 4577 match(RPAREN); 4578 { 4579 switch ( LA(1)) { 4580 case LITERAL_throws: 4581 { 4582 throwsClause(); 4583 astFactory.addASTChild(currentAST, returnAST); 4584 break; 4585 } 4586 case LCURLY: 4587 { 4588 break; 4589 } 4590 default: 4591 { 4592 throw new NoViableAltException(LT(1), getFilename()); 4593 } 4594 } 4595 } 4596 ctorHead_AST = (AST)currentAST.root; 4597 returnAST = ctorHead_AST; 4598 } 4599 4600 public final void explicitConstructorInvocation() throws RecognitionException, TokenStreamException { 4601 4602 returnAST = null; 4603 ASTPair currentAST = new ASTPair(); 4604 AST explicitConstructorInvocation_AST = null; 4605 Token t = null; 4606 AST t_AST = null; 4607 Token s = null; 4608 AST s_AST = null; 4609 Token s1 = null; 4610 AST s1_AST = null; 4611 4612 { 4613 if ((_tokenSet_54.member(LA(1))) && (_tokenSet_55.member(LA(2)))) { 4614 { 4615 switch ( LA(1)) { 4616 case LT: 4617 { 4618 typeArguments(false); 4619 astFactory.addASTChild(currentAST, returnAST); 4620 break; 4621 } 4622 case LITERAL_this: 4623 case LITERAL_super: 4624 { 4625 break; 4626 } 4627 default: 4628 { 4629 throw new NoViableAltException(LT(1), getFilename()); 4630 } 4631 } 4632 } 4633 { 4634 switch ( LA(1)) { 4635 case LITERAL_this: 4636 { 4637 t = LT(1); 4638 t_AST = astFactory.create(t); 4639 astFactory.makeASTRoot(currentAST, t_AST); 4640 match(LITERAL_this); 4641 AST tmp87_AST = null; 4642 tmp87_AST = astFactory.create(LT(1)); 4643 astFactory.addASTChild(currentAST, tmp87_AST); 4644 match(LPAREN); 4645 argList(); 4646 astFactory.addASTChild(currentAST, returnAST); 4647 AST tmp88_AST = null; 4648 tmp88_AST = astFactory.create(LT(1)); 4649 astFactory.addASTChild(currentAST, tmp88_AST); 4650 match(RPAREN); 4651 AST tmp89_AST = null; 4652 tmp89_AST = astFactory.create(LT(1)); 4653 astFactory.addASTChild(currentAST, tmp89_AST); 4654 match(SEMI); 4655 if ( inputState.guessing==0 ) { 4656 t_AST.setType(CTOR_CALL); 4657 } 4658 break; 4659 } 4660 case LITERAL_super: 4661 { 4662 s = LT(1); 4663 s_AST = astFactory.create(s); 4664 astFactory.makeASTRoot(currentAST, s_AST); 4665 match(LITERAL_super); 4666 AST tmp90_AST = null; 4667 tmp90_AST = astFactory.create(LT(1)); 4668 astFactory.addASTChild(currentAST, tmp90_AST); 4669 match(LPAREN); 4670 argList(); 4671 astFactory.addASTChild(currentAST, returnAST); 4672 AST tmp91_AST = null; 4673 tmp91_AST = astFactory.create(LT(1)); 4674 astFactory.addASTChild(currentAST, tmp91_AST); 4675 match(RPAREN); 4676 AST tmp92_AST = null; 4677 tmp92_AST = astFactory.create(LT(1)); 4678 astFactory.addASTChild(currentAST, tmp92_AST); 4679 match(SEMI); 4680 if ( inputState.guessing==0 ) { 4681 s_AST.setType(SUPER_CTOR_CALL); 4682 } 4683 break; 4684 } 4685 default: 4686 { 4687 throw new NoViableAltException(LT(1), getFilename()); 4688 } 4689 } 4690 } 4691 } 4692 else if ((_tokenSet_56.member(LA(1))) && (_tokenSet_57.member(LA(2)))) { 4693 primaryExpression(); 4694 astFactory.addASTChild(currentAST, returnAST); 4695 AST tmp93_AST = null; 4696 tmp93_AST = astFactory.create(LT(1)); 4697 astFactory.addASTChild(currentAST, tmp93_AST); 4698 match(DOT); 4699 { 4700 switch ( LA(1)) { 4701 case LT: 4702 { 4703 typeArguments(false); 4704 astFactory.addASTChild(currentAST, returnAST); 4705 break; 4706 } 4707 case LITERAL_super: 4708 { 4709 break; 4710 } 4711 default: 4712 { 4713 throw new NoViableAltException(LT(1), getFilename()); 4714 } 4715 } 4716 } 4717 s1 = LT(1); 4718 s1_AST = astFactory.create(s1); 4719 astFactory.makeASTRoot(currentAST, s1_AST); 4720 match(LITERAL_super); 4721 AST tmp94_AST = null; 4722 tmp94_AST = astFactory.create(LT(1)); 4723 astFactory.addASTChild(currentAST, tmp94_AST); 4724 match(LPAREN); 4725 argList(); 4726 astFactory.addASTChild(currentAST, returnAST); 4727 AST tmp95_AST = null; 4728 tmp95_AST = astFactory.create(LT(1)); 4729 astFactory.addASTChild(currentAST, tmp95_AST); 4730 match(RPAREN); 4731 AST tmp96_AST = null; 4732 tmp96_AST = astFactory.create(LT(1)); 4733 astFactory.addASTChild(currentAST, tmp96_AST); 4734 match(SEMI); 4735 if ( inputState.guessing==0 ) { 4736 s1_AST.setType(SUPER_CTOR_CALL); 4737 } 4738 } 4739 else { 4740 throw new NoViableAltException(LT(1), getFilename()); 4741 } 4742 4743 } 4744 explicitConstructorInvocation_AST = (AST)currentAST.root; 4745 returnAST = explicitConstructorInvocation_AST; 4746 } 4747 4748 public final void statement() throws RecognitionException, TokenStreamException { 4749 4750 returnAST = null; 4751 ASTPair currentAST = new ASTPair(); 4752 AST statement_AST = null; 4753 4754 switch ( LA(1)) { 4755 case FINAL: 4756 case ABSTRACT: 4757 case STRICTFP: 4758 case SEMI: 4759 case LITERAL_void: 4760 case LITERAL_boolean: 4761 case LITERAL_byte: 4762 case LITERAL_char: 4763 case LITERAL_short: 4764 case LITERAL_int: 4765 case LITERAL_float: 4766 case LITERAL_long: 4767 case LITERAL_double: 4768 case IDENT: 4769 case LITERAL_private: 4770 case LITERAL_public: 4771 case LITERAL_protected: 4772 case LITERAL_static: 4773 case LITERAL_transient: 4774 case LITERAL_native: 4775 case LITERAL_synchronized: 4776 case LITERAL_volatile: 4777 case LITERAL_class: 4778 case LCURLY: 4779 case LPAREN: 4780 case LITERAL_this: 4781 case LITERAL_super: 4782 case LITERAL_if: 4783 case LITERAL_while: 4784 case LITERAL_do: 4785 case LITERAL_break: 4786 case LITERAL_continue: 4787 case LITERAL_return: 4788 case LITERAL_switch: 4789 case LITERAL_throw: 4790 case LITERAL_for: 4791 case LITERAL_default: 4792 case LITERAL_try: 4793 case PLUS: 4794 case MINUS: 4795 case INC: 4796 case DEC: 4797 case BNOT: 4798 case LNOT: 4799 case LITERAL_true: 4800 case LITERAL_false: 4801 case LITERAL_null: 4802 case LITERAL_new: 4803 case NUM_INT: 4804 case CHAR_LITERAL: 4805 case STRING_LITERAL: 4806 case NUM_FLOAT: 4807 case NUM_LONG: 4808 case NUM_DOUBLE: 4809 case AT: 4810 case LITERAL_record: 4811 case TEXT_BLOCK_CONTENT: 4812 case LITERAL_yield: 4813 { 4814 traditionalStatement(); 4815 astFactory.addASTChild(currentAST, returnAST); 4816 statement_AST = (AST)currentAST.root; 4817 break; 4818 } 4819 case ASSERT: 4820 { 4821 assertStatement(); 4822 astFactory.addASTChild(currentAST, returnAST); 4823 statement_AST = (AST)currentAST.root; 4824 break; 4825 } 4826 default: 4827 { 4828 throw new NoViableAltException(LT(1), getFilename()); 4829 } 4830 } 4831 returnAST = statement_AST; 4832 } 4833 4834 public final void primaryExpression() throws RecognitionException, TokenStreamException { 4835 4836 returnAST = null; 4837 ASTPair currentAST = new ASTPair(); 4838 AST primaryExpression_AST = null; 4839 Token lbt = null; 4840 AST lbt_AST = null; 4841 4842 switch ( LA(1)) { 4843 case NUM_INT: 4844 case CHAR_LITERAL: 4845 case STRING_LITERAL: 4846 case NUM_FLOAT: 4847 case NUM_LONG: 4848 case NUM_DOUBLE: 4849 case TEXT_BLOCK_CONTENT: 4850 { 4851 constant(); 4852 astFactory.addASTChild(currentAST, returnAST); 4853 primaryExpression_AST = (AST)currentAST.root; 4854 break; 4855 } 4856 case LITERAL_true: 4857 { 4858 AST tmp97_AST = null; 4859 tmp97_AST = astFactory.create(LT(1)); 4860 astFactory.addASTChild(currentAST, tmp97_AST); 4861 match(LITERAL_true); 4862 primaryExpression_AST = (AST)currentAST.root; 4863 break; 4864 } 4865 case LITERAL_false: 4866 { 4867 AST tmp98_AST = null; 4868 tmp98_AST = astFactory.create(LT(1)); 4869 astFactory.addASTChild(currentAST, tmp98_AST); 4870 match(LITERAL_false); 4871 primaryExpression_AST = (AST)currentAST.root; 4872 break; 4873 } 4874 case LITERAL_this: 4875 { 4876 AST tmp99_AST = null; 4877 tmp99_AST = astFactory.create(LT(1)); 4878 astFactory.addASTChild(currentAST, tmp99_AST); 4879 match(LITERAL_this); 4880 primaryExpression_AST = (AST)currentAST.root; 4881 break; 4882 } 4883 case LITERAL_null: 4884 { 4885 AST tmp100_AST = null; 4886 tmp100_AST = astFactory.create(LT(1)); 4887 astFactory.addASTChild(currentAST, tmp100_AST); 4888 match(LITERAL_null); 4889 primaryExpression_AST = (AST)currentAST.root; 4890 break; 4891 } 4892 case LITERAL_new: 4893 { 4894 newExpression(); 4895 astFactory.addASTChild(currentAST, returnAST); 4896 primaryExpression_AST = (AST)currentAST.root; 4897 break; 4898 } 4899 case LPAREN: 4900 { 4901 AST tmp101_AST = null; 4902 tmp101_AST = astFactory.create(LT(1)); 4903 astFactory.addASTChild(currentAST, tmp101_AST); 4904 match(LPAREN); 4905 { 4906 boolean synPredMatched431 = false; 4907 if (((_tokenSet_20.member(LA(1))) && (_tokenSet_21.member(LA(2))))) { 4908 int _m431 = mark(); 4909 synPredMatched431 = true; 4910 inputState.guessing++; 4911 try { 4912 { 4913 lambdaExpression(); 4914 } 4915 } 4916 catch (RecognitionException pe) { 4917 synPredMatched431 = false; 4918 } 4919 rewind(_m431); 4920inputState.guessing--; 4921 } 4922 if ( synPredMatched431 ) { 4923 lambdaExpression(); 4924 astFactory.addASTChild(currentAST, returnAST); 4925 } 4926 else if ((_tokenSet_17.member(LA(1))) && (_tokenSet_58.member(LA(2)))) { 4927 assignmentExpression(); 4928 astFactory.addASTChild(currentAST, returnAST); 4929 } 4930 else { 4931 throw new NoViableAltException(LT(1), getFilename()); 4932 } 4933 4934 } 4935 AST tmp102_AST = null; 4936 tmp102_AST = astFactory.create(LT(1)); 4937 astFactory.addASTChild(currentAST, tmp102_AST); 4938 match(RPAREN); 4939 primaryExpression_AST = (AST)currentAST.root; 4940 break; 4941 } 4942 case LITERAL_super: 4943 { 4944 AST tmp103_AST = null; 4945 tmp103_AST = astFactory.create(LT(1)); 4946 astFactory.addASTChild(currentAST, tmp103_AST); 4947 match(LITERAL_super); 4948 primaryExpression_AST = (AST)currentAST.root; 4949 break; 4950 } 4951 default: 4952 boolean synPredMatched428 = false; 4953 if (((_tokenSet_13.member(LA(1))) && (_tokenSet_59.member(LA(2))))) { 4954 int _m428 = mark(); 4955 synPredMatched428 = true; 4956 inputState.guessing++; 4957 try { 4958 { 4959 typeSpec(false); 4960 match(DOUBLE_COLON); 4961 } 4962 } 4963 catch (RecognitionException pe) { 4964 synPredMatched428 = false; 4965 } 4966 rewind(_m428); 4967inputState.guessing--; 4968 } 4969 if ( synPredMatched428 ) { 4970 typeSpec(false); 4971 astFactory.addASTChild(currentAST, returnAST); 4972 primaryExpression_AST = (AST)currentAST.root; 4973 } 4974 else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_59.member(LA(2)))) { 4975 id(); 4976 astFactory.addASTChild(currentAST, returnAST); 4977 primaryExpression_AST = (AST)currentAST.root; 4978 } 4979 else if (((LA(1) >= LITERAL_void && LA(1) <= LITERAL_double)) && (_tokenSet_59.member(LA(2)))) { 4980 builtInType(); 4981 astFactory.addASTChild(currentAST, returnAST); 4982 { 4983 _loop433: 4984 do { 4985 if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) { 4986 lbt = LT(1); 4987 lbt_AST = astFactory.create(lbt); 4988 astFactory.makeASTRoot(currentAST, lbt_AST); 4989 match(LBRACK); 4990 if ( inputState.guessing==0 ) { 4991 lbt_AST.setType(ARRAY_DECLARATOR); 4992 } 4993 AST tmp104_AST = null; 4994 tmp104_AST = astFactory.create(LT(1)); 4995 astFactory.addASTChild(currentAST, tmp104_AST); 4996 match(RBRACK); 4997 } 4998 else { 4999 break _loop433; 5000 } 5001 5002 } while (true); 5003 } 5004 { 5005 if ((LA(1)==DOT) && (LA(2)==LITERAL_class)) { 5006 AST tmp105_AST = null; 5007 tmp105_AST = astFactory.create(LT(1)); 5008 astFactory.makeASTRoot(currentAST, tmp105_AST); 5009 match(DOT); 5010 AST tmp106_AST = null; 5011 tmp106_AST = astFactory.create(LT(1)); 5012 astFactory.addASTChild(currentAST, tmp106_AST); 5013 match(LITERAL_class); 5014 } 5015 else if ((_tokenSet_59.member(LA(1))) && (_tokenSet_60.member(LA(2)))) { 5016 } 5017 else { 5018 throw new NoViableAltException(LT(1), getFilename()); 5019 } 5020 5021 } 5022 primaryExpression_AST = (AST)currentAST.root; 5023 } 5024 else { 5025 throw new NoViableAltException(LT(1), getFilename()); 5026 } 5027 } 5028 returnAST = primaryExpression_AST; 5029 } 5030 5031/** Declaration of a variable. This can be a class/instance variable, 5032 * or a local variable in a method. 5033 @param mods declaration mods. 5034 @param t variable declaration type. 5035 @throws RecognitionException if recognition problem occurs. 5036 @throws TokenStreamException if problem occurs while generating a stream of tokens. 5037 * It can also include possible initialization. 5038 */ 5039 public final void variableDeclarator( 5040 AST mods, AST t 5041 ) throws RecognitionException, TokenStreamException { 5042 5043 returnAST = null; 5044 ASTPair currentAST = new ASTPair(); 5045 AST variableDeclarator_AST = null; 5046 AST id_AST = null; 5047 AST d_AST = null; 5048 AST v_AST = null; 5049 5050 id(); 5051 id_AST = (AST)returnAST; 5052 declaratorBrackets(t); 5053 d_AST = (AST)returnAST; 5054 varInitializer(); 5055 v_AST = (AST)returnAST; 5056 if ( inputState.guessing==0 ) { 5057 variableDeclarator_AST = (AST)currentAST.root; 5058 variableDeclarator_AST = (AST)astFactory.make( (new ASTArray(5)).add(astFactory.create(VARIABLE_DEF,"VARIABLE_DEF")).add(mods).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(d_AST))).add(id_AST).add(v_AST)); 5059 currentAST.root = variableDeclarator_AST; 5060 currentAST.child = variableDeclarator_AST!=null &&variableDeclarator_AST.getFirstChild()!=null ? 5061 variableDeclarator_AST.getFirstChild() : variableDeclarator_AST; 5062 currentAST.advanceChildToEnd(); 5063 } 5064 returnAST = variableDeclarator_AST; 5065 } 5066 5067 public final void varInitializer() throws RecognitionException, TokenStreamException { 5068 5069 returnAST = null; 5070 ASTPair currentAST = new ASTPair(); 5071 AST varInitializer_AST = null; 5072 5073 { 5074 switch ( LA(1)) { 5075 case ASSIGN: 5076 { 5077 AST tmp107_AST = null; 5078 tmp107_AST = astFactory.create(LT(1)); 5079 astFactory.makeASTRoot(currentAST, tmp107_AST); 5080 match(ASSIGN); 5081 initializer(); 5082 astFactory.addASTChild(currentAST, returnAST); 5083 break; 5084 } 5085 case FINAL: 5086 case ABSTRACT: 5087 case STRICTFP: 5088 case SEMI: 5089 case LITERAL_void: 5090 case LITERAL_boolean: 5091 case LITERAL_byte: 5092 case LITERAL_char: 5093 case LITERAL_short: 5094 case LITERAL_int: 5095 case LITERAL_float: 5096 case LITERAL_long: 5097 case LITERAL_double: 5098 case IDENT: 5099 case LITERAL_private: 5100 case LITERAL_public: 5101 case LITERAL_protected: 5102 case LITERAL_static: 5103 case LITERAL_transient: 5104 case LITERAL_native: 5105 case LITERAL_synchronized: 5106 case LITERAL_volatile: 5107 case LITERAL_class: 5108 case LITERAL_interface: 5109 case LCURLY: 5110 case RCURLY: 5111 case COMMA: 5112 case RPAREN: 5113 case LITERAL_default: 5114 case LT: 5115 case ENUM: 5116 case AT: 5117 case LITERAL_record: 5118 case LITERAL_yield: 5119 { 5120 break; 5121 } 5122 default: 5123 { 5124 throw new NoViableAltException(LT(1), getFilename()); 5125 } 5126 } 5127 } 5128 varInitializer_AST = (AST)currentAST.root; 5129 returnAST = varInitializer_AST; 5130 } 5131 5132 public final void initializer() throws RecognitionException, TokenStreamException { 5133 5134 returnAST = null; 5135 ASTPair currentAST = new ASTPair(); 5136 AST initializer_AST = null; 5137 5138 switch ( LA(1)) { 5139 case LITERAL_void: 5140 case LITERAL_boolean: 5141 case LITERAL_byte: 5142 case LITERAL_char: 5143 case LITERAL_short: 5144 case LITERAL_int: 5145 case LITERAL_float: 5146 case LITERAL_long: 5147 case LITERAL_double: 5148 case IDENT: 5149 case LPAREN: 5150 case LITERAL_this: 5151 case LITERAL_super: 5152 case LITERAL_switch: 5153 case PLUS: 5154 case MINUS: 5155 case INC: 5156 case DEC: 5157 case BNOT: 5158 case LNOT: 5159 case LITERAL_true: 5160 case LITERAL_false: 5161 case LITERAL_null: 5162 case LITERAL_new: 5163 case NUM_INT: 5164 case CHAR_LITERAL: 5165 case STRING_LITERAL: 5166 case NUM_FLOAT: 5167 case NUM_LONG: 5168 case NUM_DOUBLE: 5169 case AT: 5170 case LITERAL_record: 5171 case TEXT_BLOCK_CONTENT: 5172 case LITERAL_yield: 5173 { 5174 expression(); 5175 astFactory.addASTChild(currentAST, returnAST); 5176 initializer_AST = (AST)currentAST.root; 5177 break; 5178 } 5179 case LCURLY: 5180 { 5181 arrayInitializer(); 5182 astFactory.addASTChild(currentAST, returnAST); 5183 initializer_AST = (AST)currentAST.root; 5184 break; 5185 } 5186 default: 5187 { 5188 throw new NoViableAltException(LT(1), getFilename()); 5189 } 5190 } 5191 returnAST = initializer_AST; 5192 } 5193 5194 public final void arrayInitializer() throws RecognitionException, TokenStreamException { 5195 5196 returnAST = null; 5197 ASTPair currentAST = new ASTPair(); 5198 AST arrayInitializer_AST = null; 5199 Token lc = null; 5200 AST lc_AST = null; 5201 5202 lc = LT(1); 5203 lc_AST = astFactory.create(lc); 5204 astFactory.makeASTRoot(currentAST, lc_AST); 5205 match(LCURLY); 5206 if ( inputState.guessing==0 ) { 5207 lc_AST.setType(ARRAY_INIT); 5208 } 5209 { 5210 switch ( LA(1)) { 5211 case LITERAL_void: 5212 case LITERAL_boolean: 5213 case LITERAL_byte: 5214 case LITERAL_char: 5215 case LITERAL_short: 5216 case LITERAL_int: 5217 case LITERAL_float: 5218 case LITERAL_long: 5219 case LITERAL_double: 5220 case IDENT: 5221 case LCURLY: 5222 case LPAREN: 5223 case LITERAL_this: 5224 case LITERAL_super: 5225 case LITERAL_switch: 5226 case PLUS: 5227 case MINUS: 5228 case INC: 5229 case DEC: 5230 case BNOT: 5231 case LNOT: 5232 case LITERAL_true: 5233 case LITERAL_false: 5234 case LITERAL_null: 5235 case LITERAL_new: 5236 case NUM_INT: 5237 case CHAR_LITERAL: 5238 case STRING_LITERAL: 5239 case NUM_FLOAT: 5240 case NUM_LONG: 5241 case NUM_DOUBLE: 5242 case AT: 5243 case LITERAL_record: 5244 case TEXT_BLOCK_CONTENT: 5245 case LITERAL_yield: 5246 { 5247 initializer(); 5248 astFactory.addASTChild(currentAST, returnAST); 5249 { 5250 _loop202: 5251 do { 5252 if ((LA(1)==COMMA) && (_tokenSet_15.member(LA(2)))) { 5253 AST tmp108_AST = null; 5254 tmp108_AST = astFactory.create(LT(1)); 5255 astFactory.addASTChild(currentAST, tmp108_AST); 5256 match(COMMA); 5257 initializer(); 5258 astFactory.addASTChild(currentAST, returnAST); 5259 } 5260 else { 5261 break _loop202; 5262 } 5263 5264 } while (true); 5265 } 5266 break; 5267 } 5268 case RCURLY: 5269 case COMMA: 5270 { 5271 break; 5272 } 5273 default: 5274 { 5275 throw new NoViableAltException(LT(1), getFilename()); 5276 } 5277 } 5278 } 5279 { 5280 switch ( LA(1)) { 5281 case COMMA: 5282 { 5283 AST tmp109_AST = null; 5284 tmp109_AST = astFactory.create(LT(1)); 5285 astFactory.addASTChild(currentAST, tmp109_AST); 5286 match(COMMA); 5287 break; 5288 } 5289 case RCURLY: 5290 { 5291 break; 5292 } 5293 default: 5294 { 5295 throw new NoViableAltException(LT(1), getFilename()); 5296 } 5297 } 5298 } 5299 AST tmp110_AST = null; 5300 tmp110_AST = astFactory.create(LT(1)); 5301 astFactory.addASTChild(currentAST, tmp110_AST); 5302 match(RCURLY); 5303 arrayInitializer_AST = (AST)currentAST.root; 5304 returnAST = arrayInitializer_AST; 5305 } 5306 5307 public final void expression() throws RecognitionException, TokenStreamException { 5308 5309 returnAST = null; 5310 ASTPair currentAST = new ASTPair(); 5311 AST expression_AST = null; 5312 5313 boolean synPredMatched338 = false; 5314 if (((_tokenSet_20.member(LA(1))) && (_tokenSet_21.member(LA(2))))) { 5315 int _m338 = mark(); 5316 synPredMatched338 = true; 5317 inputState.guessing++; 5318 try { 5319 { 5320 lambdaExpression(); 5321 } 5322 } 5323 catch (RecognitionException pe) { 5324 synPredMatched338 = false; 5325 } 5326 rewind(_m338); 5327inputState.guessing--; 5328 } 5329 if ( synPredMatched338 ) { 5330 lambdaExpression(); 5331 astFactory.addASTChild(currentAST, returnAST); 5332 expression_AST = (AST)currentAST.root; 5333 } 5334 else if (((_tokenSet_17.member(LA(1))) && (_tokenSet_61.member(LA(2))))&&(LA(1)!=RPAREN)) { 5335 assignmentExpression(); 5336 astFactory.addASTChild(currentAST, returnAST); 5337 if ( inputState.guessing==0 ) { 5338 expression_AST = (AST)currentAST.root; 5339 expression_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(EXPR,"EXPR")).add(expression_AST)); 5340 currentAST.root = expression_AST; 5341 currentAST.child = expression_AST!=null &&expression_AST.getFirstChild()!=null ? 5342 expression_AST.getFirstChild() : expression_AST; 5343 currentAST.advanceChildToEnd(); 5344 } 5345 expression_AST = (AST)currentAST.root; 5346 } 5347 else { 5348 throw new NoViableAltException(LT(1), getFilename()); 5349 } 5350 5351 returnAST = expression_AST; 5352 } 5353 5354 public final void parameterDeclaration() throws RecognitionException, TokenStreamException { 5355 5356 returnAST = null; 5357 ASTPair currentAST = new ASTPair(); 5358 AST parameterDeclaration_AST = null; 5359 AST pm_AST = null; 5360 AST t_AST = null; 5361 AST id_AST = null; 5362 AST pd_AST = null; 5363 5364 parameterModifier(); 5365 pm_AST = (AST)returnAST; 5366 { 5367 if ((_tokenSet_13.member(LA(1))) && (_tokenSet_62.member(LA(2)))) { 5368 typeSpec(false); 5369 t_AST = (AST)returnAST; 5370 } 5371 else if ((_tokenSet_63.member(LA(1))) && (_tokenSet_64.member(LA(2)))) { 5372 } 5373 else { 5374 throw new NoViableAltException(LT(1), getFilename()); 5375 } 5376 5377 } 5378 parameterIdent(); 5379 id_AST = (AST)returnAST; 5380 declaratorBrackets(t_AST); 5381 pd_AST = (AST)returnAST; 5382 if ( inputState.guessing==0 ) { 5383 parameterDeclaration_AST = (AST)currentAST.root; 5384 parameterDeclaration_AST = (AST)astFactory.make( (new ASTArray(4)).add(astFactory.create(PARAMETER_DEF,"PARAMETER_DEF")).add(pm_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(pd_AST))).add(id_AST)); 5385 currentAST.root = parameterDeclaration_AST; 5386 currentAST.child = parameterDeclaration_AST!=null &¶meterDeclaration_AST.getFirstChild()!=null ? 5387 parameterDeclaration_AST.getFirstChild() : parameterDeclaration_AST; 5388 currentAST.advanceChildToEnd(); 5389 } 5390 returnAST = parameterDeclaration_AST; 5391 } 5392 5393 public final void variableLengthParameterDeclaration() throws RecognitionException, TokenStreamException { 5394 5395 returnAST = null; 5396 ASTPair currentAST = new ASTPair(); 5397 AST variableLengthParameterDeclaration_AST = null; 5398 AST pm_AST = null; 5399 AST t_AST = null; 5400 Token td = null; 5401 AST td_AST = null; 5402 AST id_AST = null; 5403 AST pd_AST = null; 5404 5405 parameterModifier(); 5406 pm_AST = (AST)returnAST; 5407 variableLengthParameterTypeSpec(); 5408 t_AST = (AST)returnAST; 5409 td = LT(1); 5410 td_AST = astFactory.create(td); 5411 match(ELLIPSIS); 5412 id(); 5413 id_AST = (AST)returnAST; 5414 declaratorBrackets(t_AST); 5415 pd_AST = (AST)returnAST; 5416 if ( inputState.guessing==0 ) { 5417 variableLengthParameterDeclaration_AST = (AST)currentAST.root; 5418 variableLengthParameterDeclaration_AST = (AST)astFactory.make( (new ASTArray(5)).add(astFactory.create(PARAMETER_DEF,"PARAMETER_DEF")).add(pm_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(pd_AST))).add(td_AST).add(id_AST)); 5419 currentAST.root = variableLengthParameterDeclaration_AST; 5420 currentAST.child = variableLengthParameterDeclaration_AST!=null &&variableLengthParameterDeclaration_AST.getFirstChild()!=null ? 5421 variableLengthParameterDeclaration_AST.getFirstChild() : variableLengthParameterDeclaration_AST; 5422 currentAST.advanceChildToEnd(); 5423 } 5424 returnAST = variableLengthParameterDeclaration_AST; 5425 } 5426 5427 public final void parameterModifier() throws RecognitionException, TokenStreamException { 5428 5429 returnAST = null; 5430 ASTPair currentAST = new ASTPair(); 5431 AST parameterModifier_AST = null; 5432 Token f = null; 5433 AST f_AST = null; 5434 5435 { 5436 _loop224: 5437 do { 5438 if ((LA(1)==AT) && (_tokenSet_0.member(LA(2)))) { 5439 annotation(); 5440 astFactory.addASTChild(currentAST, returnAST); 5441 } 5442 else { 5443 break _loop224; 5444 } 5445 5446 } while (true); 5447 } 5448 { 5449 switch ( LA(1)) { 5450 case FINAL: 5451 { 5452 f = LT(1); 5453 f_AST = astFactory.create(f); 5454 astFactory.addASTChild(currentAST, f_AST); 5455 match(FINAL); 5456 break; 5457 } 5458 case LITERAL_void: 5459 case LITERAL_boolean: 5460 case LITERAL_byte: 5461 case LITERAL_char: 5462 case LITERAL_short: 5463 case LITERAL_int: 5464 case LITERAL_float: 5465 case LITERAL_long: 5466 case LITERAL_double: 5467 case IDENT: 5468 case LITERAL_this: 5469 case AT: 5470 case LITERAL_record: 5471 case LITERAL_yield: 5472 { 5473 break; 5474 } 5475 default: 5476 { 5477 throw new NoViableAltException(LT(1), getFilename()); 5478 } 5479 } 5480 } 5481 { 5482 _loop227: 5483 do { 5484 if ((LA(1)==AT) && (_tokenSet_0.member(LA(2)))) { 5485 annotation(); 5486 astFactory.addASTChild(currentAST, returnAST); 5487 } 5488 else { 5489 break _loop227; 5490 } 5491 5492 } while (true); 5493 } 5494 if ( inputState.guessing==0 ) { 5495 parameterModifier_AST = (AST)currentAST.root; 5496 parameterModifier_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(MODIFIERS,"MODIFIERS")).add(parameterModifier_AST)); 5497 currentAST.root = parameterModifier_AST; 5498 currentAST.child = parameterModifier_AST!=null &¶meterModifier_AST.getFirstChild()!=null ? 5499 parameterModifier_AST.getFirstChild() : parameterModifier_AST; 5500 currentAST.advanceChildToEnd(); 5501 } 5502 parameterModifier_AST = (AST)currentAST.root; 5503 returnAST = parameterModifier_AST; 5504 } 5505 5506 public final void parameterIdent() throws RecognitionException, TokenStreamException { 5507 5508 returnAST = null; 5509 ASTPair currentAST = new ASTPair(); 5510 AST parameterIdent_AST = null; 5511 5512 switch ( LA(1)) { 5513 case LITERAL_this: 5514 { 5515 AST tmp111_AST = null; 5516 tmp111_AST = astFactory.create(LT(1)); 5517 astFactory.addASTChild(currentAST, tmp111_AST); 5518 match(LITERAL_this); 5519 parameterIdent_AST = (AST)currentAST.root; 5520 break; 5521 } 5522 case IDENT: 5523 case LITERAL_record: 5524 case LITERAL_yield: 5525 { 5526 { 5527 id(); 5528 astFactory.addASTChild(currentAST, returnAST); 5529 { 5530 switch ( LA(1)) { 5531 case DOT: 5532 { 5533 AST tmp112_AST = null; 5534 tmp112_AST = astFactory.create(LT(1)); 5535 astFactory.makeASTRoot(currentAST, tmp112_AST); 5536 match(DOT); 5537 AST tmp113_AST = null; 5538 tmp113_AST = astFactory.create(LT(1)); 5539 astFactory.addASTChild(currentAST, tmp113_AST); 5540 match(LITERAL_this); 5541 break; 5542 } 5543 case LBRACK: 5544 case COMMA: 5545 case RPAREN: 5546 case AT: 5547 { 5548 break; 5549 } 5550 default: 5551 { 5552 throw new NoViableAltException(LT(1), getFilename()); 5553 } 5554 } 5555 } 5556 } 5557 parameterIdent_AST = (AST)currentAST.root; 5558 break; 5559 } 5560 default: 5561 { 5562 throw new NoViableAltException(LT(1), getFilename()); 5563 } 5564 } 5565 returnAST = parameterIdent_AST; 5566 } 5567 5568 public final void catchParameterDeclaration() throws RecognitionException, TokenStreamException { 5569 5570 returnAST = null; 5571 ASTPair currentAST = new ASTPair(); 5572 AST catchParameterDeclaration_AST = null; 5573 AST pm_AST = null; 5574 AST mct_AST = null; 5575 AST id_AST = null; 5576 5577 parameterModifier(); 5578 pm_AST = (AST)returnAST; 5579 multiCatchTypes(); 5580 mct_AST = (AST)returnAST; 5581 id(); 5582 id_AST = (AST)returnAST; 5583 if ( inputState.guessing==0 ) { 5584 catchParameterDeclaration_AST = (AST)currentAST.root; 5585 catchParameterDeclaration_AST = 5586 (AST)astFactory.make( (new ASTArray(4)).add(astFactory.create(PARAMETER_DEF,"PARAMETER_DEF")).add(pm_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(mct_AST))).add(id_AST)); 5587 currentAST.root = catchParameterDeclaration_AST; 5588 currentAST.child = catchParameterDeclaration_AST!=null &&catchParameterDeclaration_AST.getFirstChild()!=null ? 5589 catchParameterDeclaration_AST.getFirstChild() : catchParameterDeclaration_AST; 5590 currentAST.advanceChildToEnd(); 5591 } 5592 returnAST = catchParameterDeclaration_AST; 5593 } 5594 5595 public final void multiCatchTypes() throws RecognitionException, TokenStreamException { 5596 5597 returnAST = null; 5598 ASTPair currentAST = new ASTPair(); 5599 AST multiCatchTypes_AST = null; 5600 5601 typeSpec(false); 5602 astFactory.addASTChild(currentAST, returnAST); 5603 { 5604 _loop236: 5605 do { 5606 if ((LA(1)==BOR)) { 5607 AST tmp114_AST = null; 5608 tmp114_AST = astFactory.create(LT(1)); 5609 astFactory.makeASTRoot(currentAST, tmp114_AST); 5610 match(BOR); 5611 typeSpec(false); 5612 astFactory.addASTChild(currentAST, returnAST); 5613 } 5614 else { 5615 break _loop236; 5616 } 5617 5618 } while (true); 5619 } 5620 multiCatchTypes_AST = (AST)currentAST.root; 5621 returnAST = multiCatchTypes_AST; 5622 } 5623 5624 public final void traditionalStatement() throws RecognitionException, TokenStreamException { 5625 5626 returnAST = null; 5627 ASTPair currentAST = new ASTPair(); 5628 AST traditionalStatement_AST = null; 5629 AST a_AST = null; 5630 AST m_AST = null; 5631 Token c = null; 5632 AST c_AST = null; 5633 Token w = null; 5634 AST w_AST = null; 5635 Token s = null; 5636 AST s_AST = null; 5637 5638 switch ( LA(1)) { 5639 case LCURLY: 5640 { 5641 compoundStatement(); 5642 astFactory.addASTChild(currentAST, returnAST); 5643 traditionalStatement_AST = (AST)currentAST.root; 5644 break; 5645 } 5646 case LITERAL_if: 5647 { 5648 AST tmp115_AST = null; 5649 tmp115_AST = astFactory.create(LT(1)); 5650 astFactory.makeASTRoot(currentAST, tmp115_AST); 5651 match(LITERAL_if); 5652 AST tmp116_AST = null; 5653 tmp116_AST = astFactory.create(LT(1)); 5654 astFactory.addASTChild(currentAST, tmp116_AST); 5655 match(LPAREN); 5656 expression(); 5657 astFactory.addASTChild(currentAST, returnAST); 5658 AST tmp117_AST = null; 5659 tmp117_AST = astFactory.create(LT(1)); 5660 astFactory.addASTChild(currentAST, tmp117_AST); 5661 match(RPAREN); 5662 statement(); 5663 astFactory.addASTChild(currentAST, returnAST); 5664 { 5665 if ((LA(1)==LITERAL_else) && (_tokenSet_44.member(LA(2)))) { 5666 elseStatement(); 5667 astFactory.addASTChild(currentAST, returnAST); 5668 } 5669 else if ((_tokenSet_65.member(LA(1))) && (_tokenSet_66.member(LA(2)))) { 5670 } 5671 else { 5672 throw new NoViableAltException(LT(1), getFilename()); 5673 } 5674 5675 } 5676 traditionalStatement_AST = (AST)currentAST.root; 5677 break; 5678 } 5679 case LITERAL_for: 5680 { 5681 forStatement(); 5682 astFactory.addASTChild(currentAST, returnAST); 5683 traditionalStatement_AST = (AST)currentAST.root; 5684 break; 5685 } 5686 case LITERAL_while: 5687 { 5688 AST tmp118_AST = null; 5689 tmp118_AST = astFactory.create(LT(1)); 5690 astFactory.makeASTRoot(currentAST, tmp118_AST); 5691 match(LITERAL_while); 5692 AST tmp119_AST = null; 5693 tmp119_AST = astFactory.create(LT(1)); 5694 astFactory.addASTChild(currentAST, tmp119_AST); 5695 match(LPAREN); 5696 expression(); 5697 astFactory.addASTChild(currentAST, returnAST); 5698 AST tmp120_AST = null; 5699 tmp120_AST = astFactory.create(LT(1)); 5700 astFactory.addASTChild(currentAST, tmp120_AST); 5701 match(RPAREN); 5702 statement(); 5703 astFactory.addASTChild(currentAST, returnAST); 5704 traditionalStatement_AST = (AST)currentAST.root; 5705 break; 5706 } 5707 case LITERAL_do: 5708 { 5709 AST tmp121_AST = null; 5710 tmp121_AST = astFactory.create(LT(1)); 5711 astFactory.makeASTRoot(currentAST, tmp121_AST); 5712 match(LITERAL_do); 5713 statement(); 5714 astFactory.addASTChild(currentAST, returnAST); 5715 w = LT(1); 5716 w_AST = astFactory.create(w); 5717 astFactory.addASTChild(currentAST, w_AST); 5718 match(LITERAL_while); 5719 if ( inputState.guessing==0 ) { 5720 w_AST.setType(DO_WHILE); 5721 } 5722 AST tmp122_AST = null; 5723 tmp122_AST = astFactory.create(LT(1)); 5724 astFactory.addASTChild(currentAST, tmp122_AST); 5725 match(LPAREN); 5726 expression(); 5727 astFactory.addASTChild(currentAST, returnAST); 5728 AST tmp123_AST = null; 5729 tmp123_AST = astFactory.create(LT(1)); 5730 astFactory.addASTChild(currentAST, tmp123_AST); 5731 match(RPAREN); 5732 AST tmp124_AST = null; 5733 tmp124_AST = astFactory.create(LT(1)); 5734 astFactory.addASTChild(currentAST, tmp124_AST); 5735 match(SEMI); 5736 traditionalStatement_AST = (AST)currentAST.root; 5737 break; 5738 } 5739 case LITERAL_break: 5740 { 5741 AST tmp125_AST = null; 5742 tmp125_AST = astFactory.create(LT(1)); 5743 astFactory.makeASTRoot(currentAST, tmp125_AST); 5744 match(LITERAL_break); 5745 { 5746 switch ( LA(1)) { 5747 case IDENT: 5748 case LITERAL_record: 5749 case LITERAL_yield: 5750 { 5751 id(); 5752 astFactory.addASTChild(currentAST, returnAST); 5753 break; 5754 } 5755 case SEMI: 5756 { 5757 break; 5758 } 5759 default: 5760 { 5761 throw new NoViableAltException(LT(1), getFilename()); 5762 } 5763 } 5764 } 5765 AST tmp126_AST = null; 5766 tmp126_AST = astFactory.create(LT(1)); 5767 astFactory.addASTChild(currentAST, tmp126_AST); 5768 match(SEMI); 5769 traditionalStatement_AST = (AST)currentAST.root; 5770 break; 5771 } 5772 case LITERAL_continue: 5773 { 5774 AST tmp127_AST = null; 5775 tmp127_AST = astFactory.create(LT(1)); 5776 astFactory.makeASTRoot(currentAST, tmp127_AST); 5777 match(LITERAL_continue); 5778 { 5779 switch ( LA(1)) { 5780 case IDENT: 5781 case LITERAL_record: 5782 case LITERAL_yield: 5783 { 5784 id(); 5785 astFactory.addASTChild(currentAST, returnAST); 5786 break; 5787 } 5788 case SEMI: 5789 { 5790 break; 5791 } 5792 default: 5793 { 5794 throw new NoViableAltException(LT(1), getFilename()); 5795 } 5796 } 5797 } 5798 AST tmp128_AST = null; 5799 tmp128_AST = astFactory.create(LT(1)); 5800 astFactory.addASTChild(currentAST, tmp128_AST); 5801 match(SEMI); 5802 traditionalStatement_AST = (AST)currentAST.root; 5803 break; 5804 } 5805 case LITERAL_return: 5806 { 5807 AST tmp129_AST = null; 5808 tmp129_AST = astFactory.create(LT(1)); 5809 astFactory.makeASTRoot(currentAST, tmp129_AST); 5810 match(LITERAL_return); 5811 { 5812 switch ( LA(1)) { 5813 case LITERAL_void: 5814 case LITERAL_boolean: 5815 case LITERAL_byte: 5816 case LITERAL_char: 5817 case LITERAL_short: 5818 case LITERAL_int: 5819 case LITERAL_float: 5820 case LITERAL_long: 5821 case LITERAL_double: 5822 case IDENT: 5823 case LPAREN: 5824 case LITERAL_this: 5825 case LITERAL_super: 5826 case LITERAL_switch: 5827 case PLUS: 5828 case MINUS: 5829 case INC: 5830 case DEC: 5831 case BNOT: 5832 case LNOT: 5833 case LITERAL_true: 5834 case LITERAL_false: 5835 case LITERAL_null: 5836 case LITERAL_new: 5837 case NUM_INT: 5838 case CHAR_LITERAL: 5839 case STRING_LITERAL: 5840 case NUM_FLOAT: 5841 case NUM_LONG: 5842 case NUM_DOUBLE: 5843 case AT: 5844 case LITERAL_record: 5845 case TEXT_BLOCK_CONTENT: 5846 case LITERAL_yield: 5847 { 5848 expression(); 5849 astFactory.addASTChild(currentAST, returnAST); 5850 break; 5851 } 5852 case SEMI: 5853 { 5854 break; 5855 } 5856 default: 5857 { 5858 throw new NoViableAltException(LT(1), getFilename()); 5859 } 5860 } 5861 } 5862 AST tmp130_AST = null; 5863 tmp130_AST = astFactory.create(LT(1)); 5864 astFactory.addASTChild(currentAST, tmp130_AST); 5865 match(SEMI); 5866 traditionalStatement_AST = (AST)currentAST.root; 5867 break; 5868 } 5869 case LITERAL_try: 5870 { 5871 tryBlock(); 5872 astFactory.addASTChild(currentAST, returnAST); 5873 traditionalStatement_AST = (AST)currentAST.root; 5874 break; 5875 } 5876 case LITERAL_throw: 5877 { 5878 throwStatement(); 5879 astFactory.addASTChild(currentAST, returnAST); 5880 traditionalStatement_AST = (AST)currentAST.root; 5881 break; 5882 } 5883 case SEMI: 5884 { 5885 s = LT(1); 5886 s_AST = astFactory.create(s); 5887 astFactory.addASTChild(currentAST, s_AST); 5888 match(SEMI); 5889 if ( inputState.guessing==0 ) { 5890 s_AST.setType(EMPTY_STAT); 5891 } 5892 traditionalStatement_AST = (AST)currentAST.root; 5893 break; 5894 } 5895 default: 5896 if (((LA(1)==LITERAL_yield) && (_tokenSet_17.member(LA(2))))&&(this.switchBlockDepth>0)) { 5897 yieldStatement(); 5898 astFactory.addASTChild(currentAST, returnAST); 5899 traditionalStatement_AST = (AST)currentAST.root; 5900 } 5901 else { 5902 boolean synPredMatched245 = false; 5903 if (((_tokenSet_67.member(LA(1))) && (_tokenSet_68.member(LA(2))))) { 5904 int _m245 = mark(); 5905 synPredMatched245 = true; 5906 inputState.guessing++; 5907 try { 5908 { 5909 declaration(); 5910 } 5911 } 5912 catch (RecognitionException pe) { 5913 synPredMatched245 = false; 5914 } 5915 rewind(_m245); 5916inputState.guessing--; 5917 } 5918 if ( synPredMatched245 ) { 5919 declaration(); 5920 astFactory.addASTChild(currentAST, returnAST); 5921 AST tmp131_AST = null; 5922 tmp131_AST = astFactory.create(LT(1)); 5923 astFactory.addASTChild(currentAST, tmp131_AST); 5924 match(SEMI); 5925 traditionalStatement_AST = (AST)currentAST.root; 5926 } 5927 else { 5928 boolean synPredMatched247 = false; 5929 if (((LA(1)==AT||LA(1)==LITERAL_record) && (_tokenSet_0.member(LA(2))))) { 5930 int _m247 = mark(); 5931 synPredMatched247 = true; 5932 inputState.guessing++; 5933 try { 5934 { 5935 annotations(); 5936 recordDefinition(null); 5937 } 5938 } 5939 catch (RecognitionException pe) { 5940 synPredMatched247 = false; 5941 } 5942 rewind(_m247); 5943inputState.guessing--; 5944 } 5945 if ( synPredMatched247 ) { 5946 { 5947 annotations(); 5948 a_AST = (AST)returnAST; 5949 if ( inputState.guessing==0 ) { 5950 5951 // We will change the annotations AST to be a modifier AST so that 5952 // if there are no annotations, we still have an empty modifier AST as we 5953 // do for classes without modifiers AND to reflect the structure of our 5954 // class def AST. 5955 a_AST.setType(MODIFIERS); 5956 a_AST.setText("MODIFIERS"); 5957 5958 } 5959 recordDefinition(a_AST); 5960 astFactory.addASTChild(currentAST, returnAST); 5961 } 5962 traditionalStatement_AST = (AST)currentAST.root; 5963 } 5964 else if ((LA(1)==LITERAL_switch) && (LA(2)==LPAREN)) { 5965 switchExpression(); 5966 astFactory.addASTChild(currentAST, returnAST); 5967 traditionalStatement_AST = (AST)currentAST.root; 5968 } 5969 else { 5970 boolean synPredMatched251 = false; 5971 if ((((_tokenSet_17.member(LA(1))) && (_tokenSet_69.member(LA(2))))&&(LA(2) != COLON))) { 5972 int _m251 = mark(); 5973 synPredMatched251 = true; 5974 inputState.guessing++; 5975 try { 5976 { 5977 if (!(LA(2) != COLON)) 5978 throw new SemanticException("LA(2) != COLON"); 5979 expression(); 5980 { 5981 if ((LA(1)==SEMI)) { 5982 match(SEMI); 5983 } 5984 else { 5985 } 5986 5987 } 5988 } 5989 } 5990 catch (RecognitionException pe) { 5991 synPredMatched251 = false; 5992 } 5993 rewind(_m251); 5994inputState.guessing--; 5995 } 5996 if ( synPredMatched251 ) { 5997 expression(); 5998 astFactory.addASTChild(currentAST, returnAST); 5999 { 6000 if ((LA(1)==SEMI) && (_tokenSet_65.member(LA(2)))) { 6001 AST tmp132_AST = null; 6002 tmp132_AST = astFactory.create(LT(1)); 6003 astFactory.addASTChild(currentAST, tmp132_AST); 6004 match(SEMI); 6005 } 6006 else if ((_tokenSet_65.member(LA(1))) && (_tokenSet_66.member(LA(2)))) { 6007 } 6008 else { 6009 throw new NoViableAltException(LT(1), getFilename()); 6010 } 6011 6012 } 6013 traditionalStatement_AST = (AST)currentAST.root; 6014 } 6015 else if ((_tokenSet_70.member(LA(1))) && (_tokenSet_71.member(LA(2)))) { 6016 modifiers(); 6017 m_AST = (AST)returnAST; 6018 classDefinition(m_AST); 6019 astFactory.addASTChild(currentAST, returnAST); 6020 traditionalStatement_AST = (AST)currentAST.root; 6021 } 6022 else if ((_tokenSet_0.member(LA(1))) && (LA(2)==COLON)) { 6023 id(); 6024 astFactory.addASTChild(currentAST, returnAST); 6025 c = LT(1); 6026 c_AST = astFactory.create(c); 6027 astFactory.makeASTRoot(currentAST, c_AST); 6028 match(COLON); 6029 if ( inputState.guessing==0 ) { 6030 c_AST.setType(LABELED_STAT); 6031 } 6032 statement(); 6033 astFactory.addASTChild(currentAST, returnAST); 6034 traditionalStatement_AST = (AST)currentAST.root; 6035 } 6036 else if ((LA(1)==LITERAL_synchronized) && (LA(2)==LPAREN)) { 6037 AST tmp133_AST = null; 6038 tmp133_AST = astFactory.create(LT(1)); 6039 astFactory.makeASTRoot(currentAST, tmp133_AST); 6040 match(LITERAL_synchronized); 6041 AST tmp134_AST = null; 6042 tmp134_AST = astFactory.create(LT(1)); 6043 astFactory.addASTChild(currentAST, tmp134_AST); 6044 match(LPAREN); 6045 expression(); 6046 astFactory.addASTChild(currentAST, returnAST); 6047 AST tmp135_AST = null; 6048 tmp135_AST = astFactory.create(LT(1)); 6049 astFactory.addASTChild(currentAST, tmp135_AST); 6050 match(RPAREN); 6051 compoundStatement(); 6052 astFactory.addASTChild(currentAST, returnAST); 6053 traditionalStatement_AST = (AST)currentAST.root; 6054 } 6055 else { 6056 throw new NoViableAltException(LT(1), getFilename()); 6057 } 6058 }}}} 6059 returnAST = traditionalStatement_AST; 6060 } 6061 6062 public final void assertStatement() throws RecognitionException, TokenStreamException { 6063 6064 returnAST = null; 6065 ASTPair currentAST = new ASTPair(); 6066 AST assertStatement_AST = null; 6067 6068 AST tmp136_AST = null; 6069 tmp136_AST = astFactory.create(LT(1)); 6070 astFactory.makeASTRoot(currentAST, tmp136_AST); 6071 match(ASSERT); 6072 expression(); 6073 astFactory.addASTChild(currentAST, returnAST); 6074 { 6075 switch ( LA(1)) { 6076 case COLON: 6077 { 6078 AST tmp137_AST = null; 6079 tmp137_AST = astFactory.create(LT(1)); 6080 astFactory.addASTChild(currentAST, tmp137_AST); 6081 match(COLON); 6082 expression(); 6083 astFactory.addASTChild(currentAST, returnAST); 6084 break; 6085 } 6086 case SEMI: 6087 { 6088 break; 6089 } 6090 default: 6091 { 6092 throw new NoViableAltException(LT(1), getFilename()); 6093 } 6094 } 6095 } 6096 AST tmp138_AST = null; 6097 tmp138_AST = astFactory.create(LT(1)); 6098 astFactory.addASTChild(currentAST, tmp138_AST); 6099 match(SEMI); 6100 assertStatement_AST = (AST)currentAST.root; 6101 returnAST = assertStatement_AST; 6102 } 6103 6104 public final void yieldStatement() throws RecognitionException, TokenStreamException { 6105 6106 returnAST = null; 6107 ASTPair currentAST = new ASTPair(); 6108 AST yieldStatement_AST = null; 6109 Token l = null; 6110 AST l_AST = null; 6111 AST e_AST = null; 6112 Token s = null; 6113 AST s_AST = null; 6114 6115 l = LT(1); 6116 l_AST = astFactory.create(l); 6117 match(LITERAL_yield); 6118 expression(); 6119 e_AST = (AST)returnAST; 6120 s = LT(1); 6121 s_AST = astFactory.create(s); 6122 match(SEMI); 6123 if ( inputState.guessing==0 ) { 6124 yieldStatement_AST = (AST)currentAST.root; 6125 yieldStatement_AST = (AST)astFactory.make( (new ASTArray(3)).add(l_AST).add(e_AST).add(s_AST)); 6126 currentAST.root = yieldStatement_AST; 6127 currentAST.child = yieldStatement_AST!=null &&yieldStatement_AST.getFirstChild()!=null ? 6128 yieldStatement_AST.getFirstChild() : yieldStatement_AST; 6129 currentAST.advanceChildToEnd(); 6130 } 6131 returnAST = yieldStatement_AST; 6132 } 6133 6134 public final void switchExpression() throws RecognitionException, TokenStreamException { 6135 6136 returnAST = null; 6137 ASTPair currentAST = new ASTPair(); 6138 AST switchExpression_AST = null; 6139 6140 AST tmp139_AST = null; 6141 tmp139_AST = astFactory.create(LT(1)); 6142 astFactory.makeASTRoot(currentAST, tmp139_AST); 6143 match(LITERAL_switch); 6144 AST tmp140_AST = null; 6145 tmp140_AST = astFactory.create(LT(1)); 6146 astFactory.addASTChild(currentAST, tmp140_AST); 6147 match(LPAREN); 6148 expression(); 6149 astFactory.addASTChild(currentAST, returnAST); 6150 AST tmp141_AST = null; 6151 tmp141_AST = astFactory.create(LT(1)); 6152 astFactory.addASTChild(currentAST, tmp141_AST); 6153 match(RPAREN); 6154 switchBlock(); 6155 astFactory.addASTChild(currentAST, returnAST); 6156 switchExpression_AST = (AST)currentAST.root; 6157 returnAST = switchExpression_AST; 6158 } 6159 6160 public final void elseStatement() throws RecognitionException, TokenStreamException { 6161 6162 returnAST = null; 6163 ASTPair currentAST = new ASTPair(); 6164 AST elseStatement_AST = null; 6165 6166 AST tmp142_AST = null; 6167 tmp142_AST = astFactory.create(LT(1)); 6168 astFactory.makeASTRoot(currentAST, tmp142_AST); 6169 match(LITERAL_else); 6170 statement(); 6171 astFactory.addASTChild(currentAST, returnAST); 6172 elseStatement_AST = (AST)currentAST.root; 6173 returnAST = elseStatement_AST; 6174 } 6175 6176 public final void forStatement() throws RecognitionException, TokenStreamException { 6177 6178 returnAST = null; 6179 ASTPair currentAST = new ASTPair(); 6180 AST forStatement_AST = null; 6181 Token f = null; 6182 AST f_AST = null; 6183 6184 f = LT(1); 6185 f_AST = astFactory.create(f); 6186 astFactory.makeASTRoot(currentAST, f_AST); 6187 match(LITERAL_for); 6188 AST tmp143_AST = null; 6189 tmp143_AST = astFactory.create(LT(1)); 6190 astFactory.addASTChild(currentAST, tmp143_AST); 6191 match(LPAREN); 6192 { 6193 boolean synPredMatched261 = false; 6194 if (((_tokenSet_72.member(LA(1))) && (_tokenSet_73.member(LA(2))))) { 6195 int _m261 = mark(); 6196 synPredMatched261 = true; 6197 inputState.guessing++; 6198 try { 6199 { 6200 forInit(); 6201 match(SEMI); 6202 } 6203 } 6204 catch (RecognitionException pe) { 6205 synPredMatched261 = false; 6206 } 6207 rewind(_m261); 6208inputState.guessing--; 6209 } 6210 if ( synPredMatched261 ) { 6211 traditionalForClause(); 6212 astFactory.addASTChild(currentAST, returnAST); 6213 } 6214 else if ((_tokenSet_67.member(LA(1))) && (_tokenSet_68.member(LA(2)))) { 6215 forEachClause(); 6216 astFactory.addASTChild(currentAST, returnAST); 6217 } 6218 else { 6219 throw new NoViableAltException(LT(1), getFilename()); 6220 } 6221 6222 } 6223 AST tmp144_AST = null; 6224 tmp144_AST = astFactory.create(LT(1)); 6225 astFactory.addASTChild(currentAST, tmp144_AST); 6226 match(RPAREN); 6227 statement(); 6228 astFactory.addASTChild(currentAST, returnAST); 6229 forStatement_AST = (AST)currentAST.root; 6230 returnAST = forStatement_AST; 6231 } 6232 6233 public final void tryBlock() throws RecognitionException, TokenStreamException { 6234 6235 returnAST = null; 6236 ASTPair currentAST = new ASTPair(); 6237 AST tryBlock_AST = null; 6238 6239 AST tmp145_AST = null; 6240 tmp145_AST = astFactory.create(LT(1)); 6241 astFactory.makeASTRoot(currentAST, tmp145_AST); 6242 match(LITERAL_try); 6243 { 6244 switch ( LA(1)) { 6245 case LPAREN: 6246 { 6247 resourceSpecification(); 6248 astFactory.addASTChild(currentAST, returnAST); 6249 break; 6250 } 6251 case LCURLY: 6252 { 6253 break; 6254 } 6255 default: 6256 { 6257 throw new NoViableAltException(LT(1), getFilename()); 6258 } 6259 } 6260 } 6261 compoundStatement(); 6262 astFactory.addASTChild(currentAST, returnAST); 6263 { 6264 _loop319: 6265 do { 6266 if ((LA(1)==LITERAL_catch)) { 6267 handler(); 6268 astFactory.addASTChild(currentAST, returnAST); 6269 } 6270 else { 6271 break _loop319; 6272 } 6273 6274 } while (true); 6275 } 6276 { 6277 switch ( LA(1)) { 6278 case LITERAL_finally: 6279 { 6280 finallyHandler(); 6281 astFactory.addASTChild(currentAST, returnAST); 6282 break; 6283 } 6284 case FINAL: 6285 case ABSTRACT: 6286 case STRICTFP: 6287 case SEMI: 6288 case LITERAL_void: 6289 case LITERAL_boolean: 6290 case LITERAL_byte: 6291 case LITERAL_char: 6292 case LITERAL_short: 6293 case LITERAL_int: 6294 case LITERAL_float: 6295 case LITERAL_long: 6296 case LITERAL_double: 6297 case IDENT: 6298 case STAR: 6299 case LITERAL_private: 6300 case LITERAL_public: 6301 case LITERAL_protected: 6302 case LITERAL_static: 6303 case LITERAL_transient: 6304 case LITERAL_native: 6305 case LITERAL_synchronized: 6306 case LITERAL_volatile: 6307 case LITERAL_class: 6308 case LCURLY: 6309 case RCURLY: 6310 case LPAREN: 6311 case RPAREN: 6312 case LITERAL_this: 6313 case LITERAL_super: 6314 case COLON: 6315 case LITERAL_if: 6316 case LITERAL_while: 6317 case LITERAL_do: 6318 case LITERAL_break: 6319 case LITERAL_continue: 6320 case LITERAL_return: 6321 case LITERAL_switch: 6322 case LITERAL_throw: 6323 case LITERAL_for: 6324 case LITERAL_else: 6325 case LITERAL_case: 6326 case LITERAL_default: 6327 case LITERAL_try: 6328 case LT: 6329 case GT: 6330 case LE: 6331 case GE: 6332 case LITERAL_instanceof: 6333 case SL: 6334 case SR: 6335 case BSR: 6336 case PLUS: 6337 case MINUS: 6338 case DIV: 6339 case MOD: 6340 case INC: 6341 case DEC: 6342 case BNOT: 6343 case LNOT: 6344 case LITERAL_true: 6345 case LITERAL_false: 6346 case LITERAL_null: 6347 case LITERAL_new: 6348 case NUM_INT: 6349 case CHAR_LITERAL: 6350 case STRING_LITERAL: 6351 case NUM_FLOAT: 6352 case NUM_LONG: 6353 case NUM_DOUBLE: 6354 case ASSERT: 6355 case AT: 6356 case LITERAL_record: 6357 case TEXT_BLOCK_CONTENT: 6358 case LITERAL_yield: 6359 { 6360 break; 6361 } 6362 default: 6363 { 6364 throw new NoViableAltException(LT(1), getFilename()); 6365 } 6366 } 6367 } 6368 tryBlock_AST = (AST)currentAST.root; 6369 returnAST = tryBlock_AST; 6370 } 6371 6372 public final void throwStatement() throws RecognitionException, TokenStreamException { 6373 6374 returnAST = null; 6375 ASTPair currentAST = new ASTPair(); 6376 AST throwStatement_AST = null; 6377 6378 AST tmp146_AST = null; 6379 tmp146_AST = astFactory.create(LT(1)); 6380 astFactory.makeASTRoot(currentAST, tmp146_AST); 6381 match(LITERAL_throw); 6382 expression(); 6383 astFactory.addASTChild(currentAST, returnAST); 6384 AST tmp147_AST = null; 6385 tmp147_AST = astFactory.create(LT(1)); 6386 astFactory.addASTChild(currentAST, tmp147_AST); 6387 match(SEMI); 6388 throwStatement_AST = (AST)currentAST.root; 6389 returnAST = throwStatement_AST; 6390 } 6391 6392 public final void forInit() throws RecognitionException, TokenStreamException { 6393 6394 returnAST = null; 6395 ASTPair currentAST = new ASTPair(); 6396 AST forInit_AST = null; 6397 6398 { 6399 boolean synPredMatched311 = false; 6400 if (((_tokenSet_67.member(LA(1))) && (_tokenSet_68.member(LA(2))))) { 6401 int _m311 = mark(); 6402 synPredMatched311 = true; 6403 inputState.guessing++; 6404 try { 6405 { 6406 declaration(); 6407 } 6408 } 6409 catch (RecognitionException pe) { 6410 synPredMatched311 = false; 6411 } 6412 rewind(_m311); 6413inputState.guessing--; 6414 } 6415 if ( synPredMatched311 ) { 6416 declaration(); 6417 astFactory.addASTChild(currentAST, returnAST); 6418 } 6419 else if ((_tokenSet_17.member(LA(1))) && (_tokenSet_74.member(LA(2)))) { 6420 expressionList(); 6421 astFactory.addASTChild(currentAST, returnAST); 6422 } 6423 else if ((LA(1)==SEMI)) { 6424 } 6425 else { 6426 throw new NoViableAltException(LT(1), getFilename()); 6427 } 6428 6429 } 6430 if ( inputState.guessing==0 ) { 6431 forInit_AST = (AST)currentAST.root; 6432 forInit_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(FOR_INIT,"FOR_INIT")).add(forInit_AST)); 6433 currentAST.root = forInit_AST; 6434 currentAST.child = forInit_AST!=null &&forInit_AST.getFirstChild()!=null ? 6435 forInit_AST.getFirstChild() : forInit_AST; 6436 currentAST.advanceChildToEnd(); 6437 } 6438 forInit_AST = (AST)currentAST.root; 6439 returnAST = forInit_AST; 6440 } 6441 6442 public final void traditionalForClause() throws RecognitionException, TokenStreamException { 6443 6444 returnAST = null; 6445 ASTPair currentAST = new ASTPair(); 6446 AST traditionalForClause_AST = null; 6447 6448 forInit(); 6449 astFactory.addASTChild(currentAST, returnAST); 6450 AST tmp148_AST = null; 6451 tmp148_AST = astFactory.create(LT(1)); 6452 astFactory.addASTChild(currentAST, tmp148_AST); 6453 match(SEMI); 6454 forCond(); 6455 astFactory.addASTChild(currentAST, returnAST); 6456 AST tmp149_AST = null; 6457 tmp149_AST = astFactory.create(LT(1)); 6458 astFactory.addASTChild(currentAST, tmp149_AST); 6459 match(SEMI); 6460 forIter(); 6461 astFactory.addASTChild(currentAST, returnAST); 6462 traditionalForClause_AST = (AST)currentAST.root; 6463 returnAST = traditionalForClause_AST; 6464 } 6465 6466 public final void forEachClause() throws RecognitionException, TokenStreamException { 6467 6468 returnAST = null; 6469 ASTPair currentAST = new ASTPair(); 6470 AST forEachClause_AST = null; 6471 6472 forEachDeclarator(); 6473 astFactory.addASTChild(currentAST, returnAST); 6474 AST tmp150_AST = null; 6475 tmp150_AST = astFactory.create(LT(1)); 6476 astFactory.addASTChild(currentAST, tmp150_AST); 6477 match(COLON); 6478 expression(); 6479 astFactory.addASTChild(currentAST, returnAST); 6480 if ( inputState.guessing==0 ) { 6481 forEachClause_AST = (AST)currentAST.root; 6482 forEachClause_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(FOR_EACH_CLAUSE,"FOR_EACH_CLAUSE")).add(forEachClause_AST)); 6483 currentAST.root = forEachClause_AST; 6484 currentAST.child = forEachClause_AST!=null &&forEachClause_AST.getFirstChild()!=null ? 6485 forEachClause_AST.getFirstChild() : forEachClause_AST; 6486 currentAST.advanceChildToEnd(); 6487 } 6488 forEachClause_AST = (AST)currentAST.root; 6489 returnAST = forEachClause_AST; 6490 } 6491 6492 public final void forCond() throws RecognitionException, TokenStreamException { 6493 6494 returnAST = null; 6495 ASTPair currentAST = new ASTPair(); 6496 AST forCond_AST = null; 6497 6498 { 6499 switch ( LA(1)) { 6500 case LITERAL_void: 6501 case LITERAL_boolean: 6502 case LITERAL_byte: 6503 case LITERAL_char: 6504 case LITERAL_short: 6505 case LITERAL_int: 6506 case LITERAL_float: 6507 case LITERAL_long: 6508 case LITERAL_double: 6509 case IDENT: 6510 case LPAREN: 6511 case LITERAL_this: 6512 case LITERAL_super: 6513 case LITERAL_switch: 6514 case PLUS: 6515 case MINUS: 6516 case INC: 6517 case DEC: 6518 case BNOT: 6519 case LNOT: 6520 case LITERAL_true: 6521 case LITERAL_false: 6522 case LITERAL_null: 6523 case LITERAL_new: 6524 case NUM_INT: 6525 case CHAR_LITERAL: 6526 case STRING_LITERAL: 6527 case NUM_FLOAT: 6528 case NUM_LONG: 6529 case NUM_DOUBLE: 6530 case AT: 6531 case LITERAL_record: 6532 case TEXT_BLOCK_CONTENT: 6533 case LITERAL_yield: 6534 { 6535 expression(); 6536 astFactory.addASTChild(currentAST, returnAST); 6537 break; 6538 } 6539 case SEMI: 6540 { 6541 break; 6542 } 6543 default: 6544 { 6545 throw new NoViableAltException(LT(1), getFilename()); 6546 } 6547 } 6548 } 6549 if ( inputState.guessing==0 ) { 6550 forCond_AST = (AST)currentAST.root; 6551 forCond_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(FOR_CONDITION,"FOR_CONDITION")).add(forCond_AST)); 6552 currentAST.root = forCond_AST; 6553 currentAST.child = forCond_AST!=null &&forCond_AST.getFirstChild()!=null ? 6554 forCond_AST.getFirstChild() : forCond_AST; 6555 currentAST.advanceChildToEnd(); 6556 } 6557 forCond_AST = (AST)currentAST.root; 6558 returnAST = forCond_AST; 6559 } 6560 6561 public final void forIter() throws RecognitionException, TokenStreamException { 6562 6563 returnAST = null; 6564 ASTPair currentAST = new ASTPair(); 6565 AST forIter_AST = null; 6566 6567 { 6568 switch ( LA(1)) { 6569 case LITERAL_void: 6570 case LITERAL_boolean: 6571 case LITERAL_byte: 6572 case LITERAL_char: 6573 case LITERAL_short: 6574 case LITERAL_int: 6575 case LITERAL_float: 6576 case LITERAL_long: 6577 case LITERAL_double: 6578 case IDENT: 6579 case LPAREN: 6580 case LITERAL_this: 6581 case LITERAL_super: 6582 case LITERAL_switch: 6583 case PLUS: 6584 case MINUS: 6585 case INC: 6586 case DEC: 6587 case BNOT: 6588 case LNOT: 6589 case LITERAL_true: 6590 case LITERAL_false: 6591 case LITERAL_null: 6592 case LITERAL_new: 6593 case NUM_INT: 6594 case CHAR_LITERAL: 6595 case STRING_LITERAL: 6596 case NUM_FLOAT: 6597 case NUM_LONG: 6598 case NUM_DOUBLE: 6599 case AT: 6600 case LITERAL_record: 6601 case TEXT_BLOCK_CONTENT: 6602 case LITERAL_yield: 6603 { 6604 expressionList(); 6605 astFactory.addASTChild(currentAST, returnAST); 6606 break; 6607 } 6608 case RPAREN: 6609 { 6610 break; 6611 } 6612 default: 6613 { 6614 throw new NoViableAltException(LT(1), getFilename()); 6615 } 6616 } 6617 } 6618 if ( inputState.guessing==0 ) { 6619 forIter_AST = (AST)currentAST.root; 6620 forIter_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(FOR_ITERATOR,"FOR_ITERATOR")).add(forIter_AST)); 6621 currentAST.root = forIter_AST; 6622 currentAST.child = forIter_AST!=null &&forIter_AST.getFirstChild()!=null ? 6623 forIter_AST.getFirstChild() : forIter_AST; 6624 currentAST.advanceChildToEnd(); 6625 } 6626 forIter_AST = (AST)currentAST.root; 6627 returnAST = forIter_AST; 6628 } 6629 6630 public final void forEachDeclarator() throws RecognitionException, TokenStreamException { 6631 6632 returnAST = null; 6633 ASTPair currentAST = new ASTPair(); 6634 AST forEachDeclarator_AST = null; 6635 AST m_AST = null; 6636 AST t_AST = null; 6637 AST id_AST = null; 6638 AST d_AST = null; 6639 6640 modifiers(); 6641 m_AST = (AST)returnAST; 6642 typeSpec(false); 6643 t_AST = (AST)returnAST; 6644 id(); 6645 id_AST = (AST)returnAST; 6646 declaratorBrackets(t_AST); 6647 d_AST = (AST)returnAST; 6648 if ( inputState.guessing==0 ) { 6649 forEachDeclarator_AST = (AST)currentAST.root; 6650 forEachDeclarator_AST = (AST)astFactory.make( (new ASTArray(4)).add(astFactory.create(VARIABLE_DEF,"VARIABLE_DEF")).add(m_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(d_AST))).add(id_AST)); 6651 currentAST.root = forEachDeclarator_AST; 6652 currentAST.child = forEachDeclarator_AST!=null &&forEachDeclarator_AST.getFirstChild()!=null ? 6653 forEachDeclarator_AST.getFirstChild() : forEachDeclarator_AST; 6654 currentAST.advanceChildToEnd(); 6655 } 6656 returnAST = forEachDeclarator_AST; 6657 } 6658 6659 public final void switchBlock() throws RecognitionException, TokenStreamException { 6660 6661 returnAST = null; 6662 ASTPair currentAST = new ASTPair(); 6663 AST switchBlock_AST = null; 6664 6665 { 6666 switchBlockDepth++; 6667 AST tmp151_AST = null; 6668 tmp151_AST = astFactory.create(LT(1)); 6669 astFactory.addASTChild(currentAST, tmp151_AST); 6670 match(LCURLY); 6671 } 6672 { 6673 boolean synPredMatched272 = false; 6674 if (((LA(1)==LITERAL_case||LA(1)==LITERAL_default) && (_tokenSet_75.member(LA(2))))) { 6675 int _m272 = mark(); 6676 synPredMatched272 = true; 6677 inputState.guessing++; 6678 try { 6679 { 6680 { 6681 int _cnt271=0; 6682 _loop271: 6683 do { 6684 if ((LA(1)==LITERAL_case||LA(1)==LITERAL_default)) { 6685 switchRule(); 6686 } 6687 else { 6688 if ( _cnt271>=1 ) { break _loop271; } else {throw new NoViableAltException(LT(1), getFilename());} 6689 } 6690 6691 _cnt271++; 6692 } while (true); 6693 } 6694 } 6695 } 6696 catch (RecognitionException pe) { 6697 synPredMatched272 = false; 6698 } 6699 rewind(_m272); 6700inputState.guessing--; 6701 } 6702 if ( synPredMatched272 ) { 6703 { 6704 { 6705 int _cnt275=0; 6706 _loop275: 6707 do { 6708 if ((LA(1)==LITERAL_case||LA(1)==LITERAL_default)) { 6709 switchRule(); 6710 astFactory.addASTChild(currentAST, returnAST); 6711 } 6712 else { 6713 if ( _cnt275>=1 ) { break _loop275; } else {throw new NoViableAltException(LT(1), getFilename());} 6714 } 6715 6716 _cnt275++; 6717 } while (true); 6718 } 6719 } 6720 } 6721 else { 6722 boolean synPredMatched279 = false; 6723 if (((_tokenSet_76.member(LA(1))) && (_tokenSet_77.member(LA(2))))) { 6724 int _m279 = mark(); 6725 synPredMatched279 = true; 6726 inputState.guessing++; 6727 try { 6728 { 6729 { 6730 _loop278: 6731 do { 6732 if ((LA(1)==LITERAL_case||LA(1)==LITERAL_default)) { 6733 casesGroup(); 6734 } 6735 else { 6736 break _loop278; 6737 } 6738 6739 } while (true); 6740 } 6741 } 6742 } 6743 catch (RecognitionException pe) { 6744 synPredMatched279 = false; 6745 } 6746 rewind(_m279); 6747inputState.guessing--; 6748 } 6749 if ( synPredMatched279 ) { 6750 { 6751 { 6752 _loop282: 6753 do { 6754 if ((LA(1)==LITERAL_case||LA(1)==LITERAL_default)) { 6755 casesGroup(); 6756 astFactory.addASTChild(currentAST, returnAST); 6757 } 6758 else { 6759 break _loop282; 6760 } 6761 6762 } while (true); 6763 } 6764 } 6765 } 6766 else { 6767 throw new NoViableAltException(LT(1), getFilename()); 6768 } 6769 } 6770 } 6771 { 6772 switchBlockDepth--; 6773 AST tmp152_AST = null; 6774 tmp152_AST = astFactory.create(LT(1)); 6775 astFactory.addASTChild(currentAST, tmp152_AST); 6776 match(RCURLY); 6777 } 6778 switchBlock_AST = (AST)currentAST.root; 6779 returnAST = switchBlock_AST; 6780 } 6781 6782 public final void switchRule() throws RecognitionException, TokenStreamException { 6783 6784 returnAST = null; 6785 ASTPair currentAST = new ASTPair(); 6786 AST switchRule_AST = null; 6787 AST se_AST = null; 6788 AST sb_AST = null; 6789 AST st_AST = null; 6790 6791 { 6792 boolean synPredMatched294 = false; 6793 if (((LA(1)==LITERAL_case||LA(1)==LITERAL_default) && (_tokenSet_75.member(LA(2))))) { 6794 int _m294 = mark(); 6795 synPredMatched294 = true; 6796 inputState.guessing++; 6797 try { 6798 { 6799 switchLabeledExpression(); 6800 } 6801 } 6802 catch (RecognitionException pe) { 6803 synPredMatched294 = false; 6804 } 6805 rewind(_m294); 6806inputState.guessing--; 6807 } 6808 if ( synPredMatched294 ) { 6809 switchLabeledExpression(); 6810 se_AST = (AST)returnAST; 6811 astFactory.addASTChild(currentAST, returnAST); 6812 } 6813 else { 6814 boolean synPredMatched296 = false; 6815 if (((LA(1)==LITERAL_case||LA(1)==LITERAL_default) && (_tokenSet_75.member(LA(2))))) { 6816 int _m296 = mark(); 6817 synPredMatched296 = true; 6818 inputState.guessing++; 6819 try { 6820 { 6821 switchLabeledBlock(); 6822 } 6823 } 6824 catch (RecognitionException pe) { 6825 synPredMatched296 = false; 6826 } 6827 rewind(_m296); 6828inputState.guessing--; 6829 } 6830 if ( synPredMatched296 ) { 6831 switchLabeledBlock(); 6832 sb_AST = (AST)returnAST; 6833 astFactory.addASTChild(currentAST, returnAST); 6834 } 6835 else { 6836 boolean synPredMatched298 = false; 6837 if (((LA(1)==LITERAL_case||LA(1)==LITERAL_default) && (_tokenSet_75.member(LA(2))))) { 6838 int _m298 = mark(); 6839 synPredMatched298 = true; 6840 inputState.guessing++; 6841 try { 6842 { 6843 switchLabeledThrow(); 6844 } 6845 } 6846 catch (RecognitionException pe) { 6847 synPredMatched298 = false; 6848 } 6849 rewind(_m298); 6850inputState.guessing--; 6851 } 6852 if ( synPredMatched298 ) { 6853 switchLabeledThrow(); 6854 st_AST = (AST)returnAST; 6855 astFactory.addASTChild(currentAST, returnAST); 6856 } 6857 else { 6858 throw new NoViableAltException(LT(1), getFilename()); 6859 } 6860 }} 6861 } 6862 if ( inputState.guessing==0 ) { 6863 switchRule_AST = (AST)currentAST.root; 6864 switchRule_AST = (AST)astFactory.make( (new ASTArray(4)).add(astFactory.create(SWITCH_RULE,"SWITCH_RULE")).add(se_AST).add(sb_AST).add(st_AST)); 6865 currentAST.root = switchRule_AST; 6866 currentAST.child = switchRule_AST!=null &&switchRule_AST.getFirstChild()!=null ? 6867 switchRule_AST.getFirstChild() : switchRule_AST; 6868 currentAST.advanceChildToEnd(); 6869 } 6870 switchRule_AST = (AST)currentAST.root; 6871 returnAST = switchRule_AST; 6872 } 6873 6874 public final void casesGroup() throws RecognitionException, TokenStreamException { 6875 6876 returnAST = null; 6877 ASTPair currentAST = new ASTPair(); 6878 AST casesGroup_AST = null; 6879 6880 { 6881 int _cnt286=0; 6882 _loop286: 6883 do { 6884 if ((LA(1)==LITERAL_case||LA(1)==LITERAL_default) && (_tokenSet_78.member(LA(2)))) { 6885 switchLabel(); 6886 astFactory.addASTChild(currentAST, returnAST); 6887 } 6888 else { 6889 if ( _cnt286>=1 ) { break _loop286; } else {throw new NoViableAltException(LT(1), getFilename());} 6890 } 6891 6892 _cnt286++; 6893 } while (true); 6894 } 6895 { 6896 if ((_tokenSet_44.member(LA(1))) && (_tokenSet_79.member(LA(2)))) { 6897 caseSList(); 6898 astFactory.addASTChild(currentAST, returnAST); 6899 } 6900 else if ((_tokenSet_76.member(LA(1))) && (_tokenSet_77.member(LA(2)))) { 6901 } 6902 else { 6903 throw new NoViableAltException(LT(1), getFilename()); 6904 } 6905 6906 } 6907 if ( inputState.guessing==0 ) { 6908 casesGroup_AST = (AST)currentAST.root; 6909 casesGroup_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(CASE_GROUP,"CASE_GROUP")).add(casesGroup_AST)); 6910 currentAST.root = casesGroup_AST; 6911 currentAST.child = casesGroup_AST!=null &&casesGroup_AST.getFirstChild()!=null ? 6912 casesGroup_AST.getFirstChild() : casesGroup_AST; 6913 currentAST.advanceChildToEnd(); 6914 } 6915 casesGroup_AST = (AST)currentAST.root; 6916 returnAST = casesGroup_AST; 6917 } 6918 6919 public final void switchLabel() throws RecognitionException, TokenStreamException { 6920 6921 returnAST = null; 6922 ASTPair currentAST = new ASTPair(); 6923 AST switchLabel_AST = null; 6924 6925 { 6926 switch ( LA(1)) { 6927 case LITERAL_case: 6928 { 6929 AST tmp153_AST = null; 6930 tmp153_AST = astFactory.create(LT(1)); 6931 astFactory.makeASTRoot(currentAST, tmp153_AST); 6932 match(LITERAL_case); 6933 caseConstant(); 6934 astFactory.addASTChild(currentAST, returnAST); 6935 { 6936 _loop305: 6937 do { 6938 if ((LA(1)==COMMA)) { 6939 AST tmp154_AST = null; 6940 tmp154_AST = astFactory.create(LT(1)); 6941 astFactory.addASTChild(currentAST, tmp154_AST); 6942 match(COMMA); 6943 caseConstant(); 6944 astFactory.addASTChild(currentAST, returnAST); 6945 } 6946 else { 6947 break _loop305; 6948 } 6949 6950 } while (true); 6951 } 6952 break; 6953 } 6954 case LITERAL_default: 6955 { 6956 AST tmp155_AST = null; 6957 tmp155_AST = astFactory.create(LT(1)); 6958 astFactory.makeASTRoot(currentAST, tmp155_AST); 6959 match(LITERAL_default); 6960 break; 6961 } 6962 default: 6963 { 6964 throw new NoViableAltException(LT(1), getFilename()); 6965 } 6966 } 6967 } 6968 { 6969 switch ( LA(1)) { 6970 case COLON: 6971 { 6972 AST tmp156_AST = null; 6973 tmp156_AST = astFactory.create(LT(1)); 6974 astFactory.addASTChild(currentAST, tmp156_AST); 6975 match(COLON); 6976 break; 6977 } 6978 case FINAL: 6979 case ABSTRACT: 6980 case STRICTFP: 6981 case SEMI: 6982 case LITERAL_void: 6983 case LITERAL_boolean: 6984 case LITERAL_byte: 6985 case LITERAL_char: 6986 case LITERAL_short: 6987 case LITERAL_int: 6988 case LITERAL_float: 6989 case LITERAL_long: 6990 case LITERAL_double: 6991 case IDENT: 6992 case LITERAL_private: 6993 case LITERAL_public: 6994 case LITERAL_protected: 6995 case LITERAL_static: 6996 case LITERAL_transient: 6997 case LITERAL_native: 6998 case LITERAL_synchronized: 6999 case LITERAL_volatile: 7000 case LITERAL_class: 7001 case LCURLY: 7002 case RCURLY: 7003 case LPAREN: 7004 case LITERAL_this: 7005 case LITERAL_super: 7006 case LITERAL_if: 7007 case LITERAL_while: 7008 case LITERAL_do: 7009 case LITERAL_break: 7010 case LITERAL_continue: 7011 case LITERAL_return: 7012 case LITERAL_switch: 7013 case LITERAL_throw: 7014 case LITERAL_for: 7015 case LITERAL_case: 7016 case LITERAL_default: 7017 case LITERAL_try: 7018 case PLUS: 7019 case MINUS: 7020 case INC: 7021 case DEC: 7022 case BNOT: 7023 case LNOT: 7024 case LITERAL_true: 7025 case LITERAL_false: 7026 case LITERAL_null: 7027 case LITERAL_new: 7028 case NUM_INT: 7029 case CHAR_LITERAL: 7030 case STRING_LITERAL: 7031 case NUM_FLOAT: 7032 case NUM_LONG: 7033 case NUM_DOUBLE: 7034 case ASSERT: 7035 case AT: 7036 case LAMBDA: 7037 case LITERAL_record: 7038 case TEXT_BLOCK_CONTENT: 7039 case LITERAL_yield: 7040 { 7041 break; 7042 } 7043 default: 7044 { 7045 throw new NoViableAltException(LT(1), getFilename()); 7046 } 7047 } 7048 } 7049 switchLabel_AST = (AST)currentAST.root; 7050 returnAST = switchLabel_AST; 7051 } 7052 7053 public final void caseSList() throws RecognitionException, TokenStreamException { 7054 7055 returnAST = null; 7056 ASTPair currentAST = new ASTPair(); 7057 AST caseSList_AST = null; 7058 7059 { 7060 int _cnt290=0; 7061 _loop290: 7062 do { 7063 if (((_tokenSet_44.member(LA(1))) && (_tokenSet_79.member(LA(2))))&&(LA(1)!=LITERAL_default)) { 7064 statement(); 7065 astFactory.addASTChild(currentAST, returnAST); 7066 } 7067 else { 7068 if ( _cnt290>=1 ) { break _loop290; } else {throw new NoViableAltException(LT(1), getFilename());} 7069 } 7070 7071 _cnt290++; 7072 } while (true); 7073 } 7074 if ( inputState.guessing==0 ) { 7075 caseSList_AST = (AST)currentAST.root; 7076 caseSList_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(SLIST,"SLIST")).add(caseSList_AST)); 7077 currentAST.root = caseSList_AST; 7078 currentAST.child = caseSList_AST!=null &&caseSList_AST.getFirstChild()!=null ? 7079 caseSList_AST.getFirstChild() : caseSList_AST; 7080 currentAST.advanceChildToEnd(); 7081 } 7082 caseSList_AST = (AST)currentAST.root; 7083 returnAST = caseSList_AST; 7084 } 7085 7086 public final void switchLabeledExpression() throws RecognitionException, TokenStreamException { 7087 7088 returnAST = null; 7089 ASTPair currentAST = new ASTPair(); 7090 AST switchLabeledExpression_AST = null; 7091 7092 switchLabel(); 7093 astFactory.addASTChild(currentAST, returnAST); 7094 AST tmp157_AST = null; 7095 tmp157_AST = astFactory.create(LT(1)); 7096 astFactory.addASTChild(currentAST, tmp157_AST); 7097 match(LAMBDA); 7098 expression(); 7099 astFactory.addASTChild(currentAST, returnAST); 7100 AST tmp158_AST = null; 7101 tmp158_AST = astFactory.create(LT(1)); 7102 astFactory.addASTChild(currentAST, tmp158_AST); 7103 match(SEMI); 7104 switchLabeledExpression_AST = (AST)currentAST.root; 7105 returnAST = switchLabeledExpression_AST; 7106 } 7107 7108 public final void switchLabeledBlock() throws RecognitionException, TokenStreamException { 7109 7110 returnAST = null; 7111 ASTPair currentAST = new ASTPair(); 7112 AST switchLabeledBlock_AST = null; 7113 7114 switchLabel(); 7115 astFactory.addASTChild(currentAST, returnAST); 7116 AST tmp159_AST = null; 7117 tmp159_AST = astFactory.create(LT(1)); 7118 astFactory.addASTChild(currentAST, tmp159_AST); 7119 match(LAMBDA); 7120 compoundStatement(); 7121 astFactory.addASTChild(currentAST, returnAST); 7122 switchLabeledBlock_AST = (AST)currentAST.root; 7123 returnAST = switchLabeledBlock_AST; 7124 } 7125 7126 public final void switchLabeledThrow() throws RecognitionException, TokenStreamException { 7127 7128 returnAST = null; 7129 ASTPair currentAST = new ASTPair(); 7130 AST switchLabeledThrow_AST = null; 7131 7132 switchLabel(); 7133 astFactory.addASTChild(currentAST, returnAST); 7134 AST tmp160_AST = null; 7135 tmp160_AST = astFactory.create(LT(1)); 7136 astFactory.addASTChild(currentAST, tmp160_AST); 7137 match(LAMBDA); 7138 throwStatement(); 7139 astFactory.addASTChild(currentAST, returnAST); 7140 switchLabeledThrow_AST = (AST)currentAST.root; 7141 returnAST = switchLabeledThrow_AST; 7142 } 7143 7144 public final void caseConstant() throws RecognitionException, TokenStreamException { 7145 7146 returnAST = null; 7147 ASTPair currentAST = new ASTPair(); 7148 AST caseConstant_AST = null; 7149 7150 conditionalExpression(); 7151 astFactory.addASTChild(currentAST, returnAST); 7152 if ( inputState.guessing==0 ) { 7153 caseConstant_AST = (AST)currentAST.root; 7154 caseConstant_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(EXPR,"EXPR")).add(caseConstant_AST)); 7155 currentAST.root = caseConstant_AST; 7156 currentAST.child = caseConstant_AST!=null &&caseConstant_AST.getFirstChild()!=null ? 7157 caseConstant_AST.getFirstChild() : caseConstant_AST; 7158 currentAST.advanceChildToEnd(); 7159 } 7160 caseConstant_AST = (AST)currentAST.root; 7161 returnAST = caseConstant_AST; 7162 } 7163 7164 public final void expressionList() throws RecognitionException, TokenStreamException { 7165 7166 returnAST = null; 7167 ASTPair currentAST = new ASTPair(); 7168 AST expressionList_AST = null; 7169 7170 expression(); 7171 astFactory.addASTChild(currentAST, returnAST); 7172 { 7173 _loop341: 7174 do { 7175 if ((LA(1)==COMMA)) { 7176 AST tmp161_AST = null; 7177 tmp161_AST = astFactory.create(LT(1)); 7178 astFactory.addASTChild(currentAST, tmp161_AST); 7179 match(COMMA); 7180 expression(); 7181 astFactory.addASTChild(currentAST, returnAST); 7182 } 7183 else { 7184 break _loop341; 7185 } 7186 7187 } while (true); 7188 } 7189 if ( inputState.guessing==0 ) { 7190 expressionList_AST = (AST)currentAST.root; 7191 expressionList_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(ELIST,"ELIST")).add(expressionList_AST)); 7192 currentAST.root = expressionList_AST; 7193 currentAST.child = expressionList_AST!=null &&expressionList_AST.getFirstChild()!=null ? 7194 expressionList_AST.getFirstChild() : expressionList_AST; 7195 currentAST.advanceChildToEnd(); 7196 } 7197 expressionList_AST = (AST)currentAST.root; 7198 returnAST = expressionList_AST; 7199 } 7200 7201 public final void resourceSpecification() throws RecognitionException, TokenStreamException { 7202 7203 returnAST = null; 7204 ASTPair currentAST = new ASTPair(); 7205 AST resourceSpecification_AST = null; 7206 7207 AST tmp162_AST = null; 7208 tmp162_AST = astFactory.create(LT(1)); 7209 astFactory.addASTChild(currentAST, tmp162_AST); 7210 match(LPAREN); 7211 resources(); 7212 astFactory.addASTChild(currentAST, returnAST); 7213 { 7214 switch ( LA(1)) { 7215 case SEMI: 7216 { 7217 AST tmp163_AST = null; 7218 tmp163_AST = astFactory.create(LT(1)); 7219 astFactory.addASTChild(currentAST, tmp163_AST); 7220 match(SEMI); 7221 break; 7222 } 7223 case RPAREN: 7224 { 7225 break; 7226 } 7227 default: 7228 { 7229 throw new NoViableAltException(LT(1), getFilename()); 7230 } 7231 } 7232 } 7233 AST tmp164_AST = null; 7234 tmp164_AST = astFactory.create(LT(1)); 7235 astFactory.addASTChild(currentAST, tmp164_AST); 7236 match(RPAREN); 7237 if ( inputState.guessing==0 ) { 7238 resourceSpecification_AST = (AST)currentAST.root; 7239 resourceSpecification_AST = 7240 (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(RESOURCE_SPECIFICATION,"RESOURCE_SPECIFICATION")).add(resourceSpecification_AST)); 7241 currentAST.root = resourceSpecification_AST; 7242 currentAST.child = resourceSpecification_AST!=null &&resourceSpecification_AST.getFirstChild()!=null ? 7243 resourceSpecification_AST.getFirstChild() : resourceSpecification_AST; 7244 currentAST.advanceChildToEnd(); 7245 } 7246 resourceSpecification_AST = (AST)currentAST.root; 7247 returnAST = resourceSpecification_AST; 7248 } 7249 7250 public final void handler() throws RecognitionException, TokenStreamException { 7251 7252 returnAST = null; 7253 ASTPair currentAST = new ASTPair(); 7254 AST handler_AST = null; 7255 7256 AST tmp165_AST = null; 7257 tmp165_AST = astFactory.create(LT(1)); 7258 astFactory.makeASTRoot(currentAST, tmp165_AST); 7259 match(LITERAL_catch); 7260 AST tmp166_AST = null; 7261 tmp166_AST = astFactory.create(LT(1)); 7262 astFactory.addASTChild(currentAST, tmp166_AST); 7263 match(LPAREN); 7264 catchParameterDeclaration(); 7265 astFactory.addASTChild(currentAST, returnAST); 7266 AST tmp167_AST = null; 7267 tmp167_AST = astFactory.create(LT(1)); 7268 astFactory.addASTChild(currentAST, tmp167_AST); 7269 match(RPAREN); 7270 compoundStatement(); 7271 astFactory.addASTChild(currentAST, returnAST); 7272 handler_AST = (AST)currentAST.root; 7273 returnAST = handler_AST; 7274 } 7275 7276 public final void finallyHandler() throws RecognitionException, TokenStreamException { 7277 7278 returnAST = null; 7279 ASTPair currentAST = new ASTPair(); 7280 AST finallyHandler_AST = null; 7281 7282 AST tmp168_AST = null; 7283 tmp168_AST = astFactory.create(LT(1)); 7284 astFactory.makeASTRoot(currentAST, tmp168_AST); 7285 match(LITERAL_finally); 7286 compoundStatement(); 7287 astFactory.addASTChild(currentAST, returnAST); 7288 finallyHandler_AST = (AST)currentAST.root; 7289 returnAST = finallyHandler_AST; 7290 } 7291 7292 public final void resources() throws RecognitionException, TokenStreamException { 7293 7294 returnAST = null; 7295 ASTPair currentAST = new ASTPair(); 7296 AST resources_AST = null; 7297 7298 resource(); 7299 astFactory.addASTChild(currentAST, returnAST); 7300 { 7301 _loop326: 7302 do { 7303 if ((LA(1)==SEMI) && (_tokenSet_80.member(LA(2)))) { 7304 AST tmp169_AST = null; 7305 tmp169_AST = astFactory.create(LT(1)); 7306 astFactory.addASTChild(currentAST, tmp169_AST); 7307 match(SEMI); 7308 resource(); 7309 astFactory.addASTChild(currentAST, returnAST); 7310 } 7311 else { 7312 break _loop326; 7313 } 7314 7315 } while (true); 7316 } 7317 if ( inputState.guessing==0 ) { 7318 resources_AST = (AST)currentAST.root; 7319 resources_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(RESOURCES,"RESOURCES")).add(resources_AST)); 7320 currentAST.root = resources_AST; 7321 currentAST.child = resources_AST!=null &&resources_AST.getFirstChild()!=null ? 7322 resources_AST.getFirstChild() : resources_AST; 7323 currentAST.advanceChildToEnd(); 7324 } 7325 resources_AST = (AST)currentAST.root; 7326 returnAST = resources_AST; 7327 } 7328 7329 public final void resource() throws RecognitionException, TokenStreamException { 7330 7331 returnAST = null; 7332 ASTPair currentAST = new ASTPair(); 7333 AST resource_AST = null; 7334 7335 boolean synPredMatched329 = false; 7336 if (((_tokenSet_50.member(LA(1))) && (_tokenSet_81.member(LA(2))))) { 7337 int _m329 = mark(); 7338 synPredMatched329 = true; 7339 inputState.guessing++; 7340 try { 7341 { 7342 tryResourceDeclaration(); 7343 } 7344 } 7345 catch (RecognitionException pe) { 7346 synPredMatched329 = false; 7347 } 7348 rewind(_m329); 7349inputState.guessing--; 7350 } 7351 if ( synPredMatched329 ) { 7352 tryResourceDeclaration(); 7353 astFactory.addASTChild(currentAST, returnAST); 7354 resource_AST = (AST)currentAST.root; 7355 } 7356 else if ((_tokenSet_56.member(LA(1))) && (_tokenSet_82.member(LA(2)))) { 7357 { 7358 _loop331: 7359 do { 7360 if ((_tokenSet_56.member(LA(1))) && (_tokenSet_57.member(LA(2)))) { 7361 primaryExpression(); 7362 astFactory.addASTChild(currentAST, returnAST); 7363 AST tmp170_AST = null; 7364 tmp170_AST = astFactory.create(LT(1)); 7365 astFactory.makeASTRoot(currentAST, tmp170_AST); 7366 match(DOT); 7367 } 7368 else { 7369 break _loop331; 7370 } 7371 7372 } while (true); 7373 } 7374 id(); 7375 astFactory.addASTChild(currentAST, returnAST); 7376 if ( inputState.guessing==0 ) { 7377 resource_AST = (AST)currentAST.root; 7378 resource_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(RESOURCE,"RESOURCE")).add(resource_AST)); 7379 currentAST.root = resource_AST; 7380 currentAST.child = resource_AST!=null &&resource_AST.getFirstChild()!=null ? 7381 resource_AST.getFirstChild() : resource_AST; 7382 currentAST.advanceChildToEnd(); 7383 } 7384 resource_AST = (AST)currentAST.root; 7385 } 7386 else { 7387 throw new NoViableAltException(LT(1), getFilename()); 7388 } 7389 7390 returnAST = resource_AST; 7391 } 7392 7393 public final void tryResourceDeclaration() throws RecognitionException, TokenStreamException { 7394 7395 returnAST = null; 7396 ASTPair currentAST = new ASTPair(); 7397 AST tryResourceDeclaration_AST = null; 7398 AST m_AST = null; 7399 AST t_AST = null; 7400 AST v_AST = null; 7401 7402 parameterModifier(); 7403 m_AST = (AST)returnAST; 7404 typeSpec(false); 7405 t_AST = (AST)returnAST; 7406 tryResourceDeclarator((AST) getASTFactory().dupTree(m_AST), 7407 //dupList as this also copies siblings (like TYPE_ARGUMENTS) 7408 (AST) getASTFactory().dupList(t_AST)); 7409 v_AST = (AST)returnAST; 7410 if ( inputState.guessing==0 ) { 7411 tryResourceDeclaration_AST = (AST)currentAST.root; 7412 tryResourceDeclaration_AST = v_AST; 7413 currentAST.root = tryResourceDeclaration_AST; 7414 currentAST.child = tryResourceDeclaration_AST!=null &&tryResourceDeclaration_AST.getFirstChild()!=null ? 7415 tryResourceDeclaration_AST.getFirstChild() : tryResourceDeclaration_AST; 7416 currentAST.advanceChildToEnd(); 7417 } 7418 returnAST = tryResourceDeclaration_AST; 7419 } 7420 7421 public final void tryResourceDeclarator( 7422 AST mods, AST t 7423 ) throws RecognitionException, TokenStreamException { 7424 7425 returnAST = null; 7426 ASTPair currentAST = new ASTPair(); 7427 AST tryResourceDeclarator_AST = null; 7428 AST id_AST = null; 7429 AST d_AST = null; 7430 AST v_AST = null; 7431 7432 id(); 7433 id_AST = (AST)returnAST; 7434 declaratorBrackets(t); 7435 d_AST = (AST)returnAST; 7436 varInitializer(); 7437 v_AST = (AST)returnAST; 7438 if ( inputState.guessing==0 ) { 7439 tryResourceDeclarator_AST = (AST)currentAST.root; 7440 tryResourceDeclarator_AST = (AST)astFactory.make( (new ASTArray(5)).add(astFactory.create(RESOURCE,"RESOURCE")).add(mods).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(d_AST))).add(id_AST).add(v_AST)); 7441 currentAST.root = tryResourceDeclarator_AST; 7442 currentAST.child = tryResourceDeclarator_AST!=null &&tryResourceDeclarator_AST.getFirstChild()!=null ? 7443 tryResourceDeclarator_AST.getFirstChild() : tryResourceDeclarator_AST; 7444 currentAST.advanceChildToEnd(); 7445 } 7446 returnAST = tryResourceDeclarator_AST; 7447 } 7448 7449 public final void lambdaExpression() throws RecognitionException, TokenStreamException { 7450 7451 returnAST = null; 7452 ASTPair currentAST = new ASTPair(); 7453 AST lambdaExpression_AST = null; 7454 7455 lambdaParameters(); 7456 astFactory.addASTChild(currentAST, returnAST); 7457 AST tmp171_AST = null; 7458 tmp171_AST = astFactory.create(LT(1)); 7459 astFactory.makeASTRoot(currentAST, tmp171_AST); 7460 match(LAMBDA); 7461 lambdaBody(); 7462 astFactory.addASTChild(currentAST, returnAST); 7463 lambdaExpression_AST = (AST)currentAST.root; 7464 returnAST = lambdaExpression_AST; 7465 } 7466 7467 public final void assignmentExpression() throws RecognitionException, TokenStreamException { 7468 7469 returnAST = null; 7470 ASTPair currentAST = new ASTPair(); 7471 AST assignmentExpression_AST = null; 7472 7473 conditionalExpression(); 7474 astFactory.addASTChild(currentAST, returnAST); 7475 { 7476 switch ( LA(1)) { 7477 case ASSIGN: 7478 case PLUS_ASSIGN: 7479 case MINUS_ASSIGN: 7480 case STAR_ASSIGN: 7481 case DIV_ASSIGN: 7482 case MOD_ASSIGN: 7483 case SR_ASSIGN: 7484 case BSR_ASSIGN: 7485 case SL_ASSIGN: 7486 case BAND_ASSIGN: 7487 case BXOR_ASSIGN: 7488 case BOR_ASSIGN: 7489 { 7490 { 7491 switch ( LA(1)) { 7492 case ASSIGN: 7493 { 7494 AST tmp172_AST = null; 7495 tmp172_AST = astFactory.create(LT(1)); 7496 astFactory.makeASTRoot(currentAST, tmp172_AST); 7497 match(ASSIGN); 7498 break; 7499 } 7500 case PLUS_ASSIGN: 7501 { 7502 AST tmp173_AST = null; 7503 tmp173_AST = astFactory.create(LT(1)); 7504 astFactory.makeASTRoot(currentAST, tmp173_AST); 7505 match(PLUS_ASSIGN); 7506 break; 7507 } 7508 case MINUS_ASSIGN: 7509 { 7510 AST tmp174_AST = null; 7511 tmp174_AST = astFactory.create(LT(1)); 7512 astFactory.makeASTRoot(currentAST, tmp174_AST); 7513 match(MINUS_ASSIGN); 7514 break; 7515 } 7516 case STAR_ASSIGN: 7517 { 7518 AST tmp175_AST = null; 7519 tmp175_AST = astFactory.create(LT(1)); 7520 astFactory.makeASTRoot(currentAST, tmp175_AST); 7521 match(STAR_ASSIGN); 7522 break; 7523 } 7524 case DIV_ASSIGN: 7525 { 7526 AST tmp176_AST = null; 7527 tmp176_AST = astFactory.create(LT(1)); 7528 astFactory.makeASTRoot(currentAST, tmp176_AST); 7529 match(DIV_ASSIGN); 7530 break; 7531 } 7532 case MOD_ASSIGN: 7533 { 7534 AST tmp177_AST = null; 7535 tmp177_AST = astFactory.create(LT(1)); 7536 astFactory.makeASTRoot(currentAST, tmp177_AST); 7537 match(MOD_ASSIGN); 7538 break; 7539 } 7540 case SR_ASSIGN: 7541 { 7542 AST tmp178_AST = null; 7543 tmp178_AST = astFactory.create(LT(1)); 7544 astFactory.makeASTRoot(currentAST, tmp178_AST); 7545 match(SR_ASSIGN); 7546 break; 7547 } 7548 case BSR_ASSIGN: 7549 { 7550 AST tmp179_AST = null; 7551 tmp179_AST = astFactory.create(LT(1)); 7552 astFactory.makeASTRoot(currentAST, tmp179_AST); 7553 match(BSR_ASSIGN); 7554 break; 7555 } 7556 case SL_ASSIGN: 7557 { 7558 AST tmp180_AST = null; 7559 tmp180_AST = astFactory.create(LT(1)); 7560 astFactory.makeASTRoot(currentAST, tmp180_AST); 7561 match(SL_ASSIGN); 7562 break; 7563 } 7564 case BAND_ASSIGN: 7565 { 7566 AST tmp181_AST = null; 7567 tmp181_AST = astFactory.create(LT(1)); 7568 astFactory.makeASTRoot(currentAST, tmp181_AST); 7569 match(BAND_ASSIGN); 7570 break; 7571 } 7572 case BXOR_ASSIGN: 7573 { 7574 AST tmp182_AST = null; 7575 tmp182_AST = astFactory.create(LT(1)); 7576 astFactory.makeASTRoot(currentAST, tmp182_AST); 7577 match(BXOR_ASSIGN); 7578 break; 7579 } 7580 case BOR_ASSIGN: 7581 { 7582 AST tmp183_AST = null; 7583 tmp183_AST = astFactory.create(LT(1)); 7584 astFactory.makeASTRoot(currentAST, tmp183_AST); 7585 match(BOR_ASSIGN); 7586 break; 7587 } 7588 default: 7589 { 7590 throw new NoViableAltException(LT(1), getFilename()); 7591 } 7592 } 7593 } 7594 { 7595 boolean synPredMatched347 = false; 7596 if (((_tokenSet_20.member(LA(1))) && (_tokenSet_21.member(LA(2))))) { 7597 int _m347 = mark(); 7598 synPredMatched347 = true; 7599 inputState.guessing++; 7600 try { 7601 { 7602 lambdaExpression(); 7603 } 7604 } 7605 catch (RecognitionException pe) { 7606 synPredMatched347 = false; 7607 } 7608 rewind(_m347); 7609inputState.guessing--; 7610 } 7611 if ( synPredMatched347 ) { 7612 lambdaExpression(); 7613 astFactory.addASTChild(currentAST, returnAST); 7614 } 7615 else if ((_tokenSet_17.member(LA(1))) && (_tokenSet_61.member(LA(2)))) { 7616 assignmentExpression(); 7617 astFactory.addASTChild(currentAST, returnAST); 7618 } 7619 else { 7620 throw new NoViableAltException(LT(1), getFilename()); 7621 } 7622 7623 } 7624 break; 7625 } 7626 case FINAL: 7627 case ABSTRACT: 7628 case STRICTFP: 7629 case SEMI: 7630 case RBRACK: 7631 case LITERAL_void: 7632 case LITERAL_boolean: 7633 case LITERAL_byte: 7634 case LITERAL_char: 7635 case LITERAL_short: 7636 case LITERAL_int: 7637 case LITERAL_float: 7638 case LITERAL_long: 7639 case LITERAL_double: 7640 case IDENT: 7641 case STAR: 7642 case LITERAL_private: 7643 case LITERAL_public: 7644 case LITERAL_protected: 7645 case LITERAL_static: 7646 case LITERAL_transient: 7647 case LITERAL_native: 7648 case LITERAL_synchronized: 7649 case LITERAL_volatile: 7650 case LITERAL_class: 7651 case LITERAL_interface: 7652 case LCURLY: 7653 case RCURLY: 7654 case COMMA: 7655 case LPAREN: 7656 case RPAREN: 7657 case LITERAL_this: 7658 case LITERAL_super: 7659 case COLON: 7660 case LITERAL_if: 7661 case LITERAL_while: 7662 case LITERAL_do: 7663 case LITERAL_break: 7664 case LITERAL_continue: 7665 case LITERAL_return: 7666 case LITERAL_switch: 7667 case LITERAL_throw: 7668 case LITERAL_for: 7669 case LITERAL_else: 7670 case LITERAL_case: 7671 case LITERAL_default: 7672 case LITERAL_try: 7673 case LT: 7674 case GT: 7675 case LE: 7676 case GE: 7677 case LITERAL_instanceof: 7678 case SL: 7679 case SR: 7680 case BSR: 7681 case PLUS: 7682 case MINUS: 7683 case DIV: 7684 case MOD: 7685 case INC: 7686 case DEC: 7687 case BNOT: 7688 case LNOT: 7689 case LITERAL_true: 7690 case LITERAL_false: 7691 case LITERAL_null: 7692 case LITERAL_new: 7693 case NUM_INT: 7694 case CHAR_LITERAL: 7695 case STRING_LITERAL: 7696 case NUM_FLOAT: 7697 case NUM_LONG: 7698 case NUM_DOUBLE: 7699 case ASSERT: 7700 case ENUM: 7701 case AT: 7702 case LITERAL_record: 7703 case TEXT_BLOCK_CONTENT: 7704 case LITERAL_yield: 7705 { 7706 break; 7707 } 7708 default: 7709 { 7710 throw new NoViableAltException(LT(1), getFilename()); 7711 } 7712 } 7713 } 7714 assignmentExpression_AST = (AST)currentAST.root; 7715 returnAST = assignmentExpression_AST; 7716 } 7717 7718 public final void logicalOrExpression() throws RecognitionException, TokenStreamException { 7719 7720 returnAST = null; 7721 ASTPair currentAST = new ASTPair(); 7722 AST logicalOrExpression_AST = null; 7723 7724 logicalAndExpression(); 7725 astFactory.addASTChild(currentAST, returnAST); 7726 { 7727 _loop358: 7728 do { 7729 if ((LA(1)==LOR)) { 7730 AST tmp184_AST = null; 7731 tmp184_AST = astFactory.create(LT(1)); 7732 astFactory.makeASTRoot(currentAST, tmp184_AST); 7733 match(LOR); 7734 logicalAndExpression(); 7735 astFactory.addASTChild(currentAST, returnAST); 7736 } 7737 else { 7738 break _loop358; 7739 } 7740 7741 } while (true); 7742 } 7743 logicalOrExpression_AST = (AST)currentAST.root; 7744 returnAST = logicalOrExpression_AST; 7745 } 7746 7747 public final void logicalAndExpression() throws RecognitionException, TokenStreamException { 7748 7749 returnAST = null; 7750 ASTPair currentAST = new ASTPair(); 7751 AST logicalAndExpression_AST = null; 7752 7753 inclusiveOrExpression(); 7754 astFactory.addASTChild(currentAST, returnAST); 7755 { 7756 _loop361: 7757 do { 7758 if ((LA(1)==LAND)) { 7759 AST tmp185_AST = null; 7760 tmp185_AST = astFactory.create(LT(1)); 7761 astFactory.makeASTRoot(currentAST, tmp185_AST); 7762 match(LAND); 7763 inclusiveOrExpression(); 7764 astFactory.addASTChild(currentAST, returnAST); 7765 } 7766 else { 7767 break _loop361; 7768 } 7769 7770 } while (true); 7771 } 7772 logicalAndExpression_AST = (AST)currentAST.root; 7773 returnAST = logicalAndExpression_AST; 7774 } 7775 7776 public final void inclusiveOrExpression() throws RecognitionException, TokenStreamException { 7777 7778 returnAST = null; 7779 ASTPair currentAST = new ASTPair(); 7780 AST inclusiveOrExpression_AST = null; 7781 7782 exclusiveOrExpression(); 7783 astFactory.addASTChild(currentAST, returnAST); 7784 { 7785 _loop364: 7786 do { 7787 if ((LA(1)==BOR)) { 7788 AST tmp186_AST = null; 7789 tmp186_AST = astFactory.create(LT(1)); 7790 astFactory.makeASTRoot(currentAST, tmp186_AST); 7791 match(BOR); 7792 exclusiveOrExpression(); 7793 astFactory.addASTChild(currentAST, returnAST); 7794 } 7795 else { 7796 break _loop364; 7797 } 7798 7799 } while (true); 7800 } 7801 inclusiveOrExpression_AST = (AST)currentAST.root; 7802 returnAST = inclusiveOrExpression_AST; 7803 } 7804 7805 public final void exclusiveOrExpression() throws RecognitionException, TokenStreamException { 7806 7807 returnAST = null; 7808 ASTPair currentAST = new ASTPair(); 7809 AST exclusiveOrExpression_AST = null; 7810 7811 andExpression(); 7812 astFactory.addASTChild(currentAST, returnAST); 7813 { 7814 _loop367: 7815 do { 7816 if ((LA(1)==BXOR)) { 7817 AST tmp187_AST = null; 7818 tmp187_AST = astFactory.create(LT(1)); 7819 astFactory.makeASTRoot(currentAST, tmp187_AST); 7820 match(BXOR); 7821 andExpression(); 7822 astFactory.addASTChild(currentAST, returnAST); 7823 } 7824 else { 7825 break _loop367; 7826 } 7827 7828 } while (true); 7829 } 7830 exclusiveOrExpression_AST = (AST)currentAST.root; 7831 returnAST = exclusiveOrExpression_AST; 7832 } 7833 7834 public final void andExpression() throws RecognitionException, TokenStreamException { 7835 7836 returnAST = null; 7837 ASTPair currentAST = new ASTPair(); 7838 AST andExpression_AST = null; 7839 7840 equalityExpression(); 7841 astFactory.addASTChild(currentAST, returnAST); 7842 { 7843 _loop370: 7844 do { 7845 if ((LA(1)==BAND)) { 7846 AST tmp188_AST = null; 7847 tmp188_AST = astFactory.create(LT(1)); 7848 astFactory.makeASTRoot(currentAST, tmp188_AST); 7849 match(BAND); 7850 equalityExpression(); 7851 astFactory.addASTChild(currentAST, returnAST); 7852 } 7853 else { 7854 break _loop370; 7855 } 7856 7857 } while (true); 7858 } 7859 andExpression_AST = (AST)currentAST.root; 7860 returnAST = andExpression_AST; 7861 } 7862 7863 public final void equalityExpression() throws RecognitionException, TokenStreamException { 7864 7865 returnAST = null; 7866 ASTPair currentAST = new ASTPair(); 7867 AST equalityExpression_AST = null; 7868 7869 relationalExpression(); 7870 astFactory.addASTChild(currentAST, returnAST); 7871 { 7872 _loop374: 7873 do { 7874 if ((LA(1)==NOT_EQUAL||LA(1)==EQUAL)) { 7875 { 7876 switch ( LA(1)) { 7877 case NOT_EQUAL: 7878 { 7879 AST tmp189_AST = null; 7880 tmp189_AST = astFactory.create(LT(1)); 7881 astFactory.makeASTRoot(currentAST, tmp189_AST); 7882 match(NOT_EQUAL); 7883 break; 7884 } 7885 case EQUAL: 7886 { 7887 AST tmp190_AST = null; 7888 tmp190_AST = astFactory.create(LT(1)); 7889 astFactory.makeASTRoot(currentAST, tmp190_AST); 7890 match(EQUAL); 7891 break; 7892 } 7893 default: 7894 { 7895 throw new NoViableAltException(LT(1), getFilename()); 7896 } 7897 } 7898 } 7899 relationalExpression(); 7900 astFactory.addASTChild(currentAST, returnAST); 7901 } 7902 else { 7903 break _loop374; 7904 } 7905 7906 } while (true); 7907 } 7908 equalityExpression_AST = (AST)currentAST.root; 7909 returnAST = equalityExpression_AST; 7910 } 7911 7912 public final void relationalExpression() throws RecognitionException, TokenStreamException { 7913 7914 returnAST = null; 7915 ASTPair currentAST = new ASTPair(); 7916 AST relationalExpression_AST = null; 7917 7918 shiftExpression(); 7919 astFactory.addASTChild(currentAST, returnAST); 7920 { 7921 if ((LA(1)==LITERAL_instanceof) && (_tokenSet_13.member(LA(2)))) { 7922 AST tmp191_AST = null; 7923 tmp191_AST = astFactory.create(LT(1)); 7924 astFactory.makeASTRoot(currentAST, tmp191_AST); 7925 match(LITERAL_instanceof); 7926 { 7927 boolean synPredMatched379 = false; 7928 if (((_tokenSet_13.member(LA(1))) && (_tokenSet_28.member(LA(2))))) { 7929 int _m379 = mark(); 7930 synPredMatched379 = true; 7931 inputState.guessing++; 7932 try { 7933 { 7934 typeSpec(true); 7935 match(IDENT); 7936 } 7937 } 7938 catch (RecognitionException pe) { 7939 synPredMatched379 = false; 7940 } 7941 rewind(_m379); 7942inputState.guessing--; 7943 } 7944 if ( synPredMatched379 ) { 7945 patternDefinition(); 7946 astFactory.addASTChild(currentAST, returnAST); 7947 } 7948 else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_83.member(LA(2)))) { 7949 instanceofTypeSpec(); 7950 astFactory.addASTChild(currentAST, returnAST); 7951 } 7952 else { 7953 throw new NoViableAltException(LT(1), getFilename()); 7954 } 7955 7956 } 7957 } 7958 else if ((_tokenSet_77.member(LA(1))) && (_tokenSet_60.member(LA(2)))) { 7959 } 7960 else { 7961 throw new NoViableAltException(LT(1), getFilename()); 7962 } 7963 7964 } 7965 { 7966 { 7967 _loop383: 7968 do { 7969 if (((LA(1) >= LT && LA(1) <= GE)) && (_tokenSet_17.member(LA(2)))) { 7970 { 7971 switch ( LA(1)) { 7972 case LT: 7973 { 7974 AST tmp192_AST = null; 7975 tmp192_AST = astFactory.create(LT(1)); 7976 astFactory.makeASTRoot(currentAST, tmp192_AST); 7977 match(LT); 7978 break; 7979 } 7980 case GT: 7981 { 7982 AST tmp193_AST = null; 7983 tmp193_AST = astFactory.create(LT(1)); 7984 astFactory.makeASTRoot(currentAST, tmp193_AST); 7985 match(GT); 7986 break; 7987 } 7988 case LE: 7989 { 7990 AST tmp194_AST = null; 7991 tmp194_AST = astFactory.create(LT(1)); 7992 astFactory.makeASTRoot(currentAST, tmp194_AST); 7993 match(LE); 7994 break; 7995 } 7996 case GE: 7997 { 7998 AST tmp195_AST = null; 7999 tmp195_AST = astFactory.create(LT(1)); 8000 astFactory.makeASTRoot(currentAST, tmp195_AST); 8001 match(GE); 8002 break; 8003 } 8004 default: 8005 { 8006 throw new NoViableAltException(LT(1), getFilename()); 8007 } 8008 } 8009 } 8010 shiftExpression(); 8011 astFactory.addASTChild(currentAST, returnAST); 8012 } 8013 else { 8014 break _loop383; 8015 } 8016 8017 } while (true); 8018 } 8019 } 8020 relationalExpression_AST = (AST)currentAST.root; 8021 returnAST = relationalExpression_AST; 8022 } 8023 8024 public final void shiftExpression() throws RecognitionException, TokenStreamException { 8025 8026 returnAST = null; 8027 ASTPair currentAST = new ASTPair(); 8028 AST shiftExpression_AST = null; 8029 8030 additiveExpression(); 8031 astFactory.addASTChild(currentAST, returnAST); 8032 { 8033 _loop390: 8034 do { 8035 if (((LA(1) >= SL && LA(1) <= BSR)) && (_tokenSet_17.member(LA(2)))) { 8036 { 8037 switch ( LA(1)) { 8038 case SL: 8039 { 8040 AST tmp196_AST = null; 8041 tmp196_AST = astFactory.create(LT(1)); 8042 astFactory.makeASTRoot(currentAST, tmp196_AST); 8043 match(SL); 8044 break; 8045 } 8046 case SR: 8047 { 8048 AST tmp197_AST = null; 8049 tmp197_AST = astFactory.create(LT(1)); 8050 astFactory.makeASTRoot(currentAST, tmp197_AST); 8051 match(SR); 8052 break; 8053 } 8054 case BSR: 8055 { 8056 AST tmp198_AST = null; 8057 tmp198_AST = astFactory.create(LT(1)); 8058 astFactory.makeASTRoot(currentAST, tmp198_AST); 8059 match(BSR); 8060 break; 8061 } 8062 default: 8063 { 8064 throw new NoViableAltException(LT(1), getFilename()); 8065 } 8066 } 8067 } 8068 additiveExpression(); 8069 astFactory.addASTChild(currentAST, returnAST); 8070 } 8071 else { 8072 break _loop390; 8073 } 8074 8075 } while (true); 8076 } 8077 shiftExpression_AST = (AST)currentAST.root; 8078 returnAST = shiftExpression_AST; 8079 } 8080 8081 public final void patternDefinition() throws RecognitionException, TokenStreamException { 8082 8083 returnAST = null; 8084 ASTPair currentAST = new ASTPair(); 8085 AST patternDefinition_AST = null; 8086 AST v_AST = null; 8087 8088 patternVariableDefinition(); 8089 v_AST = (AST)returnAST; 8090 if ( inputState.guessing==0 ) { 8091 patternDefinition_AST = (AST)currentAST.root; 8092 patternDefinition_AST = v_AST; 8093 currentAST.root = patternDefinition_AST; 8094 currentAST.child = patternDefinition_AST!=null &&patternDefinition_AST.getFirstChild()!=null ? 8095 patternDefinition_AST.getFirstChild() : patternDefinition_AST; 8096 currentAST.advanceChildToEnd(); 8097 } 8098 returnAST = patternDefinition_AST; 8099 } 8100 8101 public final void instanceofTypeSpec() throws RecognitionException, TokenStreamException { 8102 8103 returnAST = null; 8104 ASTPair currentAST = new ASTPair(); 8105 AST instanceofTypeSpec_AST = null; 8106 AST t_AST = null; 8107 8108 typeSpec(true); 8109 t_AST = (AST)returnAST; 8110 if ( inputState.guessing==0 ) { 8111 instanceofTypeSpec_AST = (AST)currentAST.root; 8112 instanceofTypeSpec_AST = t_AST; 8113 currentAST.root = instanceofTypeSpec_AST; 8114 currentAST.child = instanceofTypeSpec_AST!=null &&instanceofTypeSpec_AST.getFirstChild()!=null ? 8115 instanceofTypeSpec_AST.getFirstChild() : instanceofTypeSpec_AST; 8116 currentAST.advanceChildToEnd(); 8117 } 8118 returnAST = instanceofTypeSpec_AST; 8119 } 8120 8121 public final void patternVariableDefinition() throws RecognitionException, TokenStreamException { 8122 8123 returnAST = null; 8124 ASTPair currentAST = new ASTPair(); 8125 AST patternVariableDefinition_AST = null; 8126 AST t_AST = null; 8127 Token i = null; 8128 AST i_AST = null; 8129 8130 typeSpec(true); 8131 t_AST = (AST)returnAST; 8132 i = LT(1); 8133 i_AST = astFactory.create(i); 8134 match(IDENT); 8135 if ( inputState.guessing==0 ) { 8136 patternVariableDefinition_AST = (AST)currentAST.root; 8137 patternVariableDefinition_AST = (AST)astFactory.make( (new ASTArray(3)).add(astFactory.create(PATTERN_VARIABLE_DEF,"PATTERN_VARIABLE_DEF")).add(t_AST).add(i_AST)); 8138 currentAST.root = patternVariableDefinition_AST; 8139 currentAST.child = patternVariableDefinition_AST!=null &&patternVariableDefinition_AST.getFirstChild()!=null ? 8140 patternVariableDefinition_AST.getFirstChild() : patternVariableDefinition_AST; 8141 currentAST.advanceChildToEnd(); 8142 } 8143 returnAST = patternVariableDefinition_AST; 8144 } 8145 8146 public final void additiveExpression() throws RecognitionException, TokenStreamException { 8147 8148 returnAST = null; 8149 ASTPair currentAST = new ASTPair(); 8150 AST additiveExpression_AST = null; 8151 8152 multiplicativeExpression(); 8153 astFactory.addASTChild(currentAST, returnAST); 8154 { 8155 _loop394: 8156 do { 8157 if ((LA(1)==PLUS||LA(1)==MINUS) && (_tokenSet_17.member(LA(2)))) { 8158 { 8159 switch ( LA(1)) { 8160 case PLUS: 8161 { 8162 AST tmp199_AST = null; 8163 tmp199_AST = astFactory.create(LT(1)); 8164 astFactory.makeASTRoot(currentAST, tmp199_AST); 8165 match(PLUS); 8166 break; 8167 } 8168 case MINUS: 8169 { 8170 AST tmp200_AST = null; 8171 tmp200_AST = astFactory.create(LT(1)); 8172 astFactory.makeASTRoot(currentAST, tmp200_AST); 8173 match(MINUS); 8174 break; 8175 } 8176 default: 8177 { 8178 throw new NoViableAltException(LT(1), getFilename()); 8179 } 8180 } 8181 } 8182 multiplicativeExpression(); 8183 astFactory.addASTChild(currentAST, returnAST); 8184 } 8185 else { 8186 break _loop394; 8187 } 8188 8189 } while (true); 8190 } 8191 additiveExpression_AST = (AST)currentAST.root; 8192 returnAST = additiveExpression_AST; 8193 } 8194 8195 public final void multiplicativeExpression() throws RecognitionException, TokenStreamException { 8196 8197 returnAST = null; 8198 ASTPair currentAST = new ASTPair(); 8199 AST multiplicativeExpression_AST = null; 8200 8201 unaryExpression(); 8202 astFactory.addASTChild(currentAST, returnAST); 8203 { 8204 _loop398: 8205 do { 8206 if ((_tokenSet_84.member(LA(1))) && (_tokenSet_17.member(LA(2)))) { 8207 { 8208 switch ( LA(1)) { 8209 case STAR: 8210 { 8211 AST tmp201_AST = null; 8212 tmp201_AST = astFactory.create(LT(1)); 8213 astFactory.makeASTRoot(currentAST, tmp201_AST); 8214 match(STAR); 8215 break; 8216 } 8217 case DIV: 8218 { 8219 AST tmp202_AST = null; 8220 tmp202_AST = astFactory.create(LT(1)); 8221 astFactory.makeASTRoot(currentAST, tmp202_AST); 8222 match(DIV); 8223 break; 8224 } 8225 case MOD: 8226 { 8227 AST tmp203_AST = null; 8228 tmp203_AST = astFactory.create(LT(1)); 8229 astFactory.makeASTRoot(currentAST, tmp203_AST); 8230 match(MOD); 8231 break; 8232 } 8233 default: 8234 { 8235 throw new NoViableAltException(LT(1), getFilename()); 8236 } 8237 } 8238 } 8239 unaryExpression(); 8240 astFactory.addASTChild(currentAST, returnAST); 8241 } 8242 else { 8243 break _loop398; 8244 } 8245 8246 } while (true); 8247 } 8248 multiplicativeExpression_AST = (AST)currentAST.root; 8249 returnAST = multiplicativeExpression_AST; 8250 } 8251 8252 public final void unaryExpression() throws RecognitionException, TokenStreamException { 8253 8254 returnAST = null; 8255 ASTPair currentAST = new ASTPair(); 8256 AST unaryExpression_AST = null; 8257 8258 switch ( LA(1)) { 8259 case INC: 8260 { 8261 AST tmp204_AST = null; 8262 tmp204_AST = astFactory.create(LT(1)); 8263 astFactory.makeASTRoot(currentAST, tmp204_AST); 8264 match(INC); 8265 unaryExpression(); 8266 astFactory.addASTChild(currentAST, returnAST); 8267 unaryExpression_AST = (AST)currentAST.root; 8268 break; 8269 } 8270 case DEC: 8271 { 8272 AST tmp205_AST = null; 8273 tmp205_AST = astFactory.create(LT(1)); 8274 astFactory.makeASTRoot(currentAST, tmp205_AST); 8275 match(DEC); 8276 unaryExpression(); 8277 astFactory.addASTChild(currentAST, returnAST); 8278 unaryExpression_AST = (AST)currentAST.root; 8279 break; 8280 } 8281 case MINUS: 8282 { 8283 AST tmp206_AST = null; 8284 tmp206_AST = astFactory.create(LT(1)); 8285 astFactory.makeASTRoot(currentAST, tmp206_AST); 8286 match(MINUS); 8287 if ( inputState.guessing==0 ) { 8288 tmp206_AST.setType(UNARY_MINUS); 8289 } 8290 unaryExpression(); 8291 astFactory.addASTChild(currentAST, returnAST); 8292 unaryExpression_AST = (AST)currentAST.root; 8293 break; 8294 } 8295 case PLUS: 8296 { 8297 AST tmp207_AST = null; 8298 tmp207_AST = astFactory.create(LT(1)); 8299 astFactory.makeASTRoot(currentAST, tmp207_AST); 8300 match(PLUS); 8301 if ( inputState.guessing==0 ) { 8302 tmp207_AST.setType(UNARY_PLUS); 8303 } 8304 unaryExpression(); 8305 astFactory.addASTChild(currentAST, returnAST); 8306 unaryExpression_AST = (AST)currentAST.root; 8307 break; 8308 } 8309 case LITERAL_void: 8310 case LITERAL_boolean: 8311 case LITERAL_byte: 8312 case LITERAL_char: 8313 case LITERAL_short: 8314 case LITERAL_int: 8315 case LITERAL_float: 8316 case LITERAL_long: 8317 case LITERAL_double: 8318 case IDENT: 8319 case LPAREN: 8320 case LITERAL_this: 8321 case LITERAL_super: 8322 case LITERAL_switch: 8323 case BNOT: 8324 case LNOT: 8325 case LITERAL_true: 8326 case LITERAL_false: 8327 case LITERAL_null: 8328 case LITERAL_new: 8329 case NUM_INT: 8330 case CHAR_LITERAL: 8331 case STRING_LITERAL: 8332 case NUM_FLOAT: 8333 case NUM_LONG: 8334 case NUM_DOUBLE: 8335 case AT: 8336 case LITERAL_record: 8337 case TEXT_BLOCK_CONTENT: 8338 case LITERAL_yield: 8339 { 8340 unaryExpressionNotPlusMinus(); 8341 astFactory.addASTChild(currentAST, returnAST); 8342 unaryExpression_AST = (AST)currentAST.root; 8343 break; 8344 } 8345 default: 8346 { 8347 throw new NoViableAltException(LT(1), getFilename()); 8348 } 8349 } 8350 returnAST = unaryExpression_AST; 8351 } 8352 8353 public final void unaryExpressionNotPlusMinus() throws RecognitionException, TokenStreamException { 8354 8355 returnAST = null; 8356 ASTPair currentAST = new ASTPair(); 8357 AST unaryExpressionNotPlusMinus_AST = null; 8358 8359 switch ( LA(1)) { 8360 case BNOT: 8361 { 8362 AST tmp208_AST = null; 8363 tmp208_AST = astFactory.create(LT(1)); 8364 astFactory.makeASTRoot(currentAST, tmp208_AST); 8365 match(BNOT); 8366 unaryExpression(); 8367 astFactory.addASTChild(currentAST, returnAST); 8368 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root; 8369 break; 8370 } 8371 case LNOT: 8372 { 8373 AST tmp209_AST = null; 8374 tmp209_AST = astFactory.create(LT(1)); 8375 astFactory.makeASTRoot(currentAST, tmp209_AST); 8376 match(LNOT); 8377 unaryExpression(); 8378 astFactory.addASTChild(currentAST, returnAST); 8379 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root; 8380 break; 8381 } 8382 case LITERAL_void: 8383 case LITERAL_boolean: 8384 case LITERAL_byte: 8385 case LITERAL_char: 8386 case LITERAL_short: 8387 case LITERAL_int: 8388 case LITERAL_float: 8389 case LITERAL_long: 8390 case LITERAL_double: 8391 case IDENT: 8392 case LPAREN: 8393 case LITERAL_this: 8394 case LITERAL_super: 8395 case LITERAL_true: 8396 case LITERAL_false: 8397 case LITERAL_null: 8398 case LITERAL_new: 8399 case NUM_INT: 8400 case CHAR_LITERAL: 8401 case STRING_LITERAL: 8402 case NUM_FLOAT: 8403 case NUM_LONG: 8404 case NUM_DOUBLE: 8405 case AT: 8406 case LITERAL_record: 8407 case TEXT_BLOCK_CONTENT: 8408 case LITERAL_yield: 8409 { 8410 castExpression(); 8411 astFactory.addASTChild(currentAST, returnAST); 8412 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root; 8413 break; 8414 } 8415 case LITERAL_switch: 8416 { 8417 switchExpression(); 8418 astFactory.addASTChild(currentAST, returnAST); 8419 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root; 8420 break; 8421 } 8422 default: 8423 { 8424 throw new NoViableAltException(LT(1), getFilename()); 8425 } 8426 } 8427 returnAST = unaryExpressionNotPlusMinus_AST; 8428 } 8429 8430 public final void castExpression() throws RecognitionException, TokenStreamException { 8431 8432 returnAST = null; 8433 ASTPair currentAST = new ASTPair(); 8434 AST castExpression_AST = null; 8435 Token lpb = null; 8436 AST lpb_AST = null; 8437 Token lpl = null; 8438 AST lpl_AST = null; 8439 Token lp = null; 8440 AST lp_AST = null; 8441 8442 { 8443 boolean synPredMatched404 = false; 8444 if (((LA(1)==LPAREN) && ((LA(2) >= LITERAL_void && LA(2) <= LITERAL_double)))) { 8445 int _m404 = mark(); 8446 synPredMatched404 = true; 8447 inputState.guessing++; 8448 try { 8449 { 8450 match(LPAREN); 8451 builtInTypeSpec(true); 8452 match(RPAREN); 8453 unaryExpression(); 8454 } 8455 } 8456 catch (RecognitionException pe) { 8457 synPredMatched404 = false; 8458 } 8459 rewind(_m404); 8460inputState.guessing--; 8461 } 8462 if ( synPredMatched404 ) { 8463 lpb = LT(1); 8464 lpb_AST = astFactory.create(lpb); 8465 astFactory.makeASTRoot(currentAST, lpb_AST); 8466 match(LPAREN); 8467 if ( inputState.guessing==0 ) { 8468 lpb_AST.setType(TYPECAST); 8469 } 8470 builtInTypeSpec(true); 8471 astFactory.addASTChild(currentAST, returnAST); 8472 AST tmp210_AST = null; 8473 tmp210_AST = astFactory.create(LT(1)); 8474 astFactory.addASTChild(currentAST, tmp210_AST); 8475 match(RPAREN); 8476 unaryExpression(); 8477 astFactory.addASTChild(currentAST, returnAST); 8478 } 8479 else { 8480 boolean synPredMatched406 = false; 8481 if (((LA(1)==LPAREN) && (_tokenSet_8.member(LA(2))))) { 8482 int _m406 = mark(); 8483 synPredMatched406 = true; 8484 inputState.guessing++; 8485 try { 8486 { 8487 match(LPAREN); 8488 typeCastParameters(); 8489 match(RPAREN); 8490 lambdaExpression(); 8491 } 8492 } 8493 catch (RecognitionException pe) { 8494 synPredMatched406 = false; 8495 } 8496 rewind(_m406); 8497inputState.guessing--; 8498 } 8499 if ( synPredMatched406 ) { 8500 lpl = LT(1); 8501 lpl_AST = astFactory.create(lpl); 8502 astFactory.makeASTRoot(currentAST, lpl_AST); 8503 match(LPAREN); 8504 if ( inputState.guessing==0 ) { 8505 lpl_AST.setType(TYPECAST); 8506 } 8507 typeCastParameters(); 8508 astFactory.addASTChild(currentAST, returnAST); 8509 AST tmp211_AST = null; 8510 tmp211_AST = astFactory.create(LT(1)); 8511 astFactory.addASTChild(currentAST, tmp211_AST); 8512 match(RPAREN); 8513 lambdaExpression(); 8514 astFactory.addASTChild(currentAST, returnAST); 8515 } 8516 else { 8517 boolean synPredMatched408 = false; 8518 if (((LA(1)==LPAREN) && (_tokenSet_8.member(LA(2))))) { 8519 int _m408 = mark(); 8520 synPredMatched408 = true; 8521 inputState.guessing++; 8522 try { 8523 { 8524 match(LPAREN); 8525 typeCastParameters(); 8526 match(RPAREN); 8527 unaryExpressionNotPlusMinus(); 8528 } 8529 } 8530 catch (RecognitionException pe) { 8531 synPredMatched408 = false; 8532 } 8533 rewind(_m408); 8534inputState.guessing--; 8535 } 8536 if ( synPredMatched408 ) { 8537 lp = LT(1); 8538 lp_AST = astFactory.create(lp); 8539 astFactory.makeASTRoot(currentAST, lp_AST); 8540 match(LPAREN); 8541 if ( inputState.guessing==0 ) { 8542 lp_AST.setType(TYPECAST); 8543 } 8544 typeCastParameters(); 8545 astFactory.addASTChild(currentAST, returnAST); 8546 AST tmp212_AST = null; 8547 tmp212_AST = astFactory.create(LT(1)); 8548 astFactory.addASTChild(currentAST, tmp212_AST); 8549 match(RPAREN); 8550 unaryExpressionNotPlusMinus(); 8551 astFactory.addASTChild(currentAST, returnAST); 8552 } 8553 else if ((_tokenSet_56.member(LA(1))) && (_tokenSet_23.member(LA(2)))) { 8554 postfixExpression(); 8555 astFactory.addASTChild(currentAST, returnAST); 8556 } 8557 else { 8558 throw new NoViableAltException(LT(1), getFilename()); 8559 } 8560 }} 8561 } 8562 castExpression_AST = (AST)currentAST.root; 8563 returnAST = castExpression_AST; 8564 } 8565 8566 public final void typeCastParameters() throws RecognitionException, TokenStreamException { 8567 8568 returnAST = null; 8569 ASTPair currentAST = new ASTPair(); 8570 AST typeCastParameters_AST = null; 8571 Token b = null; 8572 AST b_AST = null; 8573 8574 classTypeSpec(true); 8575 astFactory.addASTChild(currentAST, returnAST); 8576 { 8577 _loop412: 8578 do { 8579 if ((LA(1)==BAND)) { 8580 b = LT(1); 8581 b_AST = astFactory.create(b); 8582 astFactory.addASTChild(currentAST, b_AST); 8583 match(BAND); 8584 if ( inputState.guessing==0 ) { 8585 b_AST.setType(TYPE_EXTENSION_AND); 8586 } 8587 classTypeSpec(true); 8588 astFactory.addASTChild(currentAST, returnAST); 8589 } 8590 else { 8591 break _loop412; 8592 } 8593 8594 } while (true); 8595 } 8596 typeCastParameters_AST = (AST)currentAST.root; 8597 returnAST = typeCastParameters_AST; 8598 } 8599 8600 public final void postfixExpression() throws RecognitionException, TokenStreamException { 8601 8602 returnAST = null; 8603 ASTPair currentAST = new ASTPair(); 8604 AST postfixExpression_AST = null; 8605 Token dc = null; 8606 AST dc_AST = null; 8607 Token lbc = null; 8608 AST lbc_AST = null; 8609 Token lb = null; 8610 AST lb_AST = null; 8611 Token lp = null; 8612 AST lp_AST = null; 8613 Token in = null; 8614 AST in_AST = null; 8615 Token de = null; 8616 AST de_AST = null; 8617 8618 primaryExpression(); 8619 astFactory.addASTChild(currentAST, returnAST); 8620 { 8621 _loop424: 8622 do { 8623 switch ( LA(1)) { 8624 case DOT: 8625 { 8626 AST tmp213_AST = null; 8627 tmp213_AST = astFactory.create(LT(1)); 8628 astFactory.makeASTRoot(currentAST, tmp213_AST); 8629 match(DOT); 8630 { 8631 switch ( LA(1)) { 8632 case IDENT: 8633 case LITERAL_this: 8634 case LITERAL_super: 8635 case LT: 8636 case LITERAL_record: 8637 case LITERAL_yield: 8638 { 8639 { 8640 switch ( LA(1)) { 8641 case LT: 8642 { 8643 typeArguments(false); 8644 astFactory.addASTChild(currentAST, returnAST); 8645 break; 8646 } 8647 case IDENT: 8648 case LITERAL_this: 8649 case LITERAL_super: 8650 case LITERAL_record: 8651 case LITERAL_yield: 8652 { 8653 break; 8654 } 8655 default: 8656 { 8657 throw new NoViableAltException(LT(1), getFilename()); 8658 } 8659 } 8660 } 8661 { 8662 switch ( LA(1)) { 8663 case IDENT: 8664 case LITERAL_record: 8665 case LITERAL_yield: 8666 { 8667 id(); 8668 astFactory.addASTChild(currentAST, returnAST); 8669 break; 8670 } 8671 case LITERAL_this: 8672 { 8673 AST tmp214_AST = null; 8674 tmp214_AST = astFactory.create(LT(1)); 8675 astFactory.addASTChild(currentAST, tmp214_AST); 8676 match(LITERAL_this); 8677 break; 8678 } 8679 case LITERAL_super: 8680 { 8681 AST tmp215_AST = null; 8682 tmp215_AST = astFactory.create(LT(1)); 8683 astFactory.addASTChild(currentAST, tmp215_AST); 8684 match(LITERAL_super); 8685 break; 8686 } 8687 default: 8688 { 8689 throw new NoViableAltException(LT(1), getFilename()); 8690 } 8691 } 8692 } 8693 break; 8694 } 8695 case LITERAL_class: 8696 { 8697 AST tmp216_AST = null; 8698 tmp216_AST = astFactory.create(LT(1)); 8699 astFactory.addASTChild(currentAST, tmp216_AST); 8700 match(LITERAL_class); 8701 break; 8702 } 8703 case LITERAL_new: 8704 { 8705 newExpression(); 8706 astFactory.addASTChild(currentAST, returnAST); 8707 break; 8708 } 8709 default: 8710 { 8711 throw new NoViableAltException(LT(1), getFilename()); 8712 } 8713 } 8714 } 8715 break; 8716 } 8717 case DOUBLE_COLON: 8718 { 8719 dc = LT(1); 8720 dc_AST = astFactory.create(dc); 8721 astFactory.makeASTRoot(currentAST, dc_AST); 8722 match(DOUBLE_COLON); 8723 if ( inputState.guessing==0 ) { 8724 dc_AST.setType(METHOD_REF); 8725 } 8726 { 8727 { 8728 switch ( LA(1)) { 8729 case LT: 8730 { 8731 typeArguments(false); 8732 astFactory.addASTChild(currentAST, returnAST); 8733 break; 8734 } 8735 case IDENT: 8736 case LITERAL_new: 8737 case LITERAL_record: 8738 case LITERAL_yield: 8739 { 8740 break; 8741 } 8742 default: 8743 { 8744 throw new NoViableAltException(LT(1), getFilename()); 8745 } 8746 } 8747 } 8748 { 8749 switch ( LA(1)) { 8750 case IDENT: 8751 case LITERAL_record: 8752 case LITERAL_yield: 8753 { 8754 id(); 8755 astFactory.addASTChild(currentAST, returnAST); 8756 break; 8757 } 8758 case LITERAL_new: 8759 { 8760 AST tmp217_AST = null; 8761 tmp217_AST = astFactory.create(LT(1)); 8762 astFactory.addASTChild(currentAST, tmp217_AST); 8763 match(LITERAL_new); 8764 break; 8765 } 8766 default: 8767 { 8768 throw new NoViableAltException(LT(1), getFilename()); 8769 } 8770 } 8771 } 8772 } 8773 break; 8774 } 8775 default: 8776 if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) { 8777 { 8778 int _cnt422=0; 8779 _loop422: 8780 do { 8781 if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) { 8782 lbc = LT(1); 8783 lbc_AST = astFactory.create(lbc); 8784 astFactory.makeASTRoot(currentAST, lbc_AST); 8785 match(LBRACK); 8786 if ( inputState.guessing==0 ) { 8787 lbc_AST.setType(ARRAY_DECLARATOR); 8788 } 8789 AST tmp218_AST = null; 8790 tmp218_AST = astFactory.create(LT(1)); 8791 astFactory.addASTChild(currentAST, tmp218_AST); 8792 match(RBRACK); 8793 } 8794 else { 8795 if ( _cnt422>=1 ) { break _loop422; } else {throw new NoViableAltException(LT(1), getFilename());} 8796 } 8797 8798 _cnt422++; 8799 } while (true); 8800 } 8801 { 8802 if ((LA(1)==DOT) && (LA(2)==LITERAL_class)) { 8803 AST tmp219_AST = null; 8804 tmp219_AST = astFactory.create(LT(1)); 8805 astFactory.makeASTRoot(currentAST, tmp219_AST); 8806 match(DOT); 8807 AST tmp220_AST = null; 8808 tmp220_AST = astFactory.create(LT(1)); 8809 astFactory.addASTChild(currentAST, tmp220_AST); 8810 match(LITERAL_class); 8811 } 8812 else if ((_tokenSet_59.member(LA(1))) && (_tokenSet_60.member(LA(2)))) { 8813 } 8814 else { 8815 throw new NoViableAltException(LT(1), getFilename()); 8816 } 8817 8818 } 8819 } 8820 else if ((LA(1)==LBRACK) && (_tokenSet_17.member(LA(2)))) { 8821 lb = LT(1); 8822 lb_AST = astFactory.create(lb); 8823 astFactory.makeASTRoot(currentAST, lb_AST); 8824 match(LBRACK); 8825 if ( inputState.guessing==0 ) { 8826 lb_AST.setType(INDEX_OP); 8827 } 8828 expression(); 8829 astFactory.addASTChild(currentAST, returnAST); 8830 AST tmp221_AST = null; 8831 tmp221_AST = astFactory.create(LT(1)); 8832 astFactory.addASTChild(currentAST, tmp221_AST); 8833 match(RBRACK); 8834 } 8835 else if ((LA(1)==LPAREN) && (_tokenSet_85.member(LA(2)))) { 8836 lp = LT(1); 8837 lp_AST = astFactory.create(lp); 8838 astFactory.makeASTRoot(currentAST, lp_AST); 8839 match(LPAREN); 8840 if ( inputState.guessing==0 ) { 8841 lp_AST.setType(METHOD_CALL); 8842 } 8843 argList(); 8844 astFactory.addASTChild(currentAST, returnAST); 8845 AST tmp222_AST = null; 8846 tmp222_AST = astFactory.create(LT(1)); 8847 astFactory.addASTChild(currentAST, tmp222_AST); 8848 match(RPAREN); 8849 } 8850 else { 8851 break _loop424; 8852 } 8853 } 8854 } while (true); 8855 } 8856 { 8857 if ((LA(1)==INC) && (_tokenSet_77.member(LA(2)))) { 8858 in = LT(1); 8859 in_AST = astFactory.create(in); 8860 astFactory.makeASTRoot(currentAST, in_AST); 8861 match(INC); 8862 if ( inputState.guessing==0 ) { 8863 in_AST.setType(POST_INC); 8864 } 8865 } 8866 else if ((LA(1)==DEC) && (_tokenSet_77.member(LA(2)))) { 8867 de = LT(1); 8868 de_AST = astFactory.create(de); 8869 astFactory.makeASTRoot(currentAST, de_AST); 8870 match(DEC); 8871 if ( inputState.guessing==0 ) { 8872 de_AST.setType(POST_DEC); 8873 } 8874 } 8875 else if ((_tokenSet_77.member(LA(1))) && (_tokenSet_60.member(LA(2)))) { 8876 } 8877 else { 8878 throw new NoViableAltException(LT(1), getFilename()); 8879 } 8880 8881 } 8882 postfixExpression_AST = (AST)currentAST.root; 8883 returnAST = postfixExpression_AST; 8884 } 8885 8886/** object instantiation. 8887 * Trees are built as illustrated by the following input/tree pairs: 8888 * 8889 * new T() 8890 * 8891 * new 8892 * | 8893 * T -- ELIST 8894 * | 8895 * arg1 -- arg2 -- .. -- argn 8896 * 8897 * new int[] 8898 * 8899 * new 8900 * | 8901 * int -- ARRAY_DECLARATOR 8902 * 8903 * new int[] {1,2} 8904 * 8905 * new 8906 * | 8907 * int -- ARRAY_DECLARATOR -- ARRAY_INIT 8908 * | 8909 * EXPR -- EXPR 8910 * | | 8911 * 1 2 8912 * 8913 * new int[3] 8914 * new 8915 * | 8916 * int -- ARRAY_DECLARATOR 8917 * | 8918 * EXPR 8919 * | 8920 * 3 8921 * 8922 * new int[1][2] 8923 * 8924 * new 8925 * | 8926 * int -- ARRAY_DECLARATOR 8927 * | 8928 * ARRAY_DECLARATOR -- EXPR 8929 * | | 8930 * EXPR 1 8931 * | 8932 * 2 8933 * 8934 * 8935 * @throws RecognitionException if recognition problem occurs. 8936 * @throws TokenStreamException if problem occurs while generating a stream of tokens. 8937 */ 8938 public final void newExpression() throws RecognitionException, TokenStreamException { 8939 8940 returnAST = null; 8941 ASTPair currentAST = new ASTPair(); 8942 AST newExpression_AST = null; 8943 8944 AST tmp223_AST = null; 8945 tmp223_AST = astFactory.create(LT(1)); 8946 astFactory.makeASTRoot(currentAST, tmp223_AST); 8947 match(LITERAL_new); 8948 { 8949 switch ( LA(1)) { 8950 case LT: 8951 { 8952 typeArguments(false); 8953 astFactory.addASTChild(currentAST, returnAST); 8954 break; 8955 } 8956 case LITERAL_void: 8957 case LITERAL_boolean: 8958 case LITERAL_byte: 8959 case LITERAL_char: 8960 case LITERAL_short: 8961 case LITERAL_int: 8962 case LITERAL_float: 8963 case LITERAL_long: 8964 case LITERAL_double: 8965 case IDENT: 8966 case AT: 8967 case LITERAL_record: 8968 case LITERAL_yield: 8969 { 8970 break; 8971 } 8972 default: 8973 { 8974 throw new NoViableAltException(LT(1), getFilename()); 8975 } 8976 } 8977 } 8978 type(); 8979 astFactory.addASTChild(currentAST, returnAST); 8980 { 8981 switch ( LA(1)) { 8982 case LPAREN: 8983 { 8984 AST tmp224_AST = null; 8985 tmp224_AST = astFactory.create(LT(1)); 8986 astFactory.addASTChild(currentAST, tmp224_AST); 8987 match(LPAREN); 8988 argList(); 8989 astFactory.addASTChild(currentAST, returnAST); 8990 AST tmp225_AST = null; 8991 tmp225_AST = astFactory.create(LT(1)); 8992 astFactory.addASTChild(currentAST, tmp225_AST); 8993 match(RPAREN); 8994 { 8995 if ((LA(1)==LCURLY) && (_tokenSet_38.member(LA(2)))) { 8996 classBlock(); 8997 astFactory.addASTChild(currentAST, returnAST); 8998 } 8999 else if ((_tokenSet_59.member(LA(1))) && (_tokenSet_60.member(LA(2)))) { 9000 } 9001 else { 9002 throw new NoViableAltException(LT(1), getFilename()); 9003 } 9004 9005 } 9006 break; 9007 } 9008 case LBRACK: 9009 case AT: 9010 { 9011 newArrayDeclarator(); 9012 astFactory.addASTChild(currentAST, returnAST); 9013 { 9014 if ((LA(1)==LCURLY) && (_tokenSet_86.member(LA(2)))) { 9015 arrayInitializer(); 9016 astFactory.addASTChild(currentAST, returnAST); 9017 } 9018 else if ((_tokenSet_59.member(LA(1))) && (_tokenSet_60.member(LA(2)))) { 9019 } 9020 else { 9021 throw new NoViableAltException(LT(1), getFilename()); 9022 } 9023 9024 } 9025 break; 9026 } 9027 default: 9028 { 9029 throw new NoViableAltException(LT(1), getFilename()); 9030 } 9031 } 9032 } 9033 newExpression_AST = (AST)currentAST.root; 9034 returnAST = newExpression_AST; 9035 } 9036 9037 public final void constant() throws RecognitionException, TokenStreamException { 9038 9039 returnAST = null; 9040 ASTPair currentAST = new ASTPair(); 9041 AST constant_AST = null; 9042 9043 switch ( LA(1)) { 9044 case NUM_INT: 9045 { 9046 AST tmp226_AST = null; 9047 tmp226_AST = astFactory.create(LT(1)); 9048 astFactory.addASTChild(currentAST, tmp226_AST); 9049 match(NUM_INT); 9050 constant_AST = (AST)currentAST.root; 9051 break; 9052 } 9053 case NUM_LONG: 9054 { 9055 AST tmp227_AST = null; 9056 tmp227_AST = astFactory.create(LT(1)); 9057 astFactory.addASTChild(currentAST, tmp227_AST); 9058 match(NUM_LONG); 9059 constant_AST = (AST)currentAST.root; 9060 break; 9061 } 9062 case NUM_FLOAT: 9063 { 9064 AST tmp228_AST = null; 9065 tmp228_AST = astFactory.create(LT(1)); 9066 astFactory.addASTChild(currentAST, tmp228_AST); 9067 match(NUM_FLOAT); 9068 constant_AST = (AST)currentAST.root; 9069 break; 9070 } 9071 case NUM_DOUBLE: 9072 { 9073 AST tmp229_AST = null; 9074 tmp229_AST = astFactory.create(LT(1)); 9075 astFactory.addASTChild(currentAST, tmp229_AST); 9076 match(NUM_DOUBLE); 9077 constant_AST = (AST)currentAST.root; 9078 break; 9079 } 9080 case CHAR_LITERAL: 9081 { 9082 AST tmp230_AST = null; 9083 tmp230_AST = astFactory.create(LT(1)); 9084 astFactory.addASTChild(currentAST, tmp230_AST); 9085 match(CHAR_LITERAL); 9086 constant_AST = (AST)currentAST.root; 9087 break; 9088 } 9089 case STRING_LITERAL: 9090 { 9091 AST tmp231_AST = null; 9092 tmp231_AST = astFactory.create(LT(1)); 9093 astFactory.addASTChild(currentAST, tmp231_AST); 9094 match(STRING_LITERAL); 9095 constant_AST = (AST)currentAST.root; 9096 break; 9097 } 9098 case TEXT_BLOCK_CONTENT: 9099 { 9100 textBlock(); 9101 astFactory.addASTChild(currentAST, returnAST); 9102 constant_AST = (AST)currentAST.root; 9103 break; 9104 } 9105 default: 9106 { 9107 throw new NoViableAltException(LT(1), getFilename()); 9108 } 9109 } 9110 returnAST = constant_AST; 9111 } 9112 9113 public final void newArrayDeclarator() throws RecognitionException, TokenStreamException { 9114 9115 returnAST = null; 9116 ASTPair currentAST = new ASTPair(); 9117 AST newArrayDeclarator_AST = null; 9118 Token lb = null; 9119 AST lb_AST = null; 9120 9121 { 9122 int _cnt446=0; 9123 _loop446: 9124 do { 9125 if ((LA(1)==LBRACK||LA(1)==AT) && (_tokenSet_87.member(LA(2)))) { 9126 { 9127 if (((LA(1)==LBRACK||LA(1)==AT) && (_tokenSet_87.member(LA(2))))&&(LA(1) == AT)) { 9128 annotations(); 9129 astFactory.addASTChild(currentAST, returnAST); 9130 } 9131 else if ((LA(1)==LBRACK) && (_tokenSet_87.member(LA(2)))) { 9132 } 9133 else { 9134 throw new NoViableAltException(LT(1), getFilename()); 9135 } 9136 9137 } 9138 lb = LT(1); 9139 lb_AST = astFactory.create(lb); 9140 astFactory.makeASTRoot(currentAST, lb_AST); 9141 match(LBRACK); 9142 if ( inputState.guessing==0 ) { 9143 lb_AST.setType(ARRAY_DECLARATOR); 9144 } 9145 { 9146 switch ( LA(1)) { 9147 case LITERAL_void: 9148 case LITERAL_boolean: 9149 case LITERAL_byte: 9150 case LITERAL_char: 9151 case LITERAL_short: 9152 case LITERAL_int: 9153 case LITERAL_float: 9154 case LITERAL_long: 9155 case LITERAL_double: 9156 case IDENT: 9157 case LPAREN: 9158 case LITERAL_this: 9159 case LITERAL_super: 9160 case LITERAL_switch: 9161 case PLUS: 9162 case MINUS: 9163 case INC: 9164 case DEC: 9165 case BNOT: 9166 case LNOT: 9167 case LITERAL_true: 9168 case LITERAL_false: 9169 case LITERAL_null: 9170 case LITERAL_new: 9171 case NUM_INT: 9172 case CHAR_LITERAL: 9173 case STRING_LITERAL: 9174 case NUM_FLOAT: 9175 case NUM_LONG: 9176 case NUM_DOUBLE: 9177 case AT: 9178 case LITERAL_record: 9179 case TEXT_BLOCK_CONTENT: 9180 case LITERAL_yield: 9181 { 9182 expression(); 9183 astFactory.addASTChild(currentAST, returnAST); 9184 break; 9185 } 9186 case RBRACK: 9187 { 9188 break; 9189 } 9190 default: 9191 { 9192 throw new NoViableAltException(LT(1), getFilename()); 9193 } 9194 } 9195 } 9196 AST tmp232_AST = null; 9197 tmp232_AST = astFactory.create(LT(1)); 9198 astFactory.addASTChild(currentAST, tmp232_AST); 9199 match(RBRACK); 9200 } 9201 else { 9202 if ( _cnt446>=1 ) { break _loop446; } else {throw new NoViableAltException(LT(1), getFilename());} 9203 } 9204 9205 _cnt446++; 9206 } while (true); 9207 } 9208 newArrayDeclarator_AST = (AST)currentAST.root; 9209 returnAST = newArrayDeclarator_AST; 9210 } 9211 9212 public final void textBlock() throws RecognitionException, TokenStreamException { 9213 9214 returnAST = null; 9215 ASTPair currentAST = new ASTPair(); 9216 AST textBlock_AST = null; 9217 Token c = null; 9218 AST c_AST = null; 9219 9220 c = LT(1); 9221 c_AST = astFactory.create(c); 9222 match(TEXT_BLOCK_CONTENT); 9223 AST tmp233_AST = null; 9224 tmp233_AST = astFactory.create(LT(1)); 9225 match(TEXT_BLOCK_LITERAL_END); 9226 AST tmp234_AST = null; 9227 tmp234_AST = astFactory.create(LT(1)); 9228 match(TEXT_BLOCK_LITERAL_BEGIN); 9229 if ( inputState.guessing==0 ) { 9230 textBlock_AST = (AST)currentAST.root; 9231 textBlock_AST=(AST)astFactory.make( (new ASTArray(3)).add(tmp234_AST).add(c_AST).add(tmp233_AST)); 9232 currentAST.root = textBlock_AST; 9233 currentAST.child = textBlock_AST!=null &&textBlock_AST.getFirstChild()!=null ? 9234 textBlock_AST.getFirstChild() : textBlock_AST; 9235 currentAST.advanceChildToEnd(); 9236 } 9237 returnAST = textBlock_AST; 9238 } 9239 9240 public final void lambdaParameters() throws RecognitionException, TokenStreamException { 9241 9242 returnAST = null; 9243 ASTPair currentAST = new ASTPair(); 9244 AST lambdaParameters_AST = null; 9245 9246 switch ( LA(1)) { 9247 case IDENT: 9248 case LITERAL_record: 9249 case LITERAL_yield: 9250 { 9251 id(); 9252 astFactory.addASTChild(currentAST, returnAST); 9253 lambdaParameters_AST = (AST)currentAST.root; 9254 break; 9255 } 9256 case LPAREN: 9257 { 9258 AST tmp235_AST = null; 9259 tmp235_AST = astFactory.create(LT(1)); 9260 astFactory.addASTChild(currentAST, tmp235_AST); 9261 match(LPAREN); 9262 { 9263 if ((_tokenSet_88.member(LA(1))) && (_tokenSet_89.member(LA(2)))) { 9264 parameterDeclarationList(); 9265 astFactory.addASTChild(currentAST, returnAST); 9266 } 9267 else if ((LA(1)==RPAREN) && (LA(2)==LAMBDA)) { 9268 } 9269 else { 9270 throw new NoViableAltException(LT(1), getFilename()); 9271 } 9272 9273 } 9274 AST tmp236_AST = null; 9275 tmp236_AST = astFactory.create(LT(1)); 9276 astFactory.addASTChild(currentAST, tmp236_AST); 9277 match(RPAREN); 9278 lambdaParameters_AST = (AST)currentAST.root; 9279 break; 9280 } 9281 default: 9282 { 9283 throw new NoViableAltException(LT(1), getFilename()); 9284 } 9285 } 9286 returnAST = lambdaParameters_AST; 9287 } 9288 9289 public final void lambdaBody() throws RecognitionException, TokenStreamException { 9290 9291 returnAST = null; 9292 ASTPair currentAST = new ASTPair(); 9293 AST lambdaBody_AST = null; 9294 9295 { 9296 if ((_tokenSet_17.member(LA(1))) && (_tokenSet_23.member(LA(2)))) { 9297 expression(); 9298 astFactory.addASTChild(currentAST, returnAST); 9299 } 9300 else if ((_tokenSet_44.member(LA(1))) && (_tokenSet_23.member(LA(2)))) { 9301 statement(); 9302 astFactory.addASTChild(currentAST, returnAST); 9303 } 9304 else { 9305 throw new NoViableAltException(LT(1), getFilename()); 9306 } 9307 9308 } 9309 lambdaBody_AST = (AST)currentAST.root; 9310 returnAST = lambdaBody_AST; 9311 } 9312 9313 public final void recordKey() throws RecognitionException, TokenStreamException { 9314 9315 returnAST = null; 9316 ASTPair currentAST = new ASTPair(); 9317 AST recordKey_AST = null; 9318 9319 AST tmp237_AST = null; 9320 tmp237_AST = astFactory.create(LT(1)); 9321 astFactory.addASTChild(currentAST, tmp237_AST); 9322 match(LITERAL_record); 9323 if ( inputState.guessing==0 ) { 9324 recordKey_AST = (AST)currentAST.root; 9325 recordKey_AST.setType(IDENT); 9326 } 9327 recordKey_AST = (AST)currentAST.root; 9328 returnAST = recordKey_AST; 9329 } 9330 9331 public final void yieldKey() throws RecognitionException, TokenStreamException { 9332 9333 returnAST = null; 9334 ASTPair currentAST = new ASTPair(); 9335 AST yieldKey_AST = null; 9336 9337 AST tmp238_AST = null; 9338 tmp238_AST = astFactory.create(LT(1)); 9339 astFactory.addASTChild(currentAST, tmp238_AST); 9340 match(LITERAL_yield); 9341 if ( inputState.guessing==0 ) { 9342 yieldKey_AST = (AST)currentAST.root; 9343 yieldKey_AST.setType(IDENT); 9344 } 9345 yieldKey_AST = (AST)currentAST.root; 9346 returnAST = yieldKey_AST; 9347 } 9348 9349 9350 public static final String[] _tokenNames = { 9351 "<0>", 9352 "EOF", 9353 "<2>", 9354 "NULL_TREE_LOOKAHEAD", 9355 "BLOCK", 9356 "MODIFIERS", 9357 "OBJBLOCK", 9358 "SLIST", 9359 "CTOR_DEF", 9360 "METHOD_DEF", 9361 "VARIABLE_DEF", 9362 "INSTANCE_INIT", 9363 "STATIC_INIT", 9364 "TYPE", 9365 "CLASS_DEF", 9366 "INTERFACE_DEF", 9367 "PACKAGE_DEF", 9368 "ARRAY_DECLARATOR", 9369 "EXTENDS_CLAUSE", 9370 "IMPLEMENTS_CLAUSE", 9371 "PARAMETERS", 9372 "PARAMETER_DEF", 9373 "LABELED_STAT", 9374 "TYPECAST", 9375 "INDEX_OP", 9376 "POST_INC", 9377 "POST_DEC", 9378 "METHOD_CALL", 9379 "EXPR", 9380 "ARRAY_INIT", 9381 "IMPORT", 9382 "UNARY_MINUS", 9383 "UNARY_PLUS", 9384 "CASE_GROUP", 9385 "ELIST", 9386 "FOR_INIT", 9387 "FOR_CONDITION", 9388 "FOR_ITERATOR", 9389 "EMPTY_STAT", 9390 "\"final\"", 9391 "\"abstract\"", 9392 "\"strictfp\"", 9393 "SUPER_CTOR_CALL", 9394 "CTOR_CALL", 9395 "\"package\"", 9396 "SEMI", 9397 "\"import\"", 9398 "LBRACK", 9399 "RBRACK", 9400 "\"void\"", 9401 "\"boolean\"", 9402 "\"byte\"", 9403 "\"char\"", 9404 "\"short\"", 9405 "\"int\"", 9406 "\"float\"", 9407 "\"long\"", 9408 "\"double\"", 9409 "IDENT", 9410 "DOT", 9411 "STAR", 9412 "\"private\"", 9413 "\"public\"", 9414 "\"protected\"", 9415 "\"static\"", 9416 "\"transient\"", 9417 "\"native\"", 9418 "\"synchronized\"", 9419 "\"volatile\"", 9420 "\"class\"", 9421 "\"extends\"", 9422 "\"interface\"", 9423 "LCURLY", 9424 "RCURLY", 9425 "COMMA", 9426 "\"implements\"", 9427 "LPAREN", 9428 "RPAREN", 9429 "\"this\"", 9430 "\"super\"", 9431 "ASSIGN", 9432 "\"throws\"", 9433 "COLON", 9434 "\"if\"", 9435 "\"while\"", 9436 "\"do\"", 9437 "\"break\"", 9438 "\"continue\"", 9439 "\"return\"", 9440 "\"switch\"", 9441 "\"throw\"", 9442 "\"for\"", 9443 "\"else\"", 9444 "\"case\"", 9445 "\"default\"", 9446 "\"try\"", 9447 "\"catch\"", 9448 "\"finally\"", 9449 "PLUS_ASSIGN", 9450 "MINUS_ASSIGN", 9451 "STAR_ASSIGN", 9452 "DIV_ASSIGN", 9453 "MOD_ASSIGN", 9454 "SR_ASSIGN", 9455 "BSR_ASSIGN", 9456 "SL_ASSIGN", 9457 "BAND_ASSIGN", 9458 "BXOR_ASSIGN", 9459 "BOR_ASSIGN", 9460 "QUESTION", 9461 "LOR", 9462 "LAND", 9463 "BOR", 9464 "BXOR", 9465 "BAND", 9466 "NOT_EQUAL", 9467 "EQUAL", 9468 "LT", 9469 "GT", 9470 "LE", 9471 "GE", 9472 "\"instanceof\"", 9473 "SL", 9474 "SR", 9475 "BSR", 9476 "PLUS", 9477 "MINUS", 9478 "DIV", 9479 "MOD", 9480 "INC", 9481 "DEC", 9482 "BNOT", 9483 "LNOT", 9484 "\"true\"", 9485 "\"false\"", 9486 "\"null\"", 9487 "\"new\"", 9488 "NUM_INT", 9489 "CHAR_LITERAL", 9490 "STRING_LITERAL", 9491 "NUM_FLOAT", 9492 "NUM_LONG", 9493 "NUM_DOUBLE", 9494 "WS", 9495 "SINGLE_LINE_COMMENT", 9496 "BLOCK_COMMENT_BEGIN", 9497 "ESC", 9498 "HEX_DIGIT", 9499 "VOCAB", 9500 "EXPONENT", 9501 "FLOAT_SUFFIX", 9502 "ASSERT", 9503 "STATIC_IMPORT", 9504 "ENUM", 9505 "ENUM_DEF", 9506 "ENUM_CONSTANT_DEF", 9507 "FOR_EACH_CLAUSE", 9508 "ANNOTATION_DEF", 9509 "ANNOTATIONS", 9510 "ANNOTATION", 9511 "ANNOTATION_MEMBER_VALUE_PAIR", 9512 "ANNOTATION_FIELD_DEF", 9513 "ANNOTATION_ARRAY_INIT", 9514 "TYPE_ARGUMENTS", 9515 "TYPE_ARGUMENT", 9516 "TYPE_PARAMETERS", 9517 "TYPE_PARAMETER", 9518 "WILDCARD_TYPE", 9519 "TYPE_UPPER_BOUNDS", 9520 "TYPE_LOWER_BOUNDS", 9521 "AT", 9522 "ELLIPSIS", 9523 "GENERIC_START", 9524 "GENERIC_END", 9525 "TYPE_EXTENSION_AND", 9526 "DO_WHILE", 9527 "RESOURCE_SPECIFICATION", 9528 "RESOURCES", 9529 "RESOURCE", 9530 "DOUBLE_COLON", 9531 "METHOD_REF", 9532 "LAMBDA", 9533 "BLOCK_COMMENT_END", 9534 "COMMENT_CONTENT", 9535 "SINGLE_LINE_COMMENT_CONTENT", 9536 "BLOCK_COMMENT_CONTENT", 9537 "STD_ESC", 9538 "BINARY_DIGIT", 9539 "ID_START", 9540 "ID_PART", 9541 "INT_LITERAL", 9542 "LONG_LITERAL", 9543 "FLOAT_LITERAL", 9544 "DOUBLE_LITERAL", 9545 "HEX_FLOAT_LITERAL", 9546 "HEX_DOUBLE_LITERAL", 9547 "SIGNED_INTEGER", 9548 "BINARY_EXPONENT", 9549 "PATTERN_VARIABLE_DEF", 9550 "RECORD_DEF", 9551 "\"record\"", 9552 "RECORD_COMPONENTS", 9553 "RECORD_COMPONENT_DEF", 9554 "COMPACT_CTOR_DEF", 9555 "TEXT_BLOCK_LITERAL_BEGIN", 9556 "TEXT_BLOCK_CONTENT", 9557 "TEXT_BLOCK_LITERAL_END", 9558 "\"yield\"", 9559 "SWITCH_RULE" 9560 }; 9561 9562 protected void buildTokenTypeASTClassMap() { 9563 tokenTypeToASTClassMap=null; 9564 }; 9565 9566 private static final long[] mk_tokenSet_0() { 9567 long[] data = new long[8]; 9568 data[0]=288230376151711744L; 9569 data[3]=33024L; 9570 return data; 9571 } 9572 public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0()); 9573 private static final long[] mk_tokenSet_1() { 9574 long[] data = new long[8]; 9575 data[0]=-2305733607806730238L; 9576 data[1]=1073742015L; 9577 data[2]=4398080065536L; 9578 data[3]=256L; 9579 return data; 9580 } 9581 public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1()); 9582 private static final long[] mk_tokenSet_2() { 9583 long[] data = new long[8]; 9584 data[0]=-2017503231655018494L; 9585 data[1]=1073742015L; 9586 data[2]=4398080065536L; 9587 data[3]=33024L; 9588 return data; 9589 } 9590 public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2()); 9591 private static final long[] mk_tokenSet_3() { 9592 long[] data = new long[8]; 9593 data[0]=-2305803976550907904L; 9594 data[1]=1073742015L; 9595 data[2]=4398080065536L; 9596 data[3]=256L; 9597 return data; 9598 } 9599 public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3()); 9600 private static final long[] mk_tokenSet_4() { 9601 long[] data = new long[8]; 9602 data[0]=-2305803976550907902L; 9603 data[1]=1073742015L; 9604 data[2]=4398080065536L; 9605 data[3]=256L; 9606 return data; 9607 } 9608 public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4()); 9609 private static final long[] mk_tokenSet_5() { 9610 long[] data = { -2305839160922996736L, 1073741855L, 0L, 0L}; 9611 return data; 9612 } 9613 public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5()); 9614 private static final long[] mk_tokenSet_6() { 9615 long[] data = new long[8]; 9616 data[0]=288511851128422400L; 9617 data[3]=33024L; 9618 return data; 9619 } 9620 public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6()); 9621 private static final long[] mk_tokenSet_7() { 9622 long[] data = { 140737488355328L, 0L, 13194139533312L, 0L, 0L, 0L}; 9623 return data; 9624 } 9625 public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7()); 9626 private static final long[] mk_tokenSet_8() { 9627 long[] data = new long[8]; 9628 data[0]=288230376151711744L; 9629 data[2]=4398046511104L; 9630 data[3]=33024L; 9631 return data; 9632 } 9633 public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8()); 9634 private static final long[] mk_tokenSet_9() { 9635 long[] data = new long[8]; 9636 data[0]=-101704825569280L; 9637 data[1]=-12885032961L; 9638 data[2]=11272193249935359L; 9639 data[3]=41216L; 9640 return data; 9641 } 9642 public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9()); 9643 private static final long[] mk_tokenSet_10() { 9644 long[] data = new long[8]; 9645 data[0]=-84112639524862L; 9646 data[1]=-131073L; 9647 data[2]=11272193249935359L; 9648 data[3]=57600L; 9649 return data; 9650 } 9651 public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10()); 9652 private static final long[] mk_tokenSet_11() { 9653 long[] data = new long[8]; 9654 data[0]=575897802350002176L; 9655 data[1]=35184372088832L; 9656 data[2]=4398046511104L; 9657 data[3]=33024L; 9658 return data; 9659 } 9660 public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11()); 9661 private static final long[] mk_tokenSet_12() { 9662 long[] data = { 0L, 1747396655419752448L, 0L, 0L}; 9663 return data; 9664 } 9665 public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12()); 9666 private static final long[] mk_tokenSet_13() { 9667 long[] data = new long[8]; 9668 data[0]=575897802350002176L; 9669 data[2]=4398046511104L; 9670 data[3]=33024L; 9671 return data; 9672 } 9673 public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13()); 9674 private static final long[] mk_tokenSet_14() { 9675 long[] data = new long[8]; 9676 data[0]=864831865943490560L; 9677 data[1]=9007199254745088L; 9678 data[2]=4398046511104L; 9679 data[3]=33024L; 9680 return data; 9681 } 9682 public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14()); 9683 private static final long[] mk_tokenSet_15() { 9684 long[] data = new long[8]; 9685 data[0]=575897802350002176L; 9686 data[1]=6917529027674689792L; 9687 data[2]=4398046543870L; 9688 data[3]=41216L; 9689 return data; 9690 } 9691 public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15()); 9692 private static final long[] mk_tokenSet_16() { 9693 long[] data = new long[8]; 9694 data[0]=2305420796748627968L; 9695 data[1]=-35184338472448L; 9696 data[2]=2256197860229119L; 9697 data[3]=57600L; 9698 return data; 9699 } 9700 public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16()); 9701 private static final long[] mk_tokenSet_17() { 9702 long[] data = new long[8]; 9703 data[0]=575897802350002176L; 9704 data[1]=6917529027674689536L; 9705 data[2]=4398046543870L; 9706 data[3]=41216L; 9707 return data; 9708 } 9709 public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17()); 9710 private static final long[] mk_tokenSet_18() { 9711 long[] data = new long[8]; 9712 data[0]=2305455981120716800L; 9713 data[1]=-35184338471936L; 9714 data[2]=2256197860229119L; 9715 data[3]=57600L; 9716 return data; 9717 } 9718 public static final BitSet _tokenSet_18 = new BitSet(mk_tokenSet_18()); 9719 private static final long[] mk_tokenSet_19() { 9720 long[] data = new long[8]; 9721 data[0]=2305420796748627968L; 9722 data[1]=-35184338479616L; 9723 data[2]=2256197860229119L; 9724 data[3]=57600L; 9725 return data; 9726 } 9727 public static final BitSet _tokenSet_19 = new BitSet(mk_tokenSet_19()); 9728 private static final long[] mk_tokenSet_20() { 9729 long[] data = new long[8]; 9730 data[0]=288230376151711744L; 9731 data[1]=4096L; 9732 data[3]=33024L; 9733 return data; 9734 } 9735 public static final BitSet _tokenSet_20 = new BitSet(mk_tokenSet_20()); 9736 private static final long[] mk_tokenSet_21() { 9737 long[] data = new long[8]; 9738 data[0]=575898352105816064L; 9739 data[1]=24576L; 9740 data[2]=9011597301252096L; 9741 data[3]=33024L; 9742 return data; 9743 } 9744 public static final BitSet _tokenSet_21 = new BitSet(mk_tokenSet_21()); 9745 private static final long[] mk_tokenSet_22() { 9746 long[] data = new long[8]; 9747 data[0]=2305420796748627968L; 9748 data[1]=-17145933824L; 9749 data[2]=2256197860229119L; 9750 data[3]=57600L; 9751 return data; 9752 } 9753 public static final BitSet _tokenSet_22 = new BitSet(mk_tokenSet_22()); 9754 private static final long[] mk_tokenSet_23() { 9755 long[] data = new long[8]; 9756 data[0]=-101704825569280L; 9757 data[1]=-12885035073L; 9758 data[2]=11263397156913151L; 9759 data[3]=57600L; 9760 return data; 9761 } 9762 public static final BitSet _tokenSet_23 = new BitSet(mk_tokenSet_23()); 9763 private static final long[] mk_tokenSet_24() { 9764 long[] data = new long[8]; 9765 data[0]=-2017608784771284992L; 9766 data[1]=1073741855L; 9767 data[2]=4398046511104L; 9768 data[3]=33024L; 9769 return data; 9770 } 9771 public static final BitSet _tokenSet_24 = new BitSet(mk_tokenSet_24()); 9772 private static final long[] mk_tokenSet_25() { 9773 long[] data = new long[8]; 9774 data[0]=-2017608784771284992L; 9775 data[1]=1073742111L; 9776 data[2]=4398046511104L; 9777 data[3]=33024L; 9778 return data; 9779 } 9780 public static final BitSet _tokenSet_25 = new BitSet(mk_tokenSet_25()); 9781 private static final long[] mk_tokenSet_26() { 9782 long[] data = new long[8]; 9783 data[0]=-1729941358572994560L; 9784 data[1]=9007200328483263L; 9785 data[2]=4398080065536L; 9786 data[3]=33024L; 9787 return data; 9788 } 9789 public static final BitSet _tokenSet_26 = new BitSet(mk_tokenSet_26()); 9790 private static final long[] mk_tokenSet_27() { 9791 long[] data = new long[8]; 9792 data[0]=-1153304684409126912L; 9793 data[1]=6926536230385013695L; 9794 data[2]=4398088486910L; 9795 data[3]=41216L; 9796 return data; 9797 } 9798 public static final BitSet _tokenSet_27 = new BitSet(mk_tokenSet_27()); 9799 private static final long[] mk_tokenSet_28() { 9800 long[] data = new long[8]; 9801 data[0]=864831865943490560L; 9802 data[1]=9007199254740992L; 9803 data[2]=4398046511104L; 9804 data[3]=33024L; 9805 return data; 9806 } 9807 public static final BitSet _tokenSet_28 = new BitSet(mk_tokenSet_28()); 9808 private static final long[] mk_tokenSet_29() { 9809 long[] data = new long[8]; 9810 data[0]=864831865943490560L; 9811 data[1]=9007199254740992L; 9812 data[2]=13194139533312L; 9813 data[3]=33024L; 9814 return data; 9815 } 9816 public static final BitSet _tokenSet_29 = new BitSet(mk_tokenSet_29()); 9817 private static final long[] mk_tokenSet_30() { 9818 long[] data = new long[8]; 9819 data[0]=-1729906174200905728L; 9820 data[1]=9007200328951743L; 9821 data[2]=4398080065536L; 9822 data[3]=33024L; 9823 return data; 9824 } 9825 public static final BitSet _tokenSet_30 = new BitSet(mk_tokenSet_30()); 9826 private static final long[] mk_tokenSet_31() { 9827 long[] data = new long[8]; 9828 data[0]=-101704825569278L; 9829 data[1]=-12884901953L; 9830 data[2]=11263397156913151L; 9831 data[3]=41216L; 9832 return data; 9833 } 9834 public static final BitSet _tokenSet_31 = new BitSet(mk_tokenSet_31()); 9835 private static final long[] mk_tokenSet_32() { 9836 long[] data = new long[8]; 9837 data[0]=-1729941358572994560L; 9838 data[1]=9007200328483007L; 9839 data[2]=4398080065536L; 9840 data[3]=33024L; 9841 return data; 9842 } 9843 public static final BitSet _tokenSet_32 = new BitSet(mk_tokenSet_32()); 9844 private static final long[] mk_tokenSet_33() { 9845 long[] data = new long[8]; 9846 data[0]=-1153339868781215744L; 9847 data[1]=9007200328487103L; 9848 data[2]=4398080065536L; 9849 data[3]=33024L; 9850 return data; 9851 } 9852 public static final BitSet _tokenSet_33 = new BitSet(mk_tokenSet_33()); 9853 private static final long[] mk_tokenSet_34() { 9854 long[] data = new long[8]; 9855 data[1]=160L; 9856 data[2]=4398080065536L; 9857 data[3]=256L; 9858 return data; 9859 } 9860 public static final BitSet _tokenSet_34 = new BitSet(mk_tokenSet_34()); 9861 private static final long[] mk_tokenSet_35() { 9862 long[] data = new long[8]; 9863 data[0]=288230376151711744L; 9864 data[1]=128L; 9865 data[3]=33024L; 9866 return data; 9867 } 9868 public static final BitSet _tokenSet_35 = new BitSet(mk_tokenSet_35()); 9869 private static final long[] mk_tokenSet_36() { 9870 long[] data = new long[8]; 9871 data[0]=575897802350002176L; 9872 data[1]=9007199254740992L; 9873 data[2]=4398046511104L; 9874 data[3]=33024L; 9875 return data; 9876 } 9877 public static final BitSet _tokenSet_36 = new BitSet(mk_tokenSet_36()); 9878 private static final long[] mk_tokenSet_37() { 9879 long[] data = new long[8]; 9880 data[0]=-1729765436712550400L; 9881 data[1]=9007200328550335L; 9882 data[2]=4398080065536L; 9883 data[3]=33024L; 9884 return data; 9885 } 9886 public static final BitSet _tokenSet_37 = new BitSet(mk_tokenSet_37()); 9887 private static final long[] mk_tokenSet_38() { 9888 long[] data = new long[8]; 9889 data[0]=-1729906174200905728L; 9890 data[1]=9007200328483775L; 9891 data[2]=4398080065536L; 9892 data[3]=33024L; 9893 return data; 9894 } 9895 public static final BitSet _tokenSet_38 = new BitSet(mk_tokenSet_38()); 9896 private static final long[] mk_tokenSet_39() { 9897 long[] data = new long[8]; 9898 data[0]=-101704825569278L; 9899 data[1]=-12885035073L; 9900 data[2]=11263397156913151L; 9901 data[3]=41216L; 9902 return data; 9903 } 9904 public static final BitSet _tokenSet_39 = new BitSet(mk_tokenSet_39()); 9905 private static final long[] mk_tokenSet_40() { 9906 long[] data = new long[8]; 9907 data[0]=575897802350002176L; 9908 data[1]=9007199254794240L; 9909 data[2]=4398046543840L; 9910 data[3]=41216L; 9911 return data; 9912 } 9913 public static final BitSet _tokenSet_40 = new BitSet(mk_tokenSet_40()); 9914 private static final long[] mk_tokenSet_41() { 9915 long[] data = new long[8]; 9916 data[0]=1152499292141780992L; 9917 data[1]=8673968066721271808L; 9918 data[2]=4398046543870L; 9919 data[3]=57600L; 9920 return data; 9921 } 9922 public static final BitSet _tokenSet_41 = new BitSet(mk_tokenSet_41()); 9923 private static final long[] mk_tokenSet_42() { 9924 long[] data = new long[8]; 9925 data[0]=-1729906174200905728L; 9926 data[1]=6917529031130272575L; 9927 data[2]=4398054932478L; 9928 data[3]=41216L; 9929 return data; 9930 } 9931 public static final BitSet _tokenSet_42 = new BitSet(mk_tokenSet_42()); 9932 private static final long[] mk_tokenSet_43() { 9933 long[] data = new long[8]; 9934 data[0]=-383179802279936L; 9935 data[1]=-13690342465L; 9936 data[2]=11263397156913151L; 9937 data[3]=57600L; 9938 return data; 9939 } 9940 public static final BitSet _tokenSet_43 = new BitSet(mk_tokenSet_43()); 9941 private static final long[] mk_tokenSet_44() { 9942 long[] data = new long[8]; 9943 data[0]=-1729906174200905728L; 9944 data[1]=6917529031130272063L; 9945 data[2]=4398054932478L; 9946 data[3]=41216L; 9947 return data; 9948 } 9949 public static final BitSet _tokenSet_44 = new BitSet(mk_tokenSet_44()); 9950 private static final long[] mk_tokenSet_45() { 9951 long[] data = new long[8]; 9952 data[0]=575897802350002176L; 9953 data[1]=1747396655419759936L; 9954 data[2]=4398046511104L; 9955 data[3]=33024L; 9956 return data; 9957 } 9958 public static final BitSet _tokenSet_45 = new BitSet(mk_tokenSet_45()); 9959 private static final long[] mk_tokenSet_46() { 9960 long[] data = new long[8]; 9961 data[0]=-1153304684409126912L; 9962 data[1]=9007200328498175L; 9963 data[2]=4398080065536L; 9964 data[3]=33024L; 9965 return data; 9966 } 9967 public static final BitSet _tokenSet_46 = new BitSet(mk_tokenSet_46()); 9968 private static final long[] mk_tokenSet_47() { 9969 long[] data = { 175921860444160L, 66560L, 4398046511104L, 0L, 0L, 0L}; 9970 return data; 9971 } 9972 public static final BitSet _tokenSet_47 = new BitSet(mk_tokenSet_47()); 9973 private static final long[] mk_tokenSet_48() { 9974 long[] data = new long[8]; 9975 data[0]=575898352105816064L; 9976 data[1]=16384L; 9977 data[2]=4398046511104L; 9978 data[3]=33024L; 9979 return data; 9980 } 9981 public static final BitSet _tokenSet_48 = new BitSet(mk_tokenSet_48()); 9982 private static final long[] mk_tokenSet_49() { 9983 long[] data = new long[8]; 9984 data[0]=1152499292141780992L; 9985 data[1]=9007199254766592L; 9986 data[2]=4398046511104L; 9987 data[3]=33024L; 9988 return data; 9989 } 9990 public static final BitSet _tokenSet_49 = new BitSet(mk_tokenSet_49()); 9991 private static final long[] mk_tokenSet_50() { 9992 long[] data = new long[8]; 9993 data[0]=575898352105816064L; 9994 data[2]=4398046511104L; 9995 data[3]=33024L; 9996 return data; 9997 } 9998 public static final BitSet _tokenSet_50 = new BitSet(mk_tokenSet_50()); 9999 private static final long[] mk_tokenSet_51() { 10000 long[] data = new long[8]; 10001 data[0]=1152499292141780992L; 10002 data[1]=9007199254740992L; 10003 data[2]=13194139533312L; 10004 data[3]=33024L; 10005 return data; 10006 } 10007 public static final BitSet _tokenSet_51 = new BitSet(mk_tokenSet_51()); 10008 private static final long[] mk_tokenSet_52() { 10009 long[] data = new long[8]; 10010 data[0]=864726312827224064L; 10011 data[1]=1280L; 10012 data[3]=33024L; 10013 return data; 10014 } 10015 public static final BitSet _tokenSet_52 = new BitSet(mk_tokenSet_52()); 10016 private static final long[] mk_tokenSet_53() { 10017 long[] data = { 576495936675512320L, 1280L, 0L, 0L}; 10018 return data; 10019 } 10020 public static final BitSet _tokenSet_53 = new BitSet(mk_tokenSet_53()); 10021 private static final long[] mk_tokenSet_54() { 10022 long[] data = { 0L, 9007199254790144L, 0L, 0L}; 10023 return data; 10024 } 10025 public static final BitSet _tokenSet_54 = new BitSet(mk_tokenSet_54()); 10026 private static final long[] mk_tokenSet_55() { 10027 long[] data = new long[8]; 10028 data[0]=575897802350002176L; 10029 data[1]=1747431839791894528L; 10030 data[2]=4398046511104L; 10031 data[3]=33024L; 10032 return data; 10033 } 10034 public static final BitSet _tokenSet_55 = new BitSet(mk_tokenSet_55()); 10035 private static final long[] mk_tokenSet_56() { 10036 long[] data = new long[8]; 10037 data[0]=575897802350002176L; 10038 data[1]=53248L; 10039 data[2]=4398046543840L; 10040 data[3]=41216L; 10041 return data; 10042 } 10043 public static final BitSet _tokenSet_56 = new BitSet(mk_tokenSet_56()); 10044 private static final long[] mk_tokenSet_57() { 10045 long[] data = new long[8]; 10046 data[0]=1152499292141780992L; 10047 data[1]=6926536226929430528L; 10048 data[2]=4398046543870L; 10049 data[3]=57600L; 10050 return data; 10051 } 10052 public static final BitSet _tokenSet_57 = new BitSet(mk_tokenSet_57()); 10053 private static final long[] mk_tokenSet_58() { 10054 long[] data = new long[8]; 10055 data[0]=2305420796748627968L; 10056 data[1]=-17146187776L; 10057 data[2]=2256197860229119L; 10058 data[3]=57600L; 10059 return data; 10060 } 10061 public static final BitSet _tokenSet_58 = new BitSet(mk_tokenSet_58()); 10062 private static final long[] mk_tokenSet_59() { 10063 long[] data = new long[8]; 10064 data[0]=-101704825569280L; 10065 data[1]=-12885035073L; 10066 data[2]=11263397156913151L; 10067 data[3]=41216L; 10068 return data; 10069 } 10070 public static final BitSet _tokenSet_59 = new BitSet(mk_tokenSet_59()); 10071 private static final long[] mk_tokenSet_60() { 10072 long[] data = new long[8]; 10073 data[0]=-84112639524862L; 10074 data[1]=-133185L; 10075 data[2]=11272193249935359L; 10076 data[3]=57600L; 10077 return data; 10078 } 10079 public static final BitSet _tokenSet_60 = new BitSet(mk_tokenSet_60()); 10080 private static final long[] mk_tokenSet_61() { 10081 long[] data = new long[8]; 10082 data[0]=-101704825569280L; 10083 data[1]=-12885035073L; 10084 data[2]=2256197902172159L; 10085 data[3]=57600L; 10086 return data; 10087 } 10088 public static final BitSet _tokenSet_61 = new BitSet(mk_tokenSet_61()); 10089 private static final long[] mk_tokenSet_62() { 10090 long[] data = new long[8]; 10091 data[0]=864831865943490560L; 10092 data[1]=9007199254757376L; 10093 data[2]=4398046511104L; 10094 data[3]=33024L; 10095 return data; 10096 } 10097 public static final BitSet _tokenSet_62 = new BitSet(mk_tokenSet_62()); 10098 private static final long[] mk_tokenSet_63() { 10099 long[] data = new long[8]; 10100 data[0]=288230376151711744L; 10101 data[1]=16384L; 10102 data[3]=33024L; 10103 return data; 10104 } 10105 public static final BitSet _tokenSet_63 = new BitSet(mk_tokenSet_63()); 10106 private static final long[] mk_tokenSet_64() { 10107 long[] data = { 576601489791778816L, 9216L, 4398046511104L, 0L, 0L, 0L}; 10108 return data; 10109 } 10110 public static final BitSet _tokenSet_64 = new BitSet(mk_tokenSet_64()); 10111 private static final long[] mk_tokenSet_65() { 10112 long[] data = new long[8]; 10113 data[0]=-576984669594058752L; 10114 data[1]=-9007194959973569L; 10115 data[2]=4398054932479L; 10116 data[3]=41216L; 10117 return data; 10118 } 10119 public static final BitSet _tokenSet_65 = new BitSet(mk_tokenSet_65()); 10120 private static final long[] mk_tokenSet_66() { 10121 long[] data = new long[8]; 10122 data[0]=-101704825569280L; 10123 data[1]=-133185L; 10124 data[2]=11263397156913151L; 10125 data[3]=57600L; 10126 return data; 10127 } 10128 public static final BitSet _tokenSet_66 = new BitSet(mk_tokenSet_66()); 10129 private static final long[] mk_tokenSet_67() { 10130 long[] data = new long[8]; 10131 data[0]=-1729941358572994560L; 10132 data[1]=1073741855L; 10133 data[2]=4398046511104L; 10134 data[3]=33024L; 10135 return data; 10136 } 10137 public static final BitSet _tokenSet_67 = new BitSet(mk_tokenSet_67()); 10138 private static final long[] mk_tokenSet_68() { 10139 long[] data = new long[8]; 10140 data[0]=-1153339868781215744L; 10141 data[1]=9007200328482847L; 10142 data[2]=4398046511104L; 10143 data[3]=33024L; 10144 return data; 10145 } 10146 public static final BitSet _tokenSet_68 = new BitSet(mk_tokenSet_68()); 10147 private static final long[] mk_tokenSet_69() { 10148 long[] data = new long[8]; 10149 data[0]=-383179802279936L; 10150 data[1]=-12885036225L; 10151 data[2]=11263397123358719L; 10152 data[3]=57600L; 10153 return data; 10154 } 10155 public static final BitSet _tokenSet_69 = new BitSet(mk_tokenSet_69()); 10156 private static final long[] mk_tokenSet_70() { 10157 long[] data = { -2305839160922996736L, 1073741887L, 4398046511104L, 0L, 0L, 0L}; 10158 return data; 10159 } 10160 public static final BitSet _tokenSet_70 = new BitSet(mk_tokenSet_70()); 10161 private static final long[] mk_tokenSet_71() { 10162 long[] data = new long[8]; 10163 data[0]=-2017608784771284992L; 10164 data[1]=1073741887L; 10165 data[2]=4398046511104L; 10166 data[3]=33024L; 10167 return data; 10168 } 10169 public static final BitSet _tokenSet_71 = new BitSet(mk_tokenSet_71()); 10170 private static final long[] mk_tokenSet_72() { 10171 long[] data = new long[8]; 10172 data[0]=-1729906174200905728L; 10173 data[1]=6917529028748431391L; 10174 data[2]=4398046543870L; 10175 data[3]=41216L; 10176 return data; 10177 } 10178 public static final BitSet _tokenSet_72 = new BitSet(mk_tokenSet_72()); 10179 private static final long[] mk_tokenSet_73() { 10180 long[] data = new long[8]; 10181 data[0]=-383179802279936L; 10182 data[1]=-16072444897L; 10183 data[2]=11263397114970111L; 10184 data[3]=57600L; 10185 return data; 10186 } 10187 public static final BitSet _tokenSet_73 = new BitSet(mk_tokenSet_73()); 10188 private static final long[] mk_tokenSet_74() { 10189 long[] data = new long[8]; 10190 data[0]=2305456530876530688L; 10191 data[1]=-17146186752L; 10192 data[2]=11263397114970111L; 10193 data[3]=57600L; 10194 return data; 10195 } 10196 public static final BitSet _tokenSet_74 = new BitSet(mk_tokenSet_74()); 10197 private static final long[] mk_tokenSet_75() { 10198 long[] data = new long[8]; 10199 data[0]=575897802350002176L; 10200 data[1]=6917529027674951680L; 10201 data[2]=9011597301284862L; 10202 data[3]=41216L; 10203 return data; 10204 } 10205 public static final BitSet _tokenSet_75 = new BitSet(mk_tokenSet_75()); 10206 private static final long[] mk_tokenSet_76() { 10207 long[] data = { 0L, 1610613248L, 0L, 0L}; 10208 return data; 10209 } 10210 public static final BitSet _tokenSet_76 = new BitSet(mk_tokenSet_76()); 10211 private static final long[] mk_tokenSet_77() { 10212 long[] data = new long[8]; 10213 data[0]=-576703194617348096L; 10214 data[1]=-12885035073L; 10215 data[2]=9011597343227903L; 10216 data[3]=41216L; 10217 return data; 10218 } 10219 public static final BitSet _tokenSet_77 = new BitSet(mk_tokenSet_77()); 10220 private static final long[] mk_tokenSet_78() { 10221 long[] data = new long[8]; 10222 data[0]=-1729906174200905728L; 10223 data[1]=6917529031667405631L; 10224 data[2]=4398054932478L; 10225 data[3]=41216L; 10226 return data; 10227 } 10228 public static final BitSet _tokenSet_78 = new BitSet(mk_tokenSet_78()); 10229 private static final long[] mk_tokenSet_79() { 10230 long[] data = new long[8]; 10231 data[0]=-383179802279936L; 10232 data[1]=-13153471681L; 10233 data[2]=11263397123358719L; 10234 data[3]=57600L; 10235 return data; 10236 } 10237 public static final BitSet _tokenSet_79 = new BitSet(mk_tokenSet_79()); 10238 private static final long[] mk_tokenSet_80() { 10239 long[] data = new long[8]; 10240 data[0]=575898352105816064L; 10241 data[1]=53248L; 10242 data[2]=4398046543840L; 10243 data[3]=41216L; 10244 return data; 10245 } 10246 public static final BitSet _tokenSet_80 = new BitSet(mk_tokenSet_80()); 10247 private static final long[] mk_tokenSet_81() { 10248 long[] data = new long[8]; 10249 data[0]=1152499292141780992L; 10250 data[1]=9007199254740992L; 10251 data[2]=4398046511104L; 10252 data[3]=33024L; 10253 return data; 10254 } 10255 public static final BitSet _tokenSet_81 = new BitSet(mk_tokenSet_81()); 10256 private static final long[] mk_tokenSet_82() { 10257 long[] data = new long[8]; 10258 data[0]=1152534476513869824L; 10259 data[1]=6926536226929438720L; 10260 data[2]=4398046543870L; 10261 data[3]=57600L; 10262 return data; 10263 } 10264 public static final BitSet _tokenSet_82 = new BitSet(mk_tokenSet_82()); 10265 private static final long[] mk_tokenSet_83() { 10266 long[] data = new long[8]; 10267 data[0]=-101704825569280L; 10268 data[1]=-12885035073L; 10269 data[2]=9011597343227903L; 10270 data[3]=41216L; 10271 return data; 10272 } 10273 public static final BitSet _tokenSet_83 = new BitSet(mk_tokenSet_83()); 10274 private static final long[] mk_tokenSet_84() { 10275 long[] data = { 1152921504606846976L, -9223372036854775808L, 1L, 0L, 0L, 0L}; 10276 return data; 10277 } 10278 public static final BitSet _tokenSet_84 = new BitSet(mk_tokenSet_84()); 10279 private static final long[] mk_tokenSet_85() { 10280 long[] data = new long[8]; 10281 data[0]=575897802350002176L; 10282 data[1]=6917529027674697728L; 10283 data[2]=4398046543870L; 10284 data[3]=41216L; 10285 return data; 10286 } 10287 public static final BitSet _tokenSet_85 = new BitSet(mk_tokenSet_85()); 10288 private static final long[] mk_tokenSet_86() { 10289 long[] data = new long[8]; 10290 data[0]=575897802350002176L; 10291 data[1]=6917529027674691328L; 10292 data[2]=4398046543870L; 10293 data[3]=41216L; 10294 return data; 10295 } 10296 public static final BitSet _tokenSet_86 = new BitSet(mk_tokenSet_86()); 10297 private static final long[] mk_tokenSet_87() { 10298 long[] data = new long[8]; 10299 data[0]=576179277326712832L; 10300 data[1]=6917529027674689536L; 10301 data[2]=4398046543870L; 10302 data[3]=41216L; 10303 return data; 10304 } 10305 public static final BitSet _tokenSet_87 = new BitSet(mk_tokenSet_87()); 10306 private static final long[] mk_tokenSet_88() { 10307 long[] data = new long[8]; 10308 data[0]=575898352105816064L; 10309 data[1]=24576L; 10310 data[2]=4398046511104L; 10311 data[3]=33024L; 10312 return data; 10313 } 10314 public static final BitSet _tokenSet_88 = new BitSet(mk_tokenSet_88()); 10315 private static final long[] mk_tokenSet_89() { 10316 long[] data = new long[8]; 10317 data[0]=1152499292141780992L; 10318 data[1]=9007199254766592L; 10319 data[2]=9020393394274304L; 10320 data[3]=33024L; 10321 return data; 10322 } 10323 public static final BitSet _tokenSet_89 = new BitSet(mk_tokenSet_89()); 10324 10325 }