Пример #1
0
/* Production 7: chapter 3.4, CORBA 2.3.1. spec; updated for local interfaces */
  public void interface_header() {
 /*@bgen(jjtree) interface_header */
  ASTinterface_header jjtn000 = new ASTinterface_header(this, IDLParserTreeConstants.JJTINTERFACE_HEADER);
  bool jjtc000 = true;
  jjtree.openNodeScope(jjtn000);String ident = "";
  System.Int32 ifType = IS_DEFAULT_IF;
    try {
      switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
      case 17:
      case 18:
        ifType = interface_qualifier();
        break;
      default:
        jj_la1[8] = jj_gen;
        ;
        break;
      }
      jj_consume_token(16);
      ident = identifier();
      switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
      case 19:
        interface_inheritance_spec();
        break;
      default:
        jj_la1[9] = jj_gen;
        ;
        break;
      }
    jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    jjtn000.setIdent(ident);
    if (ifType == IS_ABSTRACT_IF) {
       jjtn000.setAbstract();
    }
    if (ifType == IS_LOCAL_IF) {
       jjtn000.setLocal();
    }
    } 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(ASTinterface_header, Object)
  * @param data the buildinfo of the container, containing this interface (e.g of a module)
  * @return an array of System.Type containing all the interfaces the intefaced defined with this header extend
  */
 public Object visit(ASTinterface_header node, Object data) {
     Type[] result = new Type[0];
     ArrayList resList = new ArrayList();
     if (node.jjtGetNumChildren() > 0) {
         ASTinterface_inheritance_spec inheritSpec = (ASTinterface_inheritance_spec) node.jjtGetChild(0);
         result = (Type[])inheritSpec.jjtAccept(this, data);
         resList.AddRange(result);
     }
     if (m_interfaceToInheritFrom != null && !node.isLocal()) {
         resList.Add(m_interfaceToInheritFrom);
     }
     return resList.ToArray(typeof(Type));
 }