parse the command line to generate an abstract job order dictionary,
        based on the parameters defined in the ACD
        structure of job order is that for each defined parameter, there is
        a dictionary entry containing its value and the value of its various
        qualifiers

def parse_command_lines(self, acd_def):
        """
        parse the command line to generate an abstract job order dictionary,
        based on the parameters defined in the ACD
        structure of job order is that for each defined parameter, there is
        a dictionary entry containing its value and the value of its various
        qualifiers
        """
        command_line_string = ' '.join([cl.command_line for cl in
                                        self.command_lines])
        command_line_string = command_line_string.replace('=',' ')
        command_line_array = [param_value for
                              param_value in command_line_string.split(' ')
                              if param_value != '']
        job_order = {}
        for parameter in acd_def.desc_parameters():
            job_order[parameter.name]={'value':None}
        """dictionary describing the parameter values passed to the job"""
        cl_chunks = iter(command_line_array)
        parameters_count = 0
        for chunk in cl_chunks:
            if chunk.replace('-','') in ['auto', 'stdout', 'debug', 'filter',
                                         'help', 'options']:
                # ignore all global qualifiers?
                #ignore auto qualifier, which should be automatically set by
                #wrappers
                continue
            if chunk.startswith('-'):
                # parameter values that start with the -name
                name = chunk[1:]
                parameter = acd_def.parameter_by_name(name)
                if parameter is not None:
                    if isinstance(parameter, BooleanParameter) or isinstance(
                            parameter, ToggleParameter):
                        parameter_value = True
                    else:
                        parameter_value = six.next(cl_chunks)
                    if parameter.qualifiers.get('parameter', {'default_value': False}).get('default_value') == True:
                        parameters_count += 1
                    job_order[parameter.name]['value'] = parameter_value
                else:
                    if name.startswith('no') and acd_def.parameter_by_name(
                            name[2:]) is not None:
                        parameter = acd_def.parameter_by_name(
                            name[2:])
                        job_order[parameter.name]['value'] = False
                    else:
                        index = None
                        if name[-1].isdigit():
                            #if digits are used for explicit ordering of
                            # qualifiers
                            index = int(name[-1])-1
                            name = name[:-1]
                        parameters = acd_def.parameter_by_qualifier_name(
                            name)
                        if len(parameters)==1:
                            parameter = parameters[0][0]
                            qualifier_name = parameters[0][1]
                            if parameters[0][2]['value_type']=='bool':
                                parameter_value = True
                            else:
                                parameter_value = six.next(cl_chunks)
                            job_order[parameter.name][qualifier_name] = parameter_value
                        elif len(parameters)>1:
                            # ambiguous qualifier name
                            if index is not None:
                                parameter = parameters[index][0]
                                qualifier_name = parameters[index][1]
                                if parameters[index][2]['value_type']=='bool':
                                    parameter_value = True
                                else:
                                    parameter_value = six.next(cl_chunks)
                                job_order[parameter.name][qualifier_name] = parameter_value
                            else:
                                # in case multiple parameters match for the
                                # qualifier, we set it for all the
                                # parameters, assuming these are
                                # 'toggle-controlled'
                                for match in parameters:
                                    parameter = match[0]
                                    qualifier_name = match[1]
                                    if match[2]['default_value']=='bool':
                                        parameter_value = True
                                    else:
                                        parameter_value = six.next(cl_chunks)
                                    job_order[parameter.name][
                                        qualifier_name] = parameter_value
                        else: #len(parameters)==0
                            # testing for a no-prefixed qualifier
                            parameters = acd_def.parameter_by_qualifier_name(
                                name[2:])
                            if len(parameters) == 1:
                                parameter = parameters[0][0]
                                qualifier_name = parameters[0][1]
                                job_order[parameter.name][
                                    qualifier_name] = False
                            elif len(parameters) > 1:
                                # ambiguous qualifier name
                                if index is not None:
                                    parameter = parameters[index][0]
                                    qualifier_name = parameters[index][1]
                                    job_order[parameter.name][
                                        qualifier_name] = False
                                else:
                                    #in case multiple parameters match for the
                                    # qualifier, we set it for all the
                                    # parameters, assuming these are
                                    # 'toggle-controlled'
                                    for match in parameters:
                                        parameter = match[0]
                                        qualifier_name = match[1]
                                        job_order[parameter.name][
                                            qualifier_name] = False
                            else:  # len(parameters)==0
                                #if absolutely no matching parameter found,
                                # it may be an abbreviation for a global
                                # qualifier
                                if [gq for gq in ['auto', 'stdout',
                                                         'debug', 'filter',
                                                         'help', 'options']
                                    if gq.startswith(name)]:
                                        continue
                                #if not, raise an error
                                raise UnknownOptionParseException(name)
            else:
                # parameter values by position on the command line
                parameter = acd_def.parameter_by_index(parameters_count)
                job_order[parameter.name]['value'] = chunk
                if parameter.qualifiers.get('parameter', {'default_value': False}).get('default_value')==True:
                    parameters_count += 1
        input_lines_array = [line.input_line for line in self.input_lines]
        for parameter in acd_def.desc_parameters():
            if len(input_lines_array)==0:
                break
            if job_order[parameter.name]['value'] is None:
                job_order[parameter.name]['value']=input_lines_array.pop(0)
        for key in list(job_order.keys()):
            if job_order[key]=={'value':None}:
                del job_order[key]
        return job_order