Example #1
0
/* Production 91, chapter 3.4, corba 2.3.1 */
  public void param_dcl() {
 /*@bgen(jjtree) param_dcl */
  ASTparam_dcl jjtn000 = new ASTparam_dcl(this, IDLParserTreeConstants.JJTPARAM_DCL);
  bool jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      param_attribute();
      param_type_spec();
      simple_declarator();
    } 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(ASTparam_dcl, Object)
  * @param data the active buildinfo for the current scope
  * @return an instance of ParameterSpec, containing the relevant information
  */
 public Object visit(ASTparam_dcl node, Object data) {
     // determine direction ...
     ParameterSpec.ParameterDirection direction = ((ASTparam_attribute) node.jjtGetChild(0)).getParamDir();
     // determine name and type
     TypeContainer paramType = (TypeContainer)node.jjtGetChild(1).jjtAccept(this, data);
     if (paramType == null) {
         throw new InvalidIdlException(String.Format("parameter type {0} not (yet) defined for {1}", 
                                                     ((SimpleNode)node.jjtGetChild(1)).GetIdentification(),
                                                     node.GetIdentification()));
     }
     paramType = ReplaceByCustomMappedIfNeeded(paramType);
     String paramName = IdlNaming.MapIdlNameToClsName(((ASTsimple_declarator)node.jjtGetChild(2)).getIdent());
     
     ParameterSpec result = new ParameterSpec(paramName, paramType, direction);
     return result;
 }