| 1 2 package org.jboss.aop.pointcut.ast; 3 4 import java.lang.reflect.Modifier ; 5 6 public class TypeExpressionParserimplements TypeExpressionParserTreeConstants, TypeExpressionParserConstants { 7 protected JJTTypeExpressionParserState jjtree = new JJTTypeExpressionParserState(); 8 9 final public ASTStart Start() throws ParseException { 10 11 ASTStart jjtn000 = new ASTStart(JJTSTART); 12 boolean jjtc000 = true; 13 jjtree.openNodeScope(jjtn000); 14 try { 15 Expression(); 16 jj_consume_token(0); 17 jjtree.closeNodeScope(jjtn000, true); 18 jjtc000 = false; 19 {if (true) return jjtn000;} 20 } catch (Throwable jjte000) { 21 if (jjtc000) { 22 jjtree.clearNodeScope(jjtn000); 23 jjtc000 = false; 24 } else { 25 jjtree.popNode(); 26 } 27 if (jjte000 instanceof RuntimeException ) { 28 {if (true) throw (RuntimeException )jjte000;} 29 } 30 if (jjte000 instanceof ParseException) { 31 {if (true) throw (ParseException)jjte000;} 32 } 33 {if (true) throw (Error )jjte000;} 34 } finally { 35 if (jjtc000) { 36 jjtree.closeNodeScope(jjtn000, true); 37 } 38 } 39 throw new Error ("Missing return statement in function"); 40 } 41 42 final public void Expression() throws ParseException { 43 if (jj_2_1(234234234)) { 44 BooleanExpression(); 45 } else { 46 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 47 case HAS: 48 case HAS_FIELD: 49 case FIELD: 50 case CLASS_EXPR: 51 case METHOD_EXPR: 52 case CONSTRUCTOR_EXPR: 53 Concrete(); 54 break; 55 case NOT: 56 Not(); 57 break; 58 default: 59 jj_la1[0] = jj_gen; 60 jj_consume_token(-1); 61 throw new ParseException(); 62 } 63 } 64 } 65 66 final public void BooleanExpression() throws ParseException { 67 68 ASTBoolean jjtn000 = new ASTBoolean(JJTBOOLEAN); 69 boolean jjtc000 = true; 70 jjtree.openNodeScope(jjtn000); 71 try { 72 if (jj_2_2(3)) { 73 SubExpression(); 74 } else if (jj_2_3(3)) { 75 CompositeExpression(); 76 } else { 77 jj_consume_token(-1); 78 throw new ParseException(); 79 } 80 } catch (Throwable jjte000) { 81 if (jjtc000) { 82 jjtree.clearNodeScope(jjtn000); 83 jjtc000 = false; 84 } else { 85 jjtree.popNode(); 86 } 87 if (jjte000 instanceof RuntimeException ) { 88 {if (true) throw (RuntimeException )jjte000;} 89 } 90 if (jjte000 instanceof ParseException) { 91 {if (true) throw (ParseException)jjte000;} 92 } 93 {if (true) throw (Error )jjte000;} 94 } finally { 95 if (jjtc000) { 96 jjtree.closeNodeScope(jjtn000, true); 97 } 98 } 99 } 100 101 final public void CompositeExpression() throws ParseException { 102 103 ASTComposite jjtn000 = new ASTComposite(JJTCOMPOSITE); 104 boolean jjtc000 = true; 105 jjtree.openNodeScope(jjtn000); 106 try { 107 jj_consume_token(75); 108 SubExpression(); 109 jj_consume_token(76); 110 } catch (Throwable jjte000) { 111 if (jjtc000) { 112 jjtree.clearNodeScope(jjtn000); 113 jjtc000 = false; 114 } else { 115 jjtree.popNode(); 116 } 117 if (jjte000 instanceof RuntimeException ) { 118 {if (true) throw (RuntimeException )jjte000;} 119 } 120 if (jjte000 instanceof ParseException) { 121 {if (true) throw (ParseException)jjte000;} 122 } 123 {if (true) throw (Error )jjte000;} 124 } finally { 125 if (jjtc000) { 126 jjtree.closeNodeScope(jjtn000, true); 127 } 128 } 129 } 130 131 final public void Not() throws ParseException { 132 133 ASTNot jjtn000 = new ASTNot(JJTNOT); 134 boolean jjtc000 = true; 135 jjtree.openNodeScope(jjtn000); 136 try { 137 jj_consume_token(NOT); 138 if (jj_2_4(3)) { 139 ConcreteExpression(); 140 } else if (jj_2_5(3)) { 141 CompositeExpression(); 142 } else { 143 jj_consume_token(-1); 144 throw new ParseException(); 145 } 146 } catch (Throwable jjte000) { 147 if (jjtc000) { 148 jjtree.clearNodeScope(jjtn000); 149 jjtc000 = false; 150 } else { 151 jjtree.popNode(); 152 } 153 if (jjte000 instanceof RuntimeException ) { 154 {if (true) throw (RuntimeException )jjte000;} 155 } 156 if (jjte000 instanceof ParseException) { 157 {if (true) throw (ParseException)jjte000;} 158 } 159 {if (true) throw (Error )jjte000;} 160 } finally { 161 if (jjtc000) { 162 jjtree.closeNodeScope(jjtn000, true); 163 } 164 } 165 } 166 167 final public void SubExpression() throws ParseException { 168 169 ASTSub jjtn000 = new ASTSub(JJTSUB); 170 boolean jjtc000 = true; 171 jjtree.openNodeScope(jjtn000); 172 try { 173 if (jj_2_6(3)) { 174 Not(); 175 } else if (jj_2_7(3)) { 176 ConcreteExpression(); 177 } else if (jj_2_8(3)) { 178 CompositeExpression(); 179 } else { 180 jj_consume_token(-1); 181 throw new ParseException(); 182 } 183 label_1: 184 while (true) { 185 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 186 case AND: 187 And(); 188 break; 189 case OR: 190 Or(); 191 break; 192 default: 193 jj_la1[1] = jj_gen; 194 jj_consume_token(-1); 195 throw new ParseException(); 196 } 197 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 198 case AND: 199 case OR: 200 ; 201 break; 202 default: 203 jj_la1[2] = jj_gen; 204 break label_1; 205 } 206 } 207 } catch (Throwable jjte000) { 208 if (jjtc000) { 209 jjtree.clearNodeScope(jjtn000); 210 jjtc000 = false; 211 } else { 212 jjtree.popNode(); 213 } 214 if (jjte000 instanceof RuntimeException ) { 215 {if (true) throw (RuntimeException )jjte000;} 216 } 217 if (jjte000 instanceof ParseException) { 218 {if (true) throw (ParseException)jjte000;} 219 } 220 {if (true) throw (Error )jjte000;} 221 } finally { 222 if (jjtc000) { 223 jjtree.closeNodeScope(jjtn000, true); 224 } 225 } 226 } 227 228 final public void And() throws ParseException { 229 230 ASTAnd jjtn000 = new ASTAnd(JJTAND); 231 boolean jjtc000 = true; 232 jjtree.openNodeScope(jjtn000); 233 try { 234 jj_consume_token(AND); 235 if (jj_2_9(3)) { 236 ConcreteExpression(); 237 } else if (jj_2_10(3)) { 238 CompositeExpression(); 239 } else if (jj_2_11(3)) { 240 Not(); 241 } else { 242 jj_consume_token(-1); 243 throw new ParseException(); 244 } 245 } catch (Throwable jjte000) { 246 if (jjtc000) { 247 jjtree.clearNodeScope(jjtn000); 248 jjtc000 = false; 249 } else { 250 jjtree.popNode(); 251 } 252 if (jjte000 instanceof RuntimeException ) { 253 {if (true) throw (RuntimeException )jjte000;} 254 } 255 if (jjte000 instanceof ParseException) { 256 {if (true) throw (ParseException)jjte000;} 257 } 258 {if (true) throw (Error )jjte000;} 259 } finally { 260 if (jjtc000) { 261 jjtree.closeNodeScope(jjtn000, true); 262 } 263 } 264 } 265 266 final public void Or() throws ParseException { 267 268 ASTOr jjtn000 = new ASTOr(JJTOR); 269 boolean jjtc000 = true; 270 jjtree.openNodeScope(jjtn000); 271 try { 272 jj_consume_token(OR); 273 if (jj_2_12(3)) { 274 ConcreteExpression(); 275 } else if (jj_2_13(3)) { 276 CompositeExpression(); 277 } else if (jj_2_14(3)) { 278 Not(); 279 } else { 280 jj_consume_token(-1); 281 throw new ParseException(); 282 } 283 } catch (Throwable jjte000) { 284 if (jjtc000) { 285 jjtree.clearNodeScope(jjtn000); 286 jjtc000 = false; 287 } else { 288 jjtree.popNode(); 289 } 290 if (jjte000 instanceof RuntimeException ) { 291 {if (true) throw (RuntimeException )jjte000;} 292 } 293 if (jjte000 instanceof ParseException) { 294 {if (true) throw (ParseException)jjte000;} 295 } 296 {if (true) throw (Error )jjte000;} 297 } finally { 298 if (jjtc000) { 299 jjtree.closeNodeScope(jjtn000, true); 300 } 301 } 302 } 303 304 final public void ConcreteExpression() throws ParseException { 305 Concrete(); 306 } 307 308 final public void Concrete() throws ParseException { 309 if (jj_2_15(4)) { 310 Class(); 311 } else if (jj_2_16(4)) { 312 MethodWrapper(); 313 } else if (jj_2_17(4)) { 314 FieldWrapper(); 315 } else if (jj_2_18(4)) { 316 ConstructorWrapper(); 317 } else if (jj_2_19(4)) { 318 Has(); 319 } else if (jj_2_20(4)) { 320 HasField(); 321 } else { 322 jj_consume_token(-1); 323 throw new ParseException(); 324 } 325 } 326 327 final public void Has() throws ParseException { 328 329 ASTHas jjtn000 = new ASTHas(JJTHAS); 330 boolean jjtc000 = true; 331 jjtree.openNodeScope(jjtn000); 332 try { 333 jj_consume_token(HAS); 334 if (jj_2_21(4)) { 335 Method(); 336 } else if (jj_2_22(4)) { 337 Constructor(); 338 } else { 339 jj_consume_token(-1); 340 throw new ParseException(); 341 } 342 jj_consume_token(BEHAVIOR_CLOSE); 343 } catch (Throwable jjte000) { 344 if (jjtc000) { 345 jjtree.clearNodeScope(jjtn000); 346 jjtc000 = false; 347 } else { 348 jjtree.popNode(); 349 } 350 if (jjte000 instanceof RuntimeException ) { 351 {if (true) throw (RuntimeException )jjte000;} 352 } 353 if (jjte000 instanceof ParseException) { 354 {if (true) throw (ParseException)jjte000;} 355 } 356 {if (true) throw (Error )jjte000;} 357 } finally { 358 if (jjtc000) { 359 jjtree.closeNodeScope(jjtn000, true); 360 } 361 } 362 } 363 364 final public void HasField() throws ParseException { 365 366 ASTHasField jjtn000 = new ASTHasField(JJTHASFIELD); 367 boolean jjtc000 = true; 368 jjtree.openNodeScope(jjtn000); 369 try { 370 jj_consume_token(HAS_FIELD); 371 Field(); 372 jj_consume_token(FIELD_CLOSE); 373 } catch (Throwable jjte000) { 374 if (jjtc000) { 375 jjtree.clearNodeScope(jjtn000); 376 jjtc000 = false; 377 } else { 378 jjtree.popNode(); 379 } 380 if (jjte000 instanceof RuntimeException ) { 381 {if (true) throw (RuntimeException )jjte000;} 382 } 383 if (jjte000 instanceof ParseException) { 384 {if (true) throw (ParseException)jjte000;} 385 } 386 {if (true) throw (Error )jjte000;} 387 } finally { 388 if (jjtc000) { 389 jjtree.closeNodeScope(jjtn000, true); 390 } 391 } 392 } 393 394 final public void FieldWrapper() throws ParseException { 395 jj_consume_token(FIELD); 396 Field(); 397 jj_consume_token(FIELD_CLOSE); 398 } 399 400 final public void MethodWrapper() throws ParseException { 401 jj_consume_token(METHOD_EXPR); 402 Method(); 403 jj_consume_token(BEHAVIOR_CLOSE); 404 } 405 406 final public void ConstructorWrapper() throws ParseException { 407 jj_consume_token(CONSTRUCTOR_EXPR); 408 Constructor(); 409 jj_consume_token(BEHAVIOR_CLOSE); 410 } 411 412 final public void Method() throws ParseException { 413 414 ASTMethod jjtn000 = new ASTMethod(JJTMETHOD); 415 boolean jjtc000 = true; 416 jjtree.openNodeScope(jjtn000);Token ret, clazz, body; 417 try { 418 label_2: 419 while (true) { 420 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 421 case ABSTRACT: 422 case FINAL: 423 case PRIVATE: 424 case PROTECTED: 425 case PUBLIC: 426 case STATIC: 427 case NATIVE: 428 case SYNCHRONIZED: 429 case BEHAVIOR_NOT: 430 ; 431 break; 432 default: 433 jj_la1[3] = jj_gen; 434 break label_2; 435 } 436 Attribute(); 437 } 438 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 439 case CLASS: 440 ret = jj_consume_token(CLASS); 441 break; 442 case IDENTIFIER: 443 ret = jj_consume_token(IDENTIFIER); 444 break; 445 case ANNOTATION: 446 ret = jj_consume_token(ANNOTATION); 447 break; 448 case ARRAY_CLASS: 449 ret = jj_consume_token(ARRAY_CLASS); 450 break; 451 case INSTANCEOF: 452 ret = jj_consume_token(INSTANCEOF); 453 break; 454 case TYPEDEF: 455 ret = jj_consume_token(TYPEDEF); 456 break; 457 default: 458 jj_la1[4] = jj_gen; 459 jj_consume_token(-1); 460 throw new ParseException(); 461 } 462 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 463 case CLASS: 464 clazz = jj_consume_token(CLASS); 465 break; 466 case IDENTIFIER: 467 clazz = jj_consume_token(IDENTIFIER); 468 break; 469 case ANNOTATION: 470 clazz = jj_consume_token(ANNOTATION); 471 break; 472 case INSTANCEOF: 473 clazz = jj_consume_token(INSTANCEOF); 474 break; 475 case TYPEDEF: 476 clazz = jj_consume_token(TYPEDEF); 477 break; 478 default: 479 jj_la1[5] = jj_gen; 480 jj_consume_token(-1); 481 throw new ParseException(); 482 } 483 jj_consume_token(SEPARATOR); 484 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 485 case IDENTIFIER: 486 body = jj_consume_token(IDENTIFIER); 487 break; 488 case ANNOTATION: 489 body = jj_consume_token(ANNOTATION); 490 break; 491 default: 492 jj_la1[6] = jj_gen; 493 jj_consume_token(-1); 494 throw new ParseException(); 495 } 496 Parameters(); 497 Throws(); 498 jjtree.closeNodeScope(jjtn000, true); 499 jjtc000 = false; 500 jjtn000.setReturnTypeExpression(ret.image); 501 jjtn000.setClassExpression(clazz.image); 502 jjtn000.setMethodExpression(body.image); 503 } catch (Throwable jjte000) { 504 if (jjtc000) { 505 jjtree.clearNodeScope(jjtn000); 506 jjtc000 = false; 507 } else { 508 jjtree.popNode(); 509 } 510 if (jjte000 instanceof RuntimeException ) { 511 {if (true) throw (RuntimeException )jjte000;} 512 } 513 if (jjte000 instanceof ParseException) { 514 {if (true) throw (ParseException)jjte000;} 515 } 516 {if (true) throw (Error )jjte000;} 517 } finally { 518 if (jjtc000) { 519 jjtree.closeNodeScope(jjtn000, true); 520 } 521 } 522 } 523 524 final public void Attribute() throws ParseException { 525 526 ASTAttribute jjtn000 = new ASTAttribute(JJTATTRIBUTE); 527 boolean jjtc000 = true; 528 jjtree.openNodeScope(jjtn000); 529 try { 530 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 531 case BEHAVIOR_NOT: 532 jj_consume_token(BEHAVIOR_NOT); 533 jjtn000.not=true; 534 break; 535 default: 536 jj_la1[7] = jj_gen; 537 ; 538 } 539 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 540 case PUBLIC: 541 jj_consume_token(PUBLIC); 542 jjtree.closeNodeScope(jjtn000, true); 543 jjtc000 = false; 544 jjtn000.setValue(Modifier.PUBLIC); 545 break; 546 case PROTECTED: 547 jj_consume_token(PROTECTED); 548 jjtree.closeNodeScope(jjtn000, true); 549 jjtc000 = false; 550 jjtn000.setValue(Modifier.PROTECTED); 551 break; 552 case PRIVATE: 553 jj_consume_token(PRIVATE); 554 jjtree.closeNodeScope(jjtn000, true); 555 jjtc000 = false; 556 jjtn000.setValue(Modifier.PRIVATE); 557 break; 558 case STATIC: 559 jj_consume_token(STATIC); 560 jjtree.closeNodeScope(jjtn000, true); 561 jjtc000 = false; 562 jjtn000.setValue(Modifier.STATIC); 563 break; 564 case ABSTRACT: 565 jj_consume_token(ABSTRACT); 566 jjtree.closeNodeScope(jjtn000, true); 567 jjtc000 = false; 568 jjtn000.setValue(Modifier.ABSTRACT); 569 break; 570 case FINAL: 571 jj_consume_token(FINAL); 572 jjtree.closeNodeScope(jjtn000, true); 573 jjtc000 = false; 574 jjtn000.setValue(Modifier.FINAL); 575 break; 576 case NATIVE: 577 jj_consume_token(NATIVE); 578 jjtree.closeNodeScope(jjtn000, true); 579 jjtc000 = false; 580 jjtn000.setValue(Modifier.NATIVE); 581 break; 582 case SYNCHRONIZED: 583 jj_consume_token(SYNCHRONIZED); 584 jjtree.closeNodeScope(jjtn000, true); 585 jjtc000 = false; 586 jjtn000.setValue(Modifier.SYNCHRONIZED); 587 break; 588 default: 589 jj_la1[8] = jj_gen; 590 jj_consume_token(-1); 591 throw new ParseException(); 592 } 593 } finally { 594 if (jjtc000) { 595 jjtree.closeNodeScope(jjtn000, true); 596 } 597 } 598 } 599 600 final public void Constructor() throws ParseException { 601 602 ASTConstructor jjtn000 = new ASTConstructor(JJTCONSTRUCTOR); 603 boolean jjtc000 = true; 604 jjtree.openNodeScope(jjtn000);Token clazz, danew; 605 try { 606 label_3: 607 while (true) { 608 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 609 case PRIVATE: 610 case PROTECTED: 611 case PUBLIC: 612 ; 613 break; 614 default: 615 jj_la1[9] = jj_gen; 616 break label_3; 617 } 618 ConstructorAttribute(); 619 } 620 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 621 case CLASS: 622 clazz = jj_consume_token(CLASS); 623 break; 624 case IDENTIFIER: 625 clazz = jj_consume_token(IDENTIFIER); 626 break; 627 case ANNOTATION: 628 clazz = jj_consume_token(ANNOTATION); 629 break; 630 case INSTANCEOF: 631 clazz = jj_consume_token(INSTANCEOF); 632 break; 633 case TYPEDEF: 634 clazz = jj_consume_token(TYPEDEF); 635 break; 636 default: 637 jj_la1[10] = jj_gen; 638 jj_consume_token(-1); 639 throw new ParseException(); 640 } 641 jjtn000.setClassExpression(clazz.image); 642 jj_consume_token(SEPARATOR); 643 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { 644 case NEW: 645 danew = jj_consume_token(NEW); 646 break; 647 case ANNOTATION: 648 danew = jj_consume_token(ANNOTATION); 649 break; 650 default: 651 jj_la1[11] = jj_gen; 652 jj_consume_token(-1); 653 throw new ParseException(); 654 } 655 Parameters(); 656 Throws(); 657 jjtree.closeNodeScope(jjtn000, true); 658 jjtc000 = false; 659 jjtn000.setNewExpression(danew.image); 660 } catch (Throwable jjte000) { 661 if (jjtc000) { 662 jjtree.clearNodeScope(jjtn000); 663 jjtc000 = false; 664 } else { 665 jjtree.popNode(); 666 } 667 if (jjte000 instanceof RuntimeException ) { 668 {if (true) throw (RuntimeException )jjte000;} 669 } 670 if (jjte000 instanceof ParseException) { 671 {if (true) throw (ParseException)jjte000;} 672 } 673 {if (true) throw (Error )jjte000;} 674 } finally { 675 if (jjtc000) { 676 jjtree.closeNodeScope(jjtn000, true); 677 } 678 } 679 } 680 681 final public |