/// <summary>
        /// calculates the scope names of all the scopes represented by the inherited interfaces.
        /// </summary>
        /// <remarks>this method is used by IDLParser.</remarks>
        /// <returns>a list of scoped names IList /* <ASTscoped_name> */ </returns>
        public IList getInheritedScopeNames()
        {
            IList result = new ArrayList();

            for (int i = 0; i < jjtGetNumChildren(); i++)
            {
                ASTinterface_name ifName     = (ASTinterface_name)jjtGetChild(i);
                ASTscoped_name    scopedName = (ASTscoped_name)ifName.jjtGetChild(0);
                result.Add(scopedName);
            }
            return(result);
        }
Ejemplo n.º 2
0
/* Production 12: chapter 3.4, CORBA 2.3.1 */
  public void scoped_name() {
 /*@bgen(jjtree) scoped_name */
  ASTscoped_name jjtn000 = new ASTscoped_name(this, IDLParserTreeConstants.JJTSCOPED_NAME);
  bool jjtc000 = true;
  jjtree.openNodeScope(jjtn000);String part = "";
  String fullScopedName = "";
    try {
      switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
      case 21:
        jj_consume_token(21);
             fullScopedName = "::"; jjtn000.setHasFileScope(true);
        break;
      default:
        jj_la1[14] = jj_gen;
        ;
        break;
      }
      part = identifier();
                                                                                              fullScopedName += part; jjtn000.addNamePart(part);
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
        case 21:
          ;
          break;
        default:
          jj_la1[15] = jj_gen;
          goto label_5;
          break;
        }
        jj_consume_token(21);
        part = identifier();
                                                                                                                                                                                fullScopedName += ("::" + part); jjtn000.addNamePart(part);
      }
      label_5: ;
      
      jjtree.closeNodeScope(jjtn000, true);
      jjtc000 = false;
      jjtn000.setScopedName(fullScopedName);
    } catch (Exception jjte000) {
    if (jjtc000) {
      jjtree.clearNodeScope(jjtn000);
      jjtc000 = false;
    } else {
      jjtree.popNode();
    }
  {if (true) throw ;}
    } finally {
    if (jjtc000) {
      jjtree.closeNodeScope(jjtn000, true);
    }
    }
  }
Ejemplo n.º 3
0
 /**
  * @see parser.IDLParserVisitor#visit(ASTscoped_name, Object)
  * @param data a buildinfo instance
  * @return the symbol represented by this scoped name or null
  */
 public Object visit(ASTscoped_name node, Object data) {
     CheckParameterForBuildInfo(data, node);
     ArrayList parts = node.getNameParts();
     Scope currentScope = ((BuildInfo) data).GetBuildScope();
     if (node.hasFileScope()) { 
         currentScope = m_symbolTable.getTopScope(); 
     }
     
     Symbol found = m_symbolTable.ResolveScopedNameToSymbol(currentScope, parts);        
     if (found == null) {
         throw new InvalidIdlException("scoped name not resolvable: " + node.getScopedName() + 
                                    "; currentscope: " + ((BuildInfo) data).GetBuildScope().getScopeName()); 
     }        
     return found;
 }