Esempio n. 1
0
/* Production 39 chapter 3.4 corba 2.3.1 */
  public void literal() {
 /*@bgen(jjtree) literal */
  ASTliteral jjtn000 = new ASTliteral(this, IDLParserTreeConstants.JJTLITERAL);
  bool jjtc000 = true;
  jjtree.openNodeScope(jjtn000);Object litVal;
    try {
      if (jj_2_12(2)) {
        litVal = integer_literal();
                               jjtree.closeNodeScope(jjtn000, true);
                               jjtc000 = false;
                               jjtn000.setLitVal(new IntegerLiteral((Decimal)litVal));
      } else {
        switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
        case IDLParserConstants.STRING:
          litVal = string_literal();
                              jjtree.closeNodeScope(jjtn000, true);
                              jjtc000 = false;
                              jjtn000.setLitVal(new StringLiteral((String)litVal, false));
          break;
        default:
          jj_la1[46] = jj_gen;
          if (jj_2_13(2)) {
            litVal = wide_string_literal();
                                   jjtree.closeNodeScope(jjtn000, true);
                                   jjtc000 = false;
                                   jjtn000.setLitVal(new StringLiteral((String)litVal, true));
          } else {
            switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
            case IDLParserConstants.CHARACTER:
              litVal = character_literal();
                                 jjtree.closeNodeScope(jjtn000, true);
                                 jjtc000 = false;
                                 jjtn000.setLitVal(new CharLiteral((Char)litVal, false));
              break;
            default:
              jj_la1[47] = jj_gen;
              if (jj_2_14(2)) {
                litVal = wide_character_literal();
                                      jjtree.closeNodeScope(jjtn000, true);
                                      jjtc000 = false;
                                      jjtn000.setLitVal(new CharLiteral((Char)litVal, true));
              } else if (jj_2_15(2)) {
                litVal = fixed_pt_literal();
                                jjtree.closeNodeScope(jjtn000, true);
                                jjtc000 = false;
                                {if (true) throw new NotSupportedException("fixed point literal not yet supported");}
              } else if (jj_2_16(2)) {
                litVal = floating_pt_literal();
                                   jjtree.closeNodeScope(jjtn000, true);
                                   jjtc000 = false;
                                   jjtn000.setLitVal(new FloatLiteral((Double)litVal));
              } else {
                switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
                case 46:
                case 47:
                  litVal = boolean_literal();
                               jjtree.closeNodeScope(jjtn000, true);
                               jjtc000 = false;
                               jjtn000.setLitVal(new BooleanLiteral((Boolean)litVal));
                  break;
                default:
                  jj_la1[48] = jj_gen;
                  jj_consume_token(-1);
                  throw new ParseException();
                  break;
                }
              }
              break;
            }
          }
          break;
        }
      }
    } catch (Exception jjte000) {
  if (jjtc000) {
    jjtree.clearNodeScope(jjtn000);
    jjtc000 = false;
  } else {
    jjtree.popNode();
  }
{if (true) throw ;}
    } finally {
  if (jjtc000) {
    jjtree.closeNodeScope(jjtn000, true);
  }
    }
  }
 /**
  * @see parser.IDLParserVisitor#visit(ASTliteral, Object)
  */
 public Object visit(ASTliteral node, Object data) {
     return node.getLitVal();
 }