parameter_1 : dataType parameterName
                   | dataType parameterName array
320522
def p_parameter_1(p):
    
    args = {}
    if len(p) == 4:
        args['is_array'] = True
        args['array_size'] = p[3]
    p[0] = CIMParameter(p[2], p[1], **args)
641524
function createParameters()
{
  var isNonNegativeInteger = Util.number.isNonNegativeInteger.bind(Util.number);
  var isPositiveInteger    = Util.number.isPositiveInteger.bind(Util.number);
  var isNonNegativeNumber  = Util.number.isNonNegative.bind(Util.number);

  return [
    {
      name         : PARAM_TIMEOUT,
      defaultValue : 90 * 1000,
      external     : true,
      validate     : isPositiveInteger
    },
    {
      name         : PARAM_RESULT_PREFETCH,
      defaultValue : 2,
      external     : true,
      validate     : isPositiveInteger
    },
    {
      name         : PARAM_RESULT_STREAM_INTERRUPTS,
      defaultValue : 3,
      validate     : isPositiveInteger
    },
    // for now we set chunk cache size to 1, which is same as 
    // disabling the chunk cache. Otherwise, cache will explode
    // memory when fetching large result set 
    {
      name         : PARAM_RESULT_CHUNK_CACHE_SIZE,
      defaultValue : 1,
      validate     : isPositiveInteger
    },
    {
      name         : PARAM_RESULT_PROCESSING_BATCH_SIZE,
      defaultValue : 1000,
      validate     : isPositiveInteger
    },
    {
      name         : PARAM_RESULT_PROCESSING_BATCH_DURATION,
      defaultValue : 100,
      validate     : isPositiveInteger
    },
    {
      name         : PARAM_ROW_STREAM_HIGH_WATER_MARK,
      defaultValue : 10,
      validate     : isPositiveInteger
    },
    {
      name         : PARAM_RETRY_LARGE_RESULT_SET_MAX_NUM_RETRIES,
      defaultValue : 10,
      validate     : isNonNegativeInteger
    },
    {
      name         : PARAM_RETRY_LARGE_RESULT_SET_MAX_SLEEP_TIME,
      defaultValue : 16,
      validate     : isNonNegativeInteger
    },
    {
      name         : PARAM_RETRY_SF_MAX_NUM_RETRIES,
      defaultValue : 1000,
      validate     : isNonNegativeInteger
    },
    {
      name         : PARAM_RETRY_SF_STARTING_SLEEP_TIME,
      defaultValue : 0.25,
      validate     : isNonNegativeNumber
    },
    {
      name         : PARAM_RETRY_SF_MAX_SLEEP_TIME,
      defaultValue : 16,
      validate     : isNonNegativeNumber
    }
  ];
}
663233
def input_parameter_json
      tmp_params = []
      @input_parameters.each_value { |v| tmp_params << v.as_struct if v.set? }
      param_struct = { parameters: tmp_params }
      param_struct.to_json
    end
1199979
def parameters(self, params):
        
        array = JavaArray(jobject=JavaArray.new_instance("weka.core.setupgenerator.AbstractParameter", len(params)))
        for idx, obj in enumerate(params):
            array[idx] = obj.jobject
        javabridge.call(self.jobject, "setParameters", "([Lweka/core/setupgenerator/AbstractParameter;)V", array.jobject)
1339121
int findParameterIndex(String parameterName) throws SQLException {

        checkClosed();

        int index = parameterNameMap.get(parameterName, -1);

        if (index >= 0) {
            return index + 1;
        }

        throw Util.sqlException(ErrorCode.JDBC_COLUMN_NOT_FOUND,
                                parameterName);
    }
1141727
def _ctypes_dtype(parameter):
    
    ctype = parameter.ctype
    if ctype is None:
        if parameter.kind is not None:
            return "{}({})".format(parameter.dtype, parameter.kind)
        else:
            return parameter.dtype
    else:
        return"{}({})".format(parameter.dtype, ctype)
1052522
private function extractExtendedParametersInfo(): void
  {
    $key = array_search('begin', $this->routineSourceCodeLines);

    if ($key!==false)
    {
      for ($i = 1; $i<$key; $i++)
      {
        $k = preg_match('/^\s*--\s+param:(?:\s*(\w+)\s+(\w+)(?:(?:\s+([^\s-])\s+([^\s-])\s+([^\s-])\s*$)|(?:\s*$)))?/',
                        $this->routineSourceCodeLines[$key - $i + 1],
                        $matches);

        if ($k==1)
        {
          $count = count($matches);
          if ($count==3 || $count==6)
          {
            $parameter_name = $matches[1];
            $data_type      = $matches[2];

            if ($count==6)
            {
              $list_delimiter = $matches[3];
              $list_enclosure = $matches[4];
              $list_escape    = $matches[5];
            }
            else
            {
              $list_delimiter = ',';
              $list_enclosure = '"';
              $list_escape    = '\\';
            }

            if (!isset($this->extendedParameters[$parameter_name]))
            {
              $this->extendedParameters[$parameter_name] = ['name'      => $parameter_name,
                                                            'data_type' => $data_type,
                                                            'delimiter' => $list_delimiter,
                                                            'enclosure' => $list_enclosure,
                                                            'escape'    => $list_escape];
            }
            else
            {
              throw new RoutineLoaderException("Duplicate parameter '%s'", $parameter_name);
            }
          }
          else
          {
            throw new RoutineLoaderException('Error: Expected: -- param: <field_name> <type_of_list> [delimiter enclosure escape]');
          }
        }
      }
    }
  }
1233225
def _match_data_to_parameter(cls, data):
    
    in_value = data["in"]
    for cls in [QueryParameter, HeaderParameter, FormDataParameter,
                PathParameter, BodyParameter]:
        if in_value == cls.IN:
            return cls
    return None
254276
def _ctypes_assign(parameter):
    
    #If the array is set to only have intent(out), we don't want to allocate or assign
    #a value to it; otherwise we do.
    if (parameter.direction != "(out)" and ("allocate" in parameter.modifiers
                                            or "pointer" in parameter.modifiers
                                            or "target" in parameter.modifiers)):
        if "in" in parameter.direction:
            splice = _ctypes_splice(parameter)
            result = []
            result.append("    allocate({}({}))".format(parameter.name, splice))
            result.append("    {0} = {0}_c".format(parameter.name))
            return ('\n'.join(result), True)
    elif parameter.dtype == "logical" and "in" in parameter.direction:
        return ("    {0} = {0}_c".format(parameter.name), False)
477836
private ParamTag[] paramTags(boolean typeParams) {
        ListBuffer<ParamTag> found = new ListBuffer<ParamTag>();
        for (Tag next : tagList) {
            if (next instanceof ParamTag) {
                ParamTag p = (ParamTag)next;
                if (typeParams == p.isTypeParameter()) {
                    found.append(p);
                }
            }
        }
        return found.toArray(new ParamTag[found.length()]);
    }
1132580
def _parametersAsIndex( self, ps ):
        """"""
        k = ""
        for p in sorted(ps.keys()):       # normalise the parameters
            v = ps[p]
            k = k + "{p}=[[{v}]];".format(p = p, v = v)
        return k
576794
def visitParam_def_elem(self, ctx:SystemRDLParser.Param_def_elemContext):
        

        # Construct parameter type
        data_type_token = self.visit(ctx.data_type())
        param_data_type = self.datatype_from_token(data_type_token)
        if ctx.array_type_suffix() is None:
            # Non-array type
            param_type = param_data_type
        else:
            # Array-like type
            param_type = rdltypes.ArrayPlaceholder(param_data_type)

        # Get parameter name
        param_name = get_ID_text(ctx.ID())

        # Get expression for parameter default, if any
        if ctx.expr() is not None:
            visitor = ExprVisitor(self.compiler)
            default_expr = visitor.visit(ctx.expr())
            default_expr = expressions.AssignmentCast(self.compiler.env, SourceRef.from_antlr(ctx.ID()), default_expr, param_type)
            default_expr.predict_type()
        else:
            default_expr = None

        # Create Parameter object
        param = Parameter(param_type, param_name, default_expr)

        # Register it in the parameter def namespace scope
        self.compiler.namespace.register_element(param_name, param, None, SourceRef.from_antlr(ctx.ID()))

        return param
986883
def parameter_type(self, parameter_type):
        
        allowed_values = ["SIMPLE", "LIST", "DYNAMIC"]  # noqa: E501
        if parameter_type not in allowed_values:
            raise ValueError(
                "Invalid value for `parameter_type` ({0}), must be one of {1}"  # noqa: E501
                .format(parameter_type, allowed_values)
            )

        self._parameter_type = parameter_type
548332
def ctypes_parameter(self):
        
        if self._ctypes_parameter is None:
            #Essentially, we just need to check if we are an array that doesn't have explicitly
            #defined bounds. Assumed-shape arrays have to be 'pointer' or 'allocatable'. However,
            #the deffered/assumed shape arrays always use ':' as the array dimension.
            if self.dimension is not None and ":" in self.dimension:
                result = [self._get_ctypes_name()]
                result.extend([self._get_ctypes_name(i+1) for i in range(self.D)])
                if self.direction == "(inout)" and ("allocatable" in self.modifiers or
                                                    "pointer" in self.modifiers):
                    result.append("{}_o".format(self.name))
                self._ctypes_parameter = result
            elif self.dtype == "logical":
                self._ctypes_parameter = [self._get_ctypes_name()]
            elif hasattr(self, "parameters"):
                #This is the handler for the function return types that are simple
                self._ctypes_parameter = [self.name + "_f"]
            else:
                #Nothing special, just return the standard name.
                self._ctypes_parameter = [self.name]

        return self._ctypes_parameter
1374054
def parse_parameter_array(self, tup_tree):
        

        self.check_node(tup_tree, 'PARAMETER.ARRAY', ('NAME', 'TYPE'),
                        ('ARRAYSIZE',), ('QUALIFIER',))

        attrl = attrs(tup_tree)

        array_size = attrl.get('ARRAYSIZE', None)
        if array_size is not None:
            # Issue #1044: Clarify if hex support is needed
            array_size = int(array_size)

        qualifiers = self.list_of_matching(tup_tree, ('QUALIFIER',))

        return CIMParameter(attrl['NAME'],
                            type=attrl['TYPE'],
                            is_array=True,
                            array_size=array_size,
                            qualifiers=qualifiers,
                            embedded_object=False)
58476
private static Object[] getInitParameters(Class<?>[] parameterTypes) {
        int length = parameterTypes.length;
        Object[] result = new Object[length];
        for (int i = 0; i < length; i++) {
            if (parameterTypes[i].isPrimitive()) {
                Object init = ClassUtil.getPrimitiveDefaultValue(parameterTypes[i]);
                result[i] = init;
                continue;
            }
            result[i] = null;
        }
        return result;
    }
553737
function Parameter(types, paramSpec, command, groupName) {
  this.command = command || { name: 'unnamed' };
  this.paramSpec = paramSpec;
  this.name = this.paramSpec.name;
  this.type = this.paramSpec.type;
  this.short = this.paramSpec.short;

  if (this.short != null && !/[0-9A-Za-z]/.test(this.short)) {
    throw new Error('\'short\' value must be a single alphanumeric digit.');
  }

  this.groupName = groupName;
  if (this.groupName != null) {
    if (this.paramSpec.option != null) {
      throw new Error('Can\'t have a "option" property in a nested parameter');
    }
  }
  else {
    if (this.paramSpec.option != null) {
      this.groupName = (this.paramSpec.option === true) ?
                       l10n.lookup('canonDefaultGroupName') :
                       '' + this.paramSpec.option;
    }
  }

  if (!this.name) {
    throw new Error('In ' + this.command.name +
                    ': all params must have a name');
  }

  var typeSpec = this.type;
  this.type = types.createType(typeSpec);
  if (this.type == null) {
    console.error('Known types: ' + types.getTypeNames().join(', '));
    throw new Error('In ' + this.command.name + '/' + this.name +
                    ': can\'t find type for: ' + JSON.stringify(typeSpec));
  }

  // boolean parameters have an implicit defaultValue:false, which should
  // not be changed. See the docs.
  if (this.type.name === 'boolean' &&
      this.paramSpec.defaultValue !== undefined) {
    throw new Error('In ' + this.command.name + '/' + this.name +
                    ': boolean parameters can not have a defaultValue.' +
                    ' Ignoring');
  }

  // All parameters that can only be set via a named parameter must have a
  // non-undefined default value
  if (!this.isPositionalAllowed && this.paramSpec.defaultValue === undefined &&
      this.type.getBlank == null && this.type.name !== 'boolean') {
    throw new Error('In ' + this.command.name + '/' + this.name +
                    ': Missing defaultValue for optional parameter.');
  }

  if (this.paramSpec.defaultValue !== undefined) {
    this.defaultValue = this.paramSpec.defaultValue;
  }
  else {
    Object.defineProperty(this, 'defaultValue', {
      get: function() {
        return this.type.getBlank().value;
      },
      enumerable: true
    });
  }

  // Resolve the documentation
  this.manual = lookup(this.paramSpec.manual);
  this.description = lookup(this.paramSpec.description, 'canonDescNone');

  // Is the user required to enter data for this parameter? (i.e. has
  // defaultValue been set to something other than undefined)
  // TODO: When the defaultValue comes from type.getBlank().value (see above)
  // then perhaps we should set using something like
  //   isDataRequired = (type.getBlank().status !== VALID)
  this.isDataRequired = (this.defaultValue === undefined);

  // Are we allowed to assign data to this parameter using positional
  // parameters?
  this.isPositionalAllowed = this.groupName == null;
}