parse all args.
 @param [Array] args arguments for parse
545563
def parse_args(args) #:nodoc:
      remapping = {}
      for arg in args
        splited = arg.split(':=')
        if splited.length == 2
          key, value = splited
          if key == '__name'
            @node_name = resolve_name(value)
          elsif key == '__ip'
            @host = value
          elsif key == '__hostname'
            @host = value
          elsif key == '__master'
            @master_uri = value
          elsif key == '__ns'
            @ns = value
          elsif key[0] == '_'[0]
            # local name remaps
            key[0] = '~'
            remapping[resolve_name(key)] = convert_if_needed(value)
          else
            # remaps
            remapping[key] = convert_if_needed(value)
          end
        end
      end
      remapping
    end
196719
public void parse(String... args) {
        try {
            parse(true /* validate */, args);
        } catch(ParameterException ex) {
            ex.setJCommander(this);
            throw ex;
        }
    }
1187805
def _parse_args(self, args=None, values=None):
        """"""
        options, arguments = self._parser.parse_args(args, values)
        return self._fix_set_options(options), arguments
617983
def parse_args(self, arguments=None):
        
        self._args = self.parser.parse_args(arguments)
        return self.args
1001456
protected void parse (String arg, Argument argDesc)
        throws YarrgParseException
    {
        Parser<?> parser = parsers.get(argDesc.field);
        if (parser == null) {
            parser = _cmd._factory.createParser(argDesc.field);
            parsers.put(argDesc.field, parser);
        }
        try {
            parser.add(arg);
        } catch (RuntimeException e) {
            throw new YarrgParseException(_usage, e.getMessage(), e);
        }
    }
476652
def parse(node)
      node.xpath('*').each do |argument_child|
        case argument_child.name
        when 'argSz'
          @argument_size = ArgumentSize.new(parent: self).parse(argument_child)
        end
      end
      self
    end
33226
def _runargs(argstring):
    
    import shlex
    parser = cli.make_arg_parser()
    args = parser.parse_args(shlex.split(argstring))
    run(args)
1221945
def parse_args(args=sys.argv[1:]):
    
    parser = argparse.ArgumentParser()
    parser.add_argument('-a', '--address', help='address to listen on, default localhost',
                                default='localhost')
    parser.add_argument('-p', '--port', help='port to listen on, default 1234',
                                default=1234, type=int)
    parser.add_argument('-d', '--directory', help='directory to serve, default .',
                                default='.')
    parser.add_argument('-n', '--noindex', help='do not show directory indexes',
                                default=False, action='store_true')
    loglevel = parser.add_mutually_exclusive_group()
    loglevel.add_argument('-v', '--verbose', help='verbose logging',
                                default=False, action='store_true')
    loglevel.add_argument('-q', '--quiet', help='quiet logging',
                                default=False, action='store_true')
    return parser.parse_args(args)
442312
function parse(args) {
  const cliArgs = [];
  const nodeArgs = [];

  for (const arg of args) {
    if (NODE_FLAGS.test(arg)) {
      nodeArgs.push(arg);
    } else {
      cliArgs.push(arg);
    }
  }

  return {
    cliArgs,
    nodeArgs
  };
}
742951
def parse_args
      parser = Trollop::Parser.new do
        opt :action, "", :type => :string
        opt :boot, ""
      end

      parse do
        parser.parse
      end
    end
1102246
function parseArgs() {
    var args = Array.prototype.slice.call(arguments);

    var ret = {
        query: args[0],
        params: [],
        options: {},
        callback: undefined,
        endCallback: undefined
    };

    args.shift();

    // If specified, params must be an array
    if (args[0] instanceof Array) {
        ret.params = args[0];
        args.shift();
    }

    // If specified, options must be a non-Function object
    if (! (args[0] instanceof Function)) {
        ret.options = args[0];
        args.shift();
    }

    ret.callback = args[0];
    ret.endCallback = args[1];

    if (ret.query === undefined || ret.callback === undefined) {
        throw new Error('query and callback are required');
    }

    return ret;
}
1016499
def parse_args(string):
    
    import ast
    is_quoted = False
    result_parts = []
    current_str = ""
    while len(string) > 0:
        if string[0] == "\"":
            is_quoted = not is_quoted
            current_str += string[0]
        elif string[0].isspace():
            if is_quoted:
                current_str += string[0]
            else:
                result_parts.append(current_str)
                current_str = ""
            # end if
        else:
            current_str += string[0]
        # end if
        string = string[1:]
    # end while
    if current_str:  # last part of the array
        result_parts.append(current_str)
    # end if
    for i in range(len(result_parts)):
        # Will try for each element if it is something pythonic. Parsed type will replace original list element.
        try:
            part = ast.literal_eval(result_parts[i])
            result_parts[i] = part  # write it back.
        except ValueError:
            # could not parse -> is string
            pass  # because already is str.
        # end try
    # end for
    return result_parts
786673
def parse(*args)
      @args = @options.parse! args.flatten.compact.map(&:to_s)

      self

    rescue OptionParser::MissingArgument, OptionParser::InvalidOption => e
      raise Boxen::Error, "#{e.message}\n#@options"
    end
945141
def _get_args_to_parse(args, sys_argv):
    
    arguments = args if args is not None else sys_argv[1:]
    _LOG.debug("Parsing arguments: %s", arguments)
    return arguments
1204868
function parseDSN_args($args) {
     	$retn = array();
     	foreach(explode("&",$args) as $arg) {
     	 	list($key,$val) = explode("=",trim($arg));
     	 	$retn[$key] = $val;
     	 	unset($key,$val);
     	}
     	return $retn;
    }
197957
function Args() {
    if (argv._.length >= 1) {
        try {
            // Attempt to parse 1st argument as JSON string
            _.extend(this, JSON.parse(argv._[0]));
        } catch (err) {
            // Pass, we must be in the console so don't worry about it
        }
    }
}
1345516
public void parse(ArgumentList args) {
        try {
            parseInternal(args);
        } catch (ArgumentException e) {
            if (e.getParser() == null) {
                e.setParser(this);
            }
            throw e;
        }
    }