示例#1
0
/* Production 89, chapter 3.4, corba 2.3.1 */
  public void op_type_spec() {
 /*@bgen(jjtree) op_type_spec */
  ASTop_type_spec jjtn000 = new ASTop_type_spec(this, IDLParserTreeConstants.JJTOP_TYPE_SPEC);
  bool jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
      case 21:
      case 50:
      case 51:
      case 52:
      case 53:
      case 54:
      case 55:
      case 56:
      case 57:
      case 58:
      case 59:
      case 60:
      case 70:
      case 71:
      case 84:
      case IDLParserConstants.ID:
        param_type_spec();
        break;
      case 78:
        jj_consume_token(78);
        break;
      default:
        jj_la1[78] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
        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(ASTop_type_spec, Object)
  * @param data the active buildinfo for the current scope
  * @return the TypeContainer for this op_type_spec
  */
 public Object visit(ASTop_type_spec node, Object data) {
     TypeContainer returnType;
     if (node.jjtGetNumChildren() == 0) {
         // void
         returnType = new TypeContainer(typeof(void));
     } else {
         // <parameter type spec>
         returnType = (TypeContainer) node.jjtGetChild(0).jjtAccept(this, data);
         if (returnType == null) {
             throw new InvalidIdlException(
                 String.Format("type {0} not (yet) defined for {1}",
                               ((SimpleNode)node.jjtGetChild(0)).GetIdentification(),
                               node.GetIdentification()));
         }
         returnType = ReplaceByCustomMappedIfNeeded(returnType);
     }
     return returnType;
 }