PageRenderTime 1657ms CodeModel.GetById 2ms app.highlight 129ms RepoModel.GetById 1ms app.codeStats 1ms

/jEdit/tags/jedit-4-0-pre5/bsh/Parser.java

#
Java | 2362 lines | 2230 code | 55 blank | 77 comment | 233 complexity | fce71613935ea032d5a13db4e555c30c MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/* Generated By:JJTree&JavaCC: Do not edit this line. Parser.java */
   2package bsh;
   3
   4import java.io.Reader;
   5
   6class Parser/*@bgen(jjtree)*/implements ParserTreeConstants, ParserConstants {/*@bgen(jjtree)*/
   7  protected JJTParserState jjtree = new JJTParserState();
   8        void jjtreeOpenNodeScope(Node n) {
   9                ((SimpleNode)n).firstToken = getToken(1);
  10        }
  11
  12        void jjtreeCloseNodeScope(Node n) {
  13                ((SimpleNode)n).lastToken = getToken(0);
  14        }
  15
  16        /**
  17		Re-initialize the input stream and token source.
  18	*/
  19        void reInitInput( Reader in ) {
  20                ReInit(in);
  21        }
  22
  23        /**
  24		Explicitly re-initialize just the token reader.
  25		This seems to be necessary to avoid certain looping errors when
  26		reading bogus input.  See Interpreter.
  27	*/
  28        void reInitTokenInput( Reader in ) {
  29                jj_input_stream.ReInit( in,
  30                        jj_input_stream.getEndLine(),
  31                        jj_input_stream.getEndColumn() );
  32        }
  33
  34  final public boolean Line() throws ParseException {
  35    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  36    case 0:
  37      jj_consume_token(0);
  38        Interpreter.debug("End of File!");
  39        {if (true) return true;}
  40      break;
  41    case BOOLEAN:
  42    case BREAK:
  43    case BYTE:
  44    case CHAR:
  45    case CONTINUE:
  46    case DO:
  47    case DOUBLE:
  48    case FALSE:
  49    case FINAL:
  50    case FLOAT:
  51    case FOR:
  52    case IF:
  53    case IMPORT:
  54    case INT:
  55    case LONG:
  56    case NEW:
  57    case NULL:
  58    case RETURN:
  59    case SHORT:
  60    case SWITCH:
  61    case THROW:
  62    case TRUE:
  63    case TRY:
  64    case VOID:
  65    case WHILE:
  66    case INTEGER_LITERAL:
  67    case FLOATING_POINT_LITERAL:
  68    case CHARACTER_LITERAL:
  69    case STRING_LITERAL:
  70    case IDENTIFIER:
  71    case LPAREN:
  72    case LBRACE:
  73    case SEMICOLON:
  74    case BANG:
  75    case TILDE:
  76    case INCR:
  77    case DECR:
  78    case PLUS:
  79    case MINUS:
  80      if (jj_2_1(2147483647)) {
  81        Expression();
  82        jj_consume_token(SEMICOLON);
  83      } else {
  84        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  85        case BOOLEAN:
  86        case BREAK:
  87        case BYTE:
  88        case CHAR:
  89        case CONTINUE:
  90        case DO:
  91        case DOUBLE:
  92        case FALSE:
  93        case FINAL:
  94        case FLOAT:
  95        case FOR:
  96        case IF:
  97        case IMPORT:
  98        case INT:
  99        case LONG:
 100        case NEW:
 101        case NULL:
 102        case RETURN:
 103        case SHORT:
 104        case SWITCH:
 105        case THROW:
 106        case TRUE:
 107        case TRY:
 108        case VOID:
 109        case WHILE:
 110        case INTEGER_LITERAL:
 111        case FLOATING_POINT_LITERAL:
 112        case CHARACTER_LITERAL:
 113        case STRING_LITERAL:
 114        case IDENTIFIER:
 115        case LPAREN:
 116        case LBRACE:
 117        case SEMICOLON:
 118        case INCR:
 119        case DECR:
 120          BlockStatement();
 121          break;
 122        default:
 123          jj_la1[0] = jj_gen;
 124          jj_consume_token(-1);
 125          throw new ParseException();
 126        }
 127      }
 128                {if (true) return false;}
 129      break;
 130    default:
 131      jj_la1[1] = jj_gen;
 132      jj_consume_token(-1);
 133      throw new ParseException();
 134    }
 135    throw new Error("Missing return statement in function");
 136  }
 137
 138/*****************************************
 139 * THE JAVA LANGUAGE GRAMMAR STARTS HERE *
 140 *****************************************/
 141  final public void MethodDeclaration() throws ParseException {
 142 /*@bgen(jjtree) MethodDeclaration */
 143  BSHMethodDeclaration jjtn000 = new BSHMethodDeclaration(JJTMETHODDECLARATION);
 144  boolean jjtc000 = true;
 145  jjtree.openNodeScope(jjtn000);
 146  jjtreeOpenNodeScope(jjtn000);Token t = null;
 147    try {
 148      if (jj_2_2(2147483647)) {
 149        ReturnType();
 150        t = jj_consume_token(IDENTIFIER);
 151                                    jjtn000.name = t.image;
 152        FormalParameters();
 153        Block();
 154      } else {
 155        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 156        case IDENTIFIER:
 157          t = jj_consume_token(IDENTIFIER);
 158                       jjtn000.name = t.image;
 159          FormalParameters();
 160          Block();
 161          break;
 162        default:
 163          jj_la1[2] = jj_gen;
 164          jj_consume_token(-1);
 165          throw new ParseException();
 166        }
 167      }
 168    } catch (Throwable jjte000) {
 169      if (jjtc000) {
 170        jjtree.clearNodeScope(jjtn000);
 171        jjtc000 = false;
 172      } else {
 173        jjtree.popNode();
 174      }
 175      if (jjte000 instanceof RuntimeException) {
 176        {if (true) throw (RuntimeException)jjte000;}
 177      }
 178      if (jjte000 instanceof ParseException) {
 179        {if (true) throw (ParseException)jjte000;}
 180      }
 181      {if (true) throw (Error)jjte000;}
 182    } finally {
 183      if (jjtc000) {
 184        jjtree.closeNodeScope(jjtn000, true);
 185        jjtreeCloseNodeScope(jjtn000);
 186      }
 187    }
 188  }
 189
 190  final public void MethodDeclarationLookahead() throws ParseException {
 191    if (jj_2_3(2147483647)) {
 192      ReturnType();
 193      jj_consume_token(IDENTIFIER);
 194      FormalParameters();
 195      jj_consume_token(LBRACE);
 196    } else {
 197      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 198      case IDENTIFIER:
 199        jj_consume_token(IDENTIFIER);
 200        FormalParameters();
 201        jj_consume_token(LBRACE);
 202        break;
 203      default:
 204        jj_la1[3] = jj_gen;
 205        jj_consume_token(-1);
 206        throw new ParseException();
 207      }
 208    }
 209  }
 210
 211  final public void MethodDeclarationTypeLookahead() throws ParseException {
 212    ReturnType();
 213    jj_consume_token(IDENTIFIER);
 214    jj_consume_token(LPAREN);
 215  }
 216
 217  final public void ImportDeclaration() throws ParseException {
 218 /*@bgen(jjtree) ImportDeclaration */
 219    BSHImportDeclaration jjtn000 = new BSHImportDeclaration(JJTIMPORTDECLARATION);
 220    boolean jjtc000 = true;
 221    jjtree.openNodeScope(jjtn000);
 222    jjtreeOpenNodeScope(jjtn000);Token t = null;
 223    try {
 224      if (jj_2_4(2)) {
 225        jj_consume_token(IMPORT);
 226        AmbiguousName();
 227        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 228        case DOT:
 229          t = jj_consume_token(DOT);
 230          jj_consume_token(STAR);
 231          break;
 232        default:
 233          jj_la1[4] = jj_gen;
 234          ;
 235        }
 236        jj_consume_token(SEMICOLON);
 237                                                 jjtree.closeNodeScope(jjtn000, true);
 238                                                 jjtc000 = false;
 239                                                 jjtreeCloseNodeScope(jjtn000);
 240    if ( t != null )
 241        jjtn000.importPackage = true;
 242      } else {
 243        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 244        case IMPORT:
 245          jj_consume_token(IMPORT);
 246          jj_consume_token(STAR);
 247          jj_consume_token(SEMICOLON);
 248                     jjtree.closeNodeScope(jjtn000, true);
 249                     jjtc000 = false;
 250                     jjtreeCloseNodeScope(jjtn000);
 251                jjtn000.superImport = true;
 252          break;
 253        default:
 254          jj_la1[5] = jj_gen;
 255          jj_consume_token(-1);
 256          throw new ParseException();
 257        }
 258      }
 259    } catch (Throwable jjte000) {
 260    if (jjtc000) {
 261      jjtree.clearNodeScope(jjtn000);
 262      jjtc000 = false;
 263    } else {
 264      jjtree.popNode();
 265    }
 266    if (jjte000 instanceof RuntimeException) {
 267      {if (true) throw (RuntimeException)jjte000;}
 268    }
 269    if (jjte000 instanceof ParseException) {
 270      {if (true) throw (ParseException)jjte000;}
 271    }
 272    {if (true) throw (Error)jjte000;}
 273    } finally {
 274    if (jjtc000) {
 275      jjtree.closeNodeScope(jjtn000, true);
 276      jjtreeCloseNodeScope(jjtn000);
 277    }
 278    }
 279  }
 280
 281  final public void VariableDeclarator() throws ParseException {
 282 /*@bgen(jjtree) VariableDeclarator */
 283  BSHVariableDeclarator jjtn000 = new BSHVariableDeclarator(JJTVARIABLEDECLARATOR);
 284  boolean jjtc000 = true;
 285  jjtree.openNodeScope(jjtn000);
 286  jjtreeOpenNodeScope(jjtn000);Token t;
 287    try {
 288      t = jj_consume_token(IDENTIFIER);
 289      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 290      case ASSIGN:
 291        jj_consume_token(ASSIGN);
 292        VariableInitializer();
 293        break;
 294      default:
 295        jj_la1[6] = jj_gen;
 296        ;
 297      }
 298                                                 jjtree.closeNodeScope(jjtn000, true);
 299                                                 jjtc000 = false;
 300                                                 jjtreeCloseNodeScope(jjtn000);
 301                                                 jjtn000.name = t.image;
 302    } catch (Throwable jjte000) {
 303    if (jjtc000) {
 304      jjtree.clearNodeScope(jjtn000);
 305      jjtc000 = false;
 306    } else {
 307      jjtree.popNode();
 308    }
 309    if (jjte000 instanceof RuntimeException) {
 310      {if (true) throw (RuntimeException)jjte000;}
 311    }
 312    if (jjte000 instanceof ParseException) {
 313      {if (true) throw (ParseException)jjte000;}
 314    }
 315    {if (true) throw (Error)jjte000;}
 316    } finally {
 317    if (jjtc000) {
 318      jjtree.closeNodeScope(jjtn000, true);
 319      jjtreeCloseNodeScope(jjtn000);
 320    }
 321    }
 322  }
 323
 324/*
 325Can get rid of this if we ignore postfix array dimensions in declarations.
 326I don't like them and I don't want to deal with them right now.
 327
 328void VariableDeclaratorId() #VariableDeclaratorId :
 329{ Token t; }
 330{
 331  t=<IDENTIFIER> { jjtThis.name = t.image; }
 332  ( "[" "]" { jjtThis.addArrayDimension(); } )*
 333}
 334*/
 335  final public void VariableInitializer() throws ParseException {
 336    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 337    case LBRACE:
 338      ArrayInitializer();
 339      break;
 340    case BOOLEAN:
 341    case BYTE:
 342    case CHAR:
 343    case DOUBLE:
 344    case FALSE:
 345    case FLOAT:
 346    case INT:
 347    case LONG:
 348    case NEW:
 349    case NULL:
 350    case SHORT:
 351    case TRUE:
 352    case VOID:
 353    case INTEGER_LITERAL:
 354    case FLOATING_POINT_LITERAL:
 355    case CHARACTER_LITERAL:
 356    case STRING_LITERAL:
 357    case IDENTIFIER:
 358    case LPAREN:
 359    case BANG:
 360    case TILDE:
 361    case INCR:
 362    case DECR:
 363    case PLUS:
 364    case MINUS:
 365      Expression();
 366      break;
 367    default:
 368      jj_la1[7] = jj_gen;
 369      jj_consume_token(-1);
 370      throw new ParseException();
 371    }
 372  }
 373
 374  final public void ArrayInitializer() throws ParseException {
 375 /*@bgen(jjtree) ArrayInitializer */
 376  BSHArrayInitializer jjtn000 = new BSHArrayInitializer(JJTARRAYINITIALIZER);
 377  boolean jjtc000 = true;
 378  jjtree.openNodeScope(jjtn000);
 379  jjtreeOpenNodeScope(jjtn000);
 380    try {
 381      jj_consume_token(LBRACE);
 382      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 383      case BOOLEAN:
 384      case BYTE:
 385      case CHAR:
 386      case DOUBLE:
 387      case FALSE:
 388      case FLOAT:
 389      case INT:
 390      case LONG:
 391      case NEW:
 392      case NULL:
 393      case SHORT:
 394      case TRUE:
 395      case VOID:
 396      case INTEGER_LITERAL:
 397      case FLOATING_POINT_LITERAL:
 398      case CHARACTER_LITERAL:
 399      case STRING_LITERAL:
 400      case IDENTIFIER:
 401      case LPAREN:
 402      case LBRACE:
 403      case BANG:
 404      case TILDE:
 405      case INCR:
 406      case DECR:
 407      case PLUS:
 408      case MINUS:
 409        VariableInitializer();
 410        label_1:
 411        while (true) {
 412          if (jj_2_5(2)) {
 413            ;
 414          } else {
 415            break label_1;
 416          }
 417          jj_consume_token(COMMA);
 418          VariableInitializer();
 419        }
 420        break;
 421      default:
 422        jj_la1[8] = jj_gen;
 423        ;
 424      }
 425      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 426      case COMMA:
 427        jj_consume_token(COMMA);
 428        break;
 429      default:
 430        jj_la1[9] = jj_gen;
 431        ;
 432      }
 433      jj_consume_token(RBRACE);
 434    } catch (Throwable jjte000) {
 435    if (jjtc000) {
 436      jjtree.clearNodeScope(jjtn000);
 437      jjtc000 = false;
 438    } else {
 439      jjtree.popNode();
 440    }
 441    if (jjte000 instanceof RuntimeException) {
 442      {if (true) throw (RuntimeException)jjte000;}
 443    }
 444    if (jjte000 instanceof ParseException) {
 445      {if (true) throw (ParseException)jjte000;}
 446    }
 447    {if (true) throw (Error)jjte000;}
 448    } finally {
 449    if (jjtc000) {
 450      jjtree.closeNodeScope(jjtn000, true);
 451      jjtreeCloseNodeScope(jjtn000);
 452    }
 453    }
 454  }
 455
 456  final public void FormalParameters() throws ParseException {
 457 /*@bgen(jjtree) FormalParameters */
 458  BSHFormalParameters jjtn000 = new BSHFormalParameters(JJTFORMALPARAMETERS);
 459  boolean jjtc000 = true;
 460  jjtree.openNodeScope(jjtn000);
 461  jjtreeOpenNodeScope(jjtn000);
 462    try {
 463      jj_consume_token(LPAREN);
 464      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 465      case BOOLEAN:
 466      case BYTE:
 467      case CHAR:
 468      case DOUBLE:
 469      case FLOAT:
 470      case INT:
 471      case LONG:
 472      case SHORT:
 473      case IDENTIFIER:
 474        FormalParameter();
 475        label_2:
 476        while (true) {
 477          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 478          case COMMA:
 479            ;
 480            break;
 481          default:
 482            jj_la1[10] = jj_gen;
 483            break label_2;
 484          }
 485          jj_consume_token(COMMA);
 486          FormalParameter();
 487        }
 488        break;
 489      default:
 490        jj_la1[11] = jj_gen;
 491        ;
 492      }
 493      jj_consume_token(RPAREN);
 494    } catch (Throwable jjte000) {
 495    if (jjtc000) {
 496      jjtree.clearNodeScope(jjtn000);
 497      jjtc000 = false;
 498    } else {
 499      jjtree.popNode();
 500    }
 501    if (jjte000 instanceof RuntimeException) {
 502      {if (true) throw (RuntimeException)jjte000;}
 503    }
 504    if (jjte000 instanceof ParseException) {
 505      {if (true) throw (ParseException)jjte000;}
 506    }
 507    {if (true) throw (Error)jjte000;}
 508    } finally {
 509    if (jjtc000) {
 510      jjtree.closeNodeScope(jjtn000, true);
 511      jjtreeCloseNodeScope(jjtn000);
 512    }
 513    }
 514  }
 515
 516/*
 517void FormalParameter() #FormalParameter :
 518{ Token t; }
 519{
 520    // added [] to Type for bsh.  Removed [ final ] - is that legal?
 521  [ LOOKAHEAD(2) Type() ] t=<IDENTIFIER> { jjtThis.name = t.image; }
 522}
 523*/
 524  final public void FormalParameter() throws ParseException {
 525 /*@bgen(jjtree) FormalParameter */
 526  BSHFormalParameter jjtn000 = new BSHFormalParameter(JJTFORMALPARAMETER);
 527  boolean jjtc000 = true;
 528  jjtree.openNodeScope(jjtn000);
 529  jjtreeOpenNodeScope(jjtn000);Token t;
 530    try {
 531      if (jj_2_6(2)) {
 532        Type();
 533        t = jj_consume_token(IDENTIFIER);
 534                                       jjtree.closeNodeScope(jjtn000, true);
 535                                       jjtc000 = false;
 536                                       jjtreeCloseNodeScope(jjtn000);
 537                                       jjtn000.name = t.image;
 538      } else {
 539        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 540        case IDENTIFIER:
 541          t = jj_consume_token(IDENTIFIER);
 542                   jjtree.closeNodeScope(jjtn000, true);
 543                   jjtc000 = false;
 544                   jjtreeCloseNodeScope(jjtn000);
 545                   jjtn000.name = t.image;
 546          break;
 547        default:
 548          jj_la1[12] = jj_gen;
 549          jj_consume_token(-1);
 550          throw new ParseException();
 551        }
 552      }
 553    } catch (Throwable jjte000) {
 554    if (jjtc000) {
 555      jjtree.clearNodeScope(jjtn000);
 556      jjtc000 = false;
 557    } else {
 558      jjtree.popNode();
 559    }
 560    if (jjte000 instanceof RuntimeException) {
 561      {if (true) throw (RuntimeException)jjte000;}
 562    }
 563    if (jjte000 instanceof ParseException) {
 564      {if (true) throw (ParseException)jjte000;}
 565    }
 566    {if (true) throw (Error)jjte000;}
 567    } finally {
 568    if (jjtc000) {
 569      jjtree.closeNodeScope(jjtn000, true);
 570      jjtreeCloseNodeScope(jjtn000);
 571    }
 572    }
 573  }
 574
 575/*
 576	Type, name and expression syntax follows.
 577*/
 578  final public void Type() throws ParseException {
 579 /*@bgen(jjtree) Type */
 580  BSHType jjtn000 = new BSHType(JJTTYPE);
 581  boolean jjtc000 = true;
 582  jjtree.openNodeScope(jjtn000);
 583  jjtreeOpenNodeScope(jjtn000);
 584    try {
 585      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 586      case BOOLEAN:
 587      case BYTE:
 588      case CHAR:
 589      case DOUBLE:
 590      case FLOAT:
 591      case INT:
 592      case LONG:
 593      case SHORT:
 594        PrimitiveType();
 595        break;
 596      case IDENTIFIER:
 597        AmbiguousName();
 598        break;
 599      default:
 600        jj_la1[13] = jj_gen;
 601        jj_consume_token(-1);
 602        throw new ParseException();
 603      }
 604      label_3:
 605      while (true) {
 606        if (jj_2_7(2)) {
 607          ;
 608        } else {
 609          break label_3;
 610        }
 611        jj_consume_token(LBRACKET);
 612        jj_consume_token(RBRACKET);
 613                                 jjtn000.addArrayDimension();
 614      }
 615    } catch (Throwable jjte000) {
 616    if (jjtc000) {
 617      jjtree.clearNodeScope(jjtn000);
 618      jjtc000 = false;
 619    } else {
 620      jjtree.popNode();
 621    }
 622    if (jjte000 instanceof RuntimeException) {
 623      {if (true) throw (RuntimeException)jjte000;}
 624    }
 625    if (jjte000 instanceof ParseException) {
 626      {if (true) throw (ParseException)jjte000;}
 627    }
 628    {if (true) throw (Error)jjte000;}
 629    } finally {
 630    if (jjtc000) {
 631      jjtree.closeNodeScope(jjtn000, true);
 632      jjtreeCloseNodeScope(jjtn000);
 633    }
 634    }
 635  }
 636
 637/*
 638	Originally called ResultType in the grammar
 639*/
 640  final public void ReturnType() throws ParseException {
 641 /*@bgen(jjtree) ReturnType */
 642  BSHReturnType jjtn000 = new BSHReturnType(JJTRETURNTYPE);
 643  boolean jjtc000 = true;
 644  jjtree.openNodeScope(jjtn000);
 645  jjtreeOpenNodeScope(jjtn000);
 646    try {
 647      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 648      case VOID:
 649        jj_consume_token(VOID);
 650           jjtree.closeNodeScope(jjtn000, true);
 651           jjtc000 = false;
 652           jjtreeCloseNodeScope(jjtn000);
 653           jjtn000.isVoid = true;
 654        break;
 655      case BOOLEAN:
 656      case BYTE:
 657      case CHAR:
 658      case DOUBLE:
 659      case FLOAT:
 660      case INT:
 661      case LONG:
 662      case SHORT:
 663      case IDENTIFIER:
 664        Type();
 665        break;
 666      default:
 667        jj_la1[14] = jj_gen;
 668        jj_consume_token(-1);
 669        throw new ParseException();
 670      }
 671    } catch (Throwable jjte000) {
 672    if (jjtc000) {
 673      jjtree.clearNodeScope(jjtn000);
 674      jjtc000 = false;
 675    } else {
 676      jjtree.popNode();
 677    }
 678    if (jjte000 instanceof RuntimeException) {
 679      {if (true) throw (RuntimeException)jjte000;}
 680    }
 681    if (jjte000 instanceof ParseException) {
 682      {if (true) throw (ParseException)jjte000;}
 683    }
 684    {if (true) throw (Error)jjte000;}
 685    } finally {
 686    if (jjtc000) {
 687      jjtree.closeNodeScope(jjtn000, true);
 688      jjtreeCloseNodeScope(jjtn000);
 689    }
 690    }
 691  }
 692
 693  final public void PrimitiveType() throws ParseException {
 694 /*@bgen(jjtree) PrimitiveType */
 695  BSHPrimitiveType jjtn000 = new BSHPrimitiveType(JJTPRIMITIVETYPE);
 696  boolean jjtc000 = true;
 697  jjtree.openNodeScope(jjtn000);
 698  jjtreeOpenNodeScope(jjtn000);
 699    try {
 700      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 701      case BOOLEAN:
 702        jj_consume_token(BOOLEAN);
 703            jjtree.closeNodeScope(jjtn000, true);
 704            jjtc000 = false;
 705            jjtreeCloseNodeScope(jjtn000);
 706            jjtn000.type = Boolean.TYPE;
 707        break;
 708      case CHAR:
 709        jj_consume_token(CHAR);
 710           jjtree.closeNodeScope(jjtn000, true);
 711           jjtc000 = false;
 712           jjtreeCloseNodeScope(jjtn000);
 713           jjtn000.type =  Character.TYPE;
 714        break;
 715      case BYTE:
 716        jj_consume_token(BYTE);
 717           jjtree.closeNodeScope(jjtn000, true);
 718           jjtc000 = false;
 719           jjtreeCloseNodeScope(jjtn000);
 720           jjtn000.type =  Byte.TYPE;
 721        break;
 722      case SHORT:
 723        jj_consume_token(SHORT);
 724            jjtree.closeNodeScope(jjtn000, true);
 725            jjtc000 = false;
 726            jjtreeCloseNodeScope(jjtn000);
 727            jjtn000.type =  Short.TYPE;
 728        break;
 729      case INT:
 730        jj_consume_token(INT);
 731          jjtree.closeNodeScope(jjtn000, true);
 732          jjtc000 = false;
 733          jjtreeCloseNodeScope(jjtn000);
 734          jjtn000.type =  Integer.TYPE;
 735        break;
 736      case LONG:
 737        jj_consume_token(LONG);
 738           jjtree.closeNodeScope(jjtn000, true);
 739           jjtc000 = false;
 740           jjtreeCloseNodeScope(jjtn000);
 741           jjtn000.type =  Long.TYPE;
 742        break;
 743      case FLOAT:
 744        jj_consume_token(FLOAT);
 745            jjtree.closeNodeScope(jjtn000, true);
 746            jjtc000 = false;
 747            jjtreeCloseNodeScope(jjtn000);
 748            jjtn000.type =  Float.TYPE;
 749        break;
 750      case DOUBLE:
 751        jj_consume_token(DOUBLE);
 752             jjtree.closeNodeScope(jjtn000, true);
 753             jjtc000 = false;
 754             jjtreeCloseNodeScope(jjtn000);
 755             jjtn000.type =  Double.TYPE;
 756        break;
 757      default:
 758        jj_la1[15] = jj_gen;
 759        jj_consume_token(-1);
 760        throw new ParseException();
 761      }
 762    } finally {
 763  if (jjtc000) {
 764    jjtree.closeNodeScope(jjtn000, true);
 765    jjtreeCloseNodeScope(jjtn000);
 766  }
 767    }
 768  }
 769
 770  final public void AmbiguousName() throws ParseException {
 771 /*@bgen(jjtree) AmbiguousName */
 772    BSHAmbiguousName jjtn000 = new BSHAmbiguousName(JJTAMBIGUOUSNAME);
 773    boolean jjtc000 = true;
 774    jjtree.openNodeScope(jjtn000);
 775    jjtreeOpenNodeScope(jjtn000);Token t;
 776    StringBuffer s;
 777    try {
 778      t = jj_consume_token(IDENTIFIER);
 779        s = new StringBuffer(t.image);
 780      label_4:
 781      while (true) {
 782        if (jj_2_8(2)) {
 783          ;
 784        } else {
 785          break label_4;
 786        }
 787        jj_consume_token(DOT);
 788        t = jj_consume_token(IDENTIFIER);
 789        s.append("."+t.image);
 790      }
 791       jjtree.closeNodeScope(jjtn000, true);
 792       jjtc000 = false;
 793       jjtreeCloseNodeScope(jjtn000);
 794        jjtn000.text = s.toString();
 795    } finally {
 796    if (jjtc000) {
 797      jjtree.closeNodeScope(jjtn000, true);
 798      jjtreeCloseNodeScope(jjtn000);
 799    }
 800    }
 801  }
 802
 803/*
 804 * Expression syntax follows.
 805 */
 806  final public void Expression() throws ParseException {
 807    if (jj_2_9(2147483647)) {
 808      Assignment();
 809    } else {
 810      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 811      case BOOLEAN:
 812      case BYTE:
 813      case CHAR:
 814      case DOUBLE:
 815      case FALSE:
 816      case FLOAT:
 817      case INT:
 818      case LONG:
 819      case NEW:
 820      case NULL:
 821      case SHORT:
 822      case TRUE:
 823      case VOID:
 824      case INTEGER_LITERAL:
 825      case FLOATING_POINT_LITERAL:
 826      case CHARACTER_LITERAL:
 827      case STRING_LITERAL:
 828      case IDENTIFIER:
 829      case LPAREN:
 830      case BANG:
 831      case TILDE:
 832      case INCR:
 833      case DECR:
 834      case PLUS:
 835      case MINUS:
 836        ConditionalExpression();
 837        break;
 838      default:
 839        jj_la1[16] = jj_gen;
 840        jj_consume_token(-1);
 841        throw new ParseException();
 842      }
 843    }
 844  }
 845
 846  final public void Assignment() throws ParseException {
 847 /*@bgen(jjtree) Assignment */
 848  BSHAssignment jjtn000 = new BSHAssignment(JJTASSIGNMENT);
 849  boolean jjtc000 = true;
 850  jjtree.openNodeScope(jjtn000);
 851  jjtreeOpenNodeScope(jjtn000);int op ;
 852    try {
 853      LHSPrimaryExpression();
 854      op = AssignmentOperator();
 855    jjtn000.operator = op;
 856      Expression();
 857    } catch (Throwable jjte000) {
 858    if (jjtc000) {
 859      jjtree.clearNodeScope(jjtn000);
 860      jjtc000 = false;
 861    } else {
 862      jjtree.popNode();
 863    }
 864    if (jjte000 instanceof RuntimeException) {
 865      {if (true) throw (RuntimeException)jjte000;}
 866    }
 867    if (jjte000 instanceof ParseException) {
 868      {if (true) throw (ParseException)jjte000;}
 869    }
 870    {if (true) throw (Error)jjte000;}
 871    } finally {
 872    if (jjtc000) {
 873      jjtree.closeNodeScope(jjtn000, true);
 874      jjtreeCloseNodeScope(jjtn000);
 875    }
 876    }
 877  }
 878
 879  final public int AssignmentOperator() throws ParseException {
 880  Token t;
 881    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 882    case ASSIGN:
 883      jj_consume_token(ASSIGN);
 884      break;
 885    case STARASSIGN:
 886      jj_consume_token(STARASSIGN);
 887      break;
 888    case SLASHASSIGN:
 889      jj_consume_token(SLASHASSIGN);
 890      break;
 891    case MODASSIGN:
 892      jj_consume_token(MODASSIGN);
 893      break;
 894    case PLUSASSIGN:
 895      jj_consume_token(PLUSASSIGN);
 896      break;
 897    case MINUSASSIGN:
 898      jj_consume_token(MINUSASSIGN);
 899      break;
 900    case ANDASSIGN:
 901      jj_consume_token(ANDASSIGN);
 902      break;
 903    case XORASSIGN:
 904      jj_consume_token(XORASSIGN);
 905      break;
 906    case ORASSIGN:
 907      jj_consume_token(ORASSIGN);
 908      break;
 909    case LSHIFTASSIGN:
 910      jj_consume_token(LSHIFTASSIGN);
 911      break;
 912    case LSHIFTASSIGNX:
 913      jj_consume_token(LSHIFTASSIGNX);
 914      break;
 915    case RSIGNEDSHIFTASSIGN:
 916      jj_consume_token(RSIGNEDSHIFTASSIGN);
 917      break;
 918    case RSIGNEDSHIFTASSIGNX:
 919      jj_consume_token(RSIGNEDSHIFTASSIGNX);
 920      break;
 921    case RUNSIGNEDSHIFTASSIGN:
 922      jj_consume_token(RUNSIGNEDSHIFTASSIGN);
 923      break;
 924    case RUNSIGNEDSHIFTASSIGNX:
 925      jj_consume_token(RUNSIGNEDSHIFTASSIGNX);
 926      break;
 927    default:
 928      jj_la1[17] = jj_gen;
 929      jj_consume_token(-1);
 930      throw new ParseException();
 931    }
 932        t = getToken(0);
 933        {if (true) return t.kind;}
 934    throw new Error("Missing return statement in function");
 935  }
 936
 937  final public void ConditionalExpression() throws ParseException {
 938    ConditionalOrExpression();
 939    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 940    case HOOK:
 941      jj_consume_token(HOOK);
 942      Expression();
 943      jj_consume_token(COLON);
 944                                                     BSHTernaryExpression jjtn001 = new BSHTernaryExpression(JJTTERNARYEXPRESSION);
 945                                                     boolean jjtc001 = true;
 946                                                     jjtree.openNodeScope(jjtn001);
 947                                                     jjtreeOpenNodeScope(jjtn001);
 948      try {
 949        ConditionalExpression();
 950      } catch (Throwable jjte001) {
 951                                                     if (jjtc001) {
 952                                                       jjtree.clearNodeScope(jjtn001);
 953                                                       jjtc001 = false;
 954                                                     } else {
 955                                                       jjtree.popNode();
 956                                                     }
 957                                                     if (jjte001 instanceof RuntimeException) {
 958                                                       {if (true) throw (RuntimeException)jjte001;}
 959                                                     }
 960                                                     if (jjte001 instanceof ParseException) {
 961                                                       {if (true) throw (ParseException)jjte001;}
 962                                                     }
 963                                                     {if (true) throw (Error)jjte001;}
 964      } finally {
 965                                                     if (jjtc001) {
 966                                                       jjtree.closeNodeScope(jjtn001,  3);
 967                                                       jjtreeCloseNodeScope(jjtn001);
 968                                                     }
 969      }
 970      break;
 971    default:
 972      jj_la1[18] = jj_gen;
 973      ;
 974    }
 975  }
 976
 977  final public void ConditionalOrExpression() throws ParseException {
 978  Token t=null;
 979    ConditionalAndExpression();
 980    label_5:
 981    while (true) {
 982      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 983      case BOOL_OR:
 984      case BOOL_ORX:
 985        ;
 986        break;
 987      default:
 988        jj_la1[19] = jj_gen;
 989        break label_5;
 990      }
 991      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 992      case BOOL_OR:
 993        t = jj_consume_token(BOOL_OR);
 994        break;
 995      case BOOL_ORX:
 996        t = jj_consume_token(BOOL_ORX);
 997        break;
 998      default:
 999        jj_la1[20] = jj_gen;
1000        jj_consume_token(-1);
1001        throw new ParseException();
1002      }
1003      ConditionalAndExpression();
1004      BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1005      boolean jjtc001 = true;
1006      jjtree.openNodeScope(jjtn001);
1007      jjtreeOpenNodeScope(jjtn001);
1008      try {
1009      jjtree.closeNodeScope(jjtn001,  2);
1010      jjtc001 = false;
1011      jjtreeCloseNodeScope(jjtn001);
1012      jjtn001.kind = t.kind;
1013      } finally {
1014      if (jjtc001) {
1015        jjtree.closeNodeScope(jjtn001,  2);
1016        jjtreeCloseNodeScope(jjtn001);
1017      }
1018      }
1019    }
1020  }
1021
1022  final public void ConditionalAndExpression() throws ParseException {
1023  Token t=null;
1024    InclusiveOrExpression();
1025    label_6:
1026    while (true) {
1027      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1028      case BOOL_AND:
1029      case BOOL_ANDX:
1030        ;
1031        break;
1032      default:
1033        jj_la1[21] = jj_gen;
1034        break label_6;
1035      }
1036      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1037      case BOOL_AND:
1038        t = jj_consume_token(BOOL_AND);
1039        break;
1040      case BOOL_ANDX:
1041        t = jj_consume_token(BOOL_ANDX);
1042        break;
1043      default:
1044        jj_la1[22] = jj_gen;
1045        jj_consume_token(-1);
1046        throw new ParseException();
1047      }
1048      InclusiveOrExpression();
1049      BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1050      boolean jjtc001 = true;
1051      jjtree.openNodeScope(jjtn001);
1052      jjtreeOpenNodeScope(jjtn001);
1053      try {
1054      jjtree.closeNodeScope(jjtn001,  2);
1055      jjtc001 = false;
1056      jjtreeCloseNodeScope(jjtn001);
1057      jjtn001.kind = t.kind;
1058      } finally {
1059      if (jjtc001) {
1060        jjtree.closeNodeScope(jjtn001,  2);
1061        jjtreeCloseNodeScope(jjtn001);
1062      }
1063      }
1064    }
1065  }
1066
1067  final public void InclusiveOrExpression() throws ParseException {
1068  Token t=null;
1069    ExclusiveOrExpression();
1070    label_7:
1071    while (true) {
1072      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1073      case BIT_OR:
1074      case BIT_ORX:
1075        ;
1076        break;
1077      default:
1078        jj_la1[23] = jj_gen;
1079        break label_7;
1080      }
1081      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1082      case BIT_OR:
1083        t = jj_consume_token(BIT_OR);
1084        break;
1085      case BIT_ORX:
1086        t = jj_consume_token(BIT_ORX);
1087        break;
1088      default:
1089        jj_la1[24] = jj_gen;
1090        jj_consume_token(-1);
1091        throw new ParseException();
1092      }
1093      ExclusiveOrExpression();
1094      BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1095      boolean jjtc001 = true;
1096      jjtree.openNodeScope(jjtn001);
1097      jjtreeOpenNodeScope(jjtn001);
1098      try {
1099      jjtree.closeNodeScope(jjtn001,  2);
1100      jjtc001 = false;
1101      jjtreeCloseNodeScope(jjtn001);
1102      jjtn001.kind = t.kind;
1103      } finally {
1104      if (jjtc001) {
1105        jjtree.closeNodeScope(jjtn001,  2);
1106        jjtreeCloseNodeScope(jjtn001);
1107      }
1108      }
1109    }
1110  }
1111
1112  final public void ExclusiveOrExpression() throws ParseException {
1113  Token t=null;
1114    AndExpression();
1115    label_8:
1116    while (true) {
1117      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1118      case XOR:
1119        ;
1120        break;
1121      default:
1122        jj_la1[25] = jj_gen;
1123        break label_8;
1124      }
1125      t = jj_consume_token(XOR);
1126      AndExpression();
1127      BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1128      boolean jjtc001 = true;
1129      jjtree.openNodeScope(jjtn001);
1130      jjtreeOpenNodeScope(jjtn001);
1131      try {
1132      jjtree.closeNodeScope(jjtn001,  2);
1133      jjtc001 = false;
1134      jjtreeCloseNodeScope(jjtn001);
1135      jjtn001.kind = t.kind;
1136      } finally {
1137      if (jjtc001) {
1138        jjtree.closeNodeScope(jjtn001,  2);
1139        jjtreeCloseNodeScope(jjtn001);
1140      }
1141      }
1142    }
1143  }
1144
1145  final public void AndExpression() throws ParseException {
1146  Token t=null;
1147    EqualityExpression();
1148    label_9:
1149    while (true) {
1150      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1151      case BIT_AND:
1152      case BIT_ANDX:
1153        ;
1154        break;
1155      default:
1156        jj_la1[26] = jj_gen;
1157        break label_9;
1158      }
1159      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1160      case BIT_AND:
1161        t = jj_consume_token(BIT_AND);
1162        break;
1163      case BIT_ANDX:
1164        t = jj_consume_token(BIT_ANDX);
1165        break;
1166      default:
1167        jj_la1[27] = jj_gen;
1168        jj_consume_token(-1);
1169        throw new ParseException();
1170      }
1171      EqualityExpression();
1172      BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1173      boolean jjtc001 = true;
1174      jjtree.openNodeScope(jjtn001);
1175      jjtreeOpenNodeScope(jjtn001);
1176      try {
1177      jjtree.closeNodeScope(jjtn001,  2);
1178      jjtc001 = false;
1179      jjtreeCloseNodeScope(jjtn001);
1180      jjtn001.kind = t.kind;
1181      } finally {
1182      if (jjtc001) {
1183        jjtree.closeNodeScope(jjtn001,  2);
1184        jjtreeCloseNodeScope(jjtn001);
1185      }
1186      }
1187    }
1188  }
1189
1190  final public void EqualityExpression() throws ParseException {
1191  Token t = null;
1192    InstanceOfExpression();
1193    label_10:
1194    while (true) {
1195      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1196      case EQ:
1197      case NE:
1198        ;
1199        break;
1200      default:
1201        jj_la1[28] = jj_gen;
1202        break label_10;
1203      }
1204      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1205      case EQ:
1206        t = jj_consume_token(EQ);
1207        break;
1208      case NE:
1209        t = jj_consume_token(NE);
1210        break;
1211      default:
1212        jj_la1[29] = jj_gen;
1213        jj_consume_token(-1);
1214        throw new ParseException();
1215      }
1216      InstanceOfExpression();
1217      BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1218      boolean jjtc001 = true;
1219      jjtree.openNodeScope(jjtn001);
1220      jjtreeOpenNodeScope(jjtn001);
1221      try {
1222      jjtree.closeNodeScope(jjtn001,  2);
1223      jjtc001 = false;
1224      jjtreeCloseNodeScope(jjtn001);
1225      jjtn001.kind = t.kind;
1226      } finally {
1227      if (jjtc001) {
1228        jjtree.closeNodeScope(jjtn001,  2);
1229        jjtreeCloseNodeScope(jjtn001);
1230      }
1231      }
1232    }
1233  }
1234
1235  final public void InstanceOfExpression() throws ParseException {
1236  Token t = null;
1237    RelationalExpression();
1238    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1239    case INSTANCEOF:
1240      t = jj_consume_token(INSTANCEOF);
1241      Type();
1242                              BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1243                              boolean jjtc001 = true;
1244                              jjtree.openNodeScope(jjtn001);
1245                              jjtreeOpenNodeScope(jjtn001);
1246      try {
1247                              jjtree.closeNodeScope(jjtn001,  2);
1248                              jjtc001 = false;
1249                              jjtreeCloseNodeScope(jjtn001);
1250                              jjtn001.kind = t.kind;
1251      } finally {
1252                              if (jjtc001) {
1253                                jjtree.closeNodeScope(jjtn001,  2);
1254                                jjtreeCloseNodeScope(jjtn001);
1255                              }
1256      }
1257      break;
1258    default:
1259      jj_la1[30] = jj_gen;
1260      ;
1261    }
1262  }
1263
1264  final public void RelationalExpression() throws ParseException {
1265  Token t = null;
1266    ShiftExpression();
1267    label_11:
1268    while (true) {
1269      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1270      case GT:
1271      case GTX:
1272      case LT:
1273      case LTX:
1274      case LE:
1275      case LEX:
1276      case GE:
1277      case GEX:
1278        ;
1279        break;
1280      default:
1281        jj_la1[31] = jj_gen;
1282        break label_11;
1283      }
1284      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1285      case LT:
1286        t = jj_consume_token(LT);
1287        break;
1288      case LTX:
1289        t = jj_consume_token(LTX);
1290        break;
1291      case GT:
1292        t = jj_consume_token(GT);
1293        break;
1294      case GTX:
1295        t = jj_consume_token(GTX);
1296        break;
1297      case LE:
1298        t = jj_consume_token(LE);
1299        break;
1300      case LEX:
1301        t = jj_consume_token(LEX);
1302        break;
1303      case GE:
1304        t = jj_consume_token(GE);
1305        break;
1306      case GEX:
1307        t = jj_consume_token(GEX);
1308        break;
1309      default:
1310        jj_la1[32] = jj_gen;
1311        jj_consume_token(-1);
1312        throw new ParseException();
1313      }
1314      ShiftExpression();
1315    BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1316    boolean jjtc001 = true;
1317    jjtree.openNodeScope(jjtn001);
1318    jjtreeOpenNodeScope(jjtn001);
1319      try {
1320    jjtree.closeNodeScope(jjtn001,  2);
1321    jjtc001 = false;
1322    jjtreeCloseNodeScope(jjtn001);
1323    jjtn001.kind = t.kind;
1324      } finally {
1325    if (jjtc001) {
1326      jjtree.closeNodeScope(jjtn001,  2);
1327      jjtreeCloseNodeScope(jjtn001);
1328    }
1329      }
1330    }
1331  }
1332
1333  final public void ShiftExpression() throws ParseException {
1334  Token t = null;
1335    AdditiveExpression();
1336    label_12:
1337    while (true) {
1338      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1339      case LSHIFT:
1340      case LSHIFTX:
1341      case RSIGNEDSHIFT:
1342      case RSIGNEDSHIFTX:
1343      case RUNSIGNEDSHIFT:
1344      case RUNSIGNEDSHIFTX:
1345        ;
1346        break;
1347      default:
1348        jj_la1[33] = jj_gen;
1349        break label_12;
1350      }
1351      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1352      case LSHIFT:
1353        t = jj_consume_token(LSHIFT);
1354        break;
1355      case LSHIFTX:
1356        t = jj_consume_token(LSHIFTX);
1357        break;
1358      case RSIGNEDSHIFT:
1359        t = jj_consume_token(RSIGNEDSHIFT);
1360        break;
1361      case RSIGNEDSHIFTX:
1362        t = jj_consume_token(RSIGNEDSHIFTX);
1363        break;
1364      case RUNSIGNEDSHIFT:
1365        t = jj_consume_token(RUNSIGNEDSHIFT);
1366        break;
1367      case RUNSIGNEDSHIFTX:
1368        t = jj_consume_token(RUNSIGNEDSHIFTX);
1369        break;
1370      default:
1371        jj_la1[34] = jj_gen;
1372        jj_consume_token(-1);
1373        throw new ParseException();
1374      }
1375      AdditiveExpression();
1376    BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1377    boolean jjtc001 = true;
1378    jjtree.openNodeScope(jjtn001);
1379    jjtreeOpenNodeScope(jjtn001);
1380      try {
1381    jjtree.closeNodeScope(jjtn001,  2);
1382    jjtc001 = false;
1383    jjtreeCloseNodeScope(jjtn001);
1384    jjtn001.kind = t.kind;
1385      } finally {
1386    if (jjtc001) {
1387      jjtree.closeNodeScope(jjtn001,  2);
1388      jjtreeCloseNodeScope(jjtn001);
1389    }
1390      }
1391    }
1392  }
1393
1394  final public void AdditiveExpression() throws ParseException {
1395  Token t = null;
1396    MultiplicativeExpression();
1397    label_13:
1398    while (true) {
1399      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1400      case PLUS:
1401      case MINUS:
1402        ;
1403        break;
1404      default:
1405        jj_la1[35] = jj_gen;
1406        break label_13;
1407      }
1408      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1409      case PLUS:
1410        t = jj_consume_token(PLUS);
1411        break;
1412      case MINUS:
1413        t = jj_consume_token(MINUS);
1414        break;
1415      default:
1416        jj_la1[36] = jj_gen;
1417        jj_consume_token(-1);
1418        throw new ParseException();
1419      }
1420      MultiplicativeExpression();
1421                                                     BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1422                                                     boolean jjtc001 = true;
1423                                                     jjtree.openNodeScope(jjtn001);
1424                                                     jjtreeOpenNodeScope(jjtn001);
1425      try {
1426                                                     jjtree.closeNodeScope(jjtn001,  2);
1427                                                     jjtc001 = false;
1428                                                     jjtreeCloseNodeScope(jjtn001);
1429                                                     jjtn001.kind = t.kind;
1430      } finally {
1431                                                     if (jjtc001) {
1432                                                       jjtree.closeNodeScope(jjtn001,  2);
1433                                                       jjtreeCloseNodeScope(jjtn001);
1434                                                     }
1435      }
1436    }
1437  }
1438
1439  final public void MultiplicativeExpression() throws ParseException {
1440  Token t = null;
1441    UnaryExpression();
1442    label_14:
1443    while (true) {
1444      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1445      case STAR:
1446      case SLASH:
1447      case MOD:
1448        ;
1449        break;
1450      default:
1451        jj_la1[37] = jj_gen;
1452        break label_14;
1453      }
1454      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1455      case STAR:
1456        t = jj_consume_token(STAR);
1457        break;
1458      case SLASH:
1459        t = jj_consume_token(SLASH);
1460        break;
1461      case MOD:
1462        t = jj_consume_token(MOD);
1463        break;
1464      default:
1465        jj_la1[38] = jj_gen;
1466        jj_consume_token(-1);
1467        throw new ParseException();
1468      }
1469      UnaryExpression();
1470                      BSHBinaryExpression jjtn001 = new BSHBinaryExpression(JJTBINARYEXPRESSION);
1471                      boolean jjtc001 = true;
1472                      jjtree.openNodeScope(jjtn001);
1473                      jjtreeOpenNodeScope(jjtn001);
1474      try {
1475                      jjtree.closeNodeScope(jjtn001,  2);
1476                      jjtc001 = false;
1477                      jjtreeCloseNodeScope(jjtn001);
1478                      jjtn001.kind = t.kind;
1479      } finally {
1480                      if (jjtc001) {
1481                        jjtree.closeNodeScope(jjtn001,  2);
1482                        jjtreeCloseNodeScope(jjtn001);
1483                      }
1484      }
1485    }
1486  }
1487
1488  final public void UnaryExpression() throws ParseException {
1489  Token t = null;
1490    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1491    case PLUS:
1492    case MINUS:
1493      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1494      case PLUS:
1495        t = jj_consume_token(PLUS);
1496        break;
1497      case MINUS:
1498        t = jj_consume_token(MINUS);
1499        break;
1500      default:
1501        jj_la1[39] = jj_gen;
1502        jj_consume_token(-1);
1503        throw new ParseException();
1504      }
1505      UnaryExpression();
1506      BSHUnaryExpression jjtn001 = new BSHUnaryExpression(JJTUNARYEXPRESSION);
1507      boolean jjtc001 = true;
1508      jjtree.openNodeScope(jjtn001);
1509      jjtreeOpenNodeScope(jjtn001);
1510      try {
1511      jjtree.closeNodeScope(jjtn001,  1);
1512      jjtc001 = false;
1513      jjtreeCloseNodeScope(jjtn001);
1514      jjtn001.kind = t.kind;
1515      } finally {
1516      if (jjtc001) {
1517        jjtree.closeNodeScope(jjtn001,  1);
1518        jjtreeCloseNodeScope(jjtn001);
1519      }
1520      }
1521      break;
1522    case INCR:
1523      PreIncrementExpression();
1524      break;
1525    case DECR:
1526      PreDecrementExpression();
1527      break;
1528    case BOOLEAN:
1529    case BYTE:
1530    case CHAR:
1531    case DOUBLE:
1532    case FALSE:
1533    case FLOAT:
1534    case INT:
1535    case LONG:
1536    case NEW:
1537    case NULL:
1538    case SHORT:
1539    case TRUE:
1540    case VOID:
1541    case INTEGER_LITERAL:
1542    case FLOATING_POINT_LITERAL:
1543    case CHARACTER_LITERAL:
1544    case STRING_LITERAL:
1545    case IDENTIFIER:
1546    case LPAREN:
1547    case BANG:
1548    case TILDE:
1549      UnaryExpressionNotPlusMinus();
1550      break;
1551    default:
1552      jj_la1[40] = jj_gen;
1553      jj_consume_token(-1);
1554      throw new ParseException();
1555    }
1556  }
1557
1558  final public void PreIncrementExpression() throws ParseException {
1559  Token t = null;
1560    t = jj_consume_token(INCR);
1561    LHSPrimaryExpression();
1562      BSHUnaryExpression jjtn001 = new BSHUnaryExpression(JJTUNARYEXPRESSION);
1563      boolean jjtc001 = true;
1564      jjtree.openNodeScope(jjtn001);
1565      jjtreeOpenNodeScope(jjtn001);
1566    try {
1567      jjtree.closeNodeScope(jjtn001,  1);
1568      jjtc001 = false;
1569      jjtreeCloseNodeScope(jjtn001);
1570      jjtn001.kind = t.kind;
1571    } finally {
1572      if (jjtc001) {
1573        jjtree.closeNodeScope(jjtn001,  1);
1574        jjtreeCloseNodeScope(jjtn001);
1575      }
1576    }
1577  }
1578
1579  final public void PreDecrementExpression() throws ParseException {
1580  Token t = null;
1581    t = jj_consume_token(DECR);
1582    LHSPrimaryExpression();
1583      BSHUnaryExpression jjtn001 = new BSHUnaryExpression(JJTUNARYEXPRESSION);
1584      boolean jjtc001 = true;
1585      jjtree.openNodeScope(jjtn001);
1586      jjtreeOpenNodeScope(jjtn001);
1587    try {
1588      jjtree.closeNodeScope(jjtn001,  1);
1589      jjtc001 = false;
1590      jjtreeCloseNodeScope(jjtn001);
1591      jjtn001.kind = t.kind;
1592    } finally {
1593      if (jjtc001) {
1594        jjtree.closeNodeScope(jjtn001,  1);
1595        jjtreeCloseNodeScope(jjtn001);
1596      }
1597    }
1598  }
1599
1600  final public void UnaryExpressionNotPlusMinus() throws ParseException {
1601  Token t = null;
1602    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1603    case BANG:
1604    case TILDE:
1605      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1606      case TILDE:
1607        t = jj_consume_token(TILDE);
1608        break;
1609      case BANG:
1610        t = jj_consume_token(BANG);
1611        break;
1612      default:
1613        jj_la1[41] = jj_gen;
1614        jj_consume_token(-1);
1615        throw new ParseException();
1616      }
1617      UnaryExpression();
1618      BSHUnaryExpression jjtn001 = new BSHUnaryExpression(JJTUNARYEXPRESSION);
1619      boolean jjtc001 = true;
1620      jjtree.openNodeScope(jjtn001);
1621      jjtreeOpenNodeScope(jjtn001);
1622      try {
1623      jjtree.closeNodeScope(jjtn001,  1);
1624      jjtc001 = false;
1625      jjtreeCloseNodeScope(jjtn001);
1626      jjtn001.kind = t.kind;
1627      } finally {
1628      if (jjtc001) {
1629        jjtree.closeNodeScope(jjtn001,  1);
1630        jjtreeCloseNodeScope(jjtn001);
1631      }
1632      }
1633      break;
1634    default:
1635      jj_la1[42] = jj_gen;
1636      if (jj_2_10(2147483647)) {
1637        CastExpression();
1638      } else {
1639        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1640        case BOOLEAN:
1641        case BYTE:
1642        case CHAR:
1643        case DOUBLE:
1644        case FALSE:
1645        case FLOAT:
1646        case INT:
1647        case LONG:
1648        case NEW:
1649        case NULL:
1650        case SHORT:
1651        case TRUE:
1652        case VOID:
1653        case INTEGER_LITERAL:
1654        case FLOATING_POINT_LITERAL:
1655        case CHARACTER_LITERAL:
1656        case STRING_LITERAL:
1657        case IDENTIFIER:
1658        case LPAREN:
1659          PostfixExpression();
1660          break;
1661        default:
1662          jj_la1[43] = jj_gen;
1663          jj_consume_token(-1);
1664          throw new ParseException();
1665        }
1666      }
1667    }
1668  }
1669
1670// This production is to determine lookahead only.
1671  final public void CastLookahead() throws ParseException {
1672    if (jj_2_11(2)) {
1673      jj_consume_token(LPAREN);
1674      PrimitiveType();
1675    } else if (jj_2_12(2147483647)) {
1676      jj_consume_token(LPAREN);
1677      AmbiguousName();
1678      jj_consume_token(LBRACKET);
1679      jj_consume_token(RBRACKET);
1680    } else {
1681      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1682      case LPAREN:
1683        jj_consume_token(LPAREN);
1684        AmbiguousName();
1685        jj_consume_token(RPAREN);
1686        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1687        case TILDE:
1688          jj_consume_token(TILDE);
1689          break;
1690        case BANG:
1691          jj_consume_token(BANG);
1692          break;
1693        case LPAREN:
1694          jj_consume_token(LPAREN);
1695          break;
1696        case IDENTIFIER:
1697          jj_consume_token(IDENTIFIER);
1698          break;
1699        case NEW:
1700          jj_consume_token(NEW);
1701          break;
1702        case FALSE:
1703        case NULL:
1704        case TRUE:
1705        case VOID:
1706        case INTEGER_LITERAL:
1707        case FLOATING_POINT_LITERAL:
1708        case CHARACTER_LITERAL:
1709        case STRING_LITERAL:
1710          Literal();
1711          break;
1712        default:
1713          jj_la1[44] = jj_gen;
1714          jj_consume_token(-1);
1715          throw new ParseException();
1716        }
1717        break;
1718      default:
1719        jj_la1[45] = jj_gen;
1720        jj_consume_token(-1);
1721        throw new ParseException();
1722      }
1723    }
1724  }
1725
1726  final public void PostfixExpression() throws ParseException {
1727  Token t = null;
1728    if (jj_2_13(2147483647)) {
1729      LHSPrimaryExpression();
1730      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1731      case INCR:
1732        t = jj_consume_token(INCR);
1733        break;
1734      case DECR:
1735        t = jj_consume_token(DECR);
1736        break;
1737      default:
1738        jj_la1[46] = jj_gen;
1739        jj_consume_token(-1);
1740        throw new ParseException();
1741      }
1742                                BSHUnaryExpression jjtn001 = new BSHUnaryExpression(JJTUNARYEXPRESSION);
1743                                boolean jjtc001 = true;
1744                                jjtree.openNodeScope(jjtn001);
1745                                jjtreeOpenNodeScope(jjtn001);
1746      try {
1747                                jjtree.closeNodeScope(jjtn001,  1);
1748                                jjtc001 = false;
1749                                jjtreeCloseNodeScope(jjtn001);
1750                jjtn001.kind = t.kind; jjtn001.postfix = true;
1751      } finally {
1752                                if (jjtc001) {
1753                                  jjtree.closeNodeScope(jjtn001,  1);
1754                                  jjtreeCloseNodeScope(jjtn001);
1755                                }
1756      }
1757    } else {
1758      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1759      case BOOLEAN:
1760      case BYTE:
1761      case CHAR:
1762      case DOUBLE:
1763      case FALSE:
1764      case FLOAT:
1765      case INT:
1766      case LONG:
1767      case NEW:
1768      case NULL:
1769      case SHORT:
1770      case TRUE:
1771      case VOID:
1772      case INTEGER_LITERAL:
1773      case FLOATING_POINT_LITERAL:
1774      case CHARACTER_LITERAL:
1775      case STRING_LITERAL:
1776      case IDENTIFIER:
1777      case LPAREN:
1778        PrimaryExpression();
1779        break;
1780      default:
1781        jj_la1[47] = jj_gen;
1782        jj_consume_token(-1);
1783        throw new ParseException();
1784      }
1785    }
1786  }
1787
1788  final public void CastExpression() throws ParseException {
1789 /*@bgen(jjtree) CastExpression */
1790  BSHCastExpression jjtn000 = new BSHCastExpression(JJTCASTEXPRESSION);
1791  boolean jjtc000 = true;
1792  jjtree.openNodeScope(jjtn000);
1793  jjtreeOpenNodeScope(jjtn000);
1794    try {
1795      if (jj_2_14(2147483647)) {
1796        jj_consume_token(LPAREN);
1797        Type();
1798        jj_consume_token(RPAREN);
1799        UnaryExpression();
1800      } else {
1801        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1802        case LPAREN:
1803          jj_consume_token(LPAREN);
1804          Type();
1805          jj_consume_token(RPAREN);
1806          UnaryExpressionNotPlusMinus();
1807          break;
1808        default:
1809          jj_la1[48] = jj_gen;
1810          jj_consume_token(-1);
1811          throw new ParseException();
1812        }
1813      }
1814    } catch (Throwable jjte000) {
1815    if (jjtc000) {
1816      jjtree.clearNodeScope(jjtn000);
1817      jjtc000 = false;
1818    } else {
1819      jjtree.popNode();
1820    }
1821    if (jjte000 instanceof RuntimeException) {
1822      {if (true) throw (RuntimeException)jjte000;}
1823    }
1824    if (jjte000 instanceof ParseException) {
1825      {if (true) throw (ParseException)jjte000;}
1826    }
1827    {if (true) throw (Error)jjte000;}
1828    } finally {
1829    if (jjtc000) {
1830      jjtree.closeNodeScope(jjtn000, true);
1831      jjtreeCloseNodeScope(jjtn000);
1832    }
1833    }
1834  }
1835
1836  final public void PrimaryExpression() throws ParseException {
1837                                               /*@bgen(jjtree) PrimaryExpression */
1838  BSHPrimaryExpression jjtn000 = new BSHPrimaryExpression(JJTPRIMA

Large files files are truncated, but you can click here to view the full file