(tokenlist, value)
Do our best to find the parameters in an invalid MIME header
Do our best to find the parameters in an invalid MIME header
Do our best to find the parameters in an invalid MIME header
def _find_mime_parameters(tokenlist, value):
    """Do our best to find the parameters in an invalid MIME header

    """
    while value and value[0] != ';':
        if value[0] in PHRASE_ENDS:
            tokenlist.append(ValueTerminal(value[0], 'misplaced-special'))
            value = value[1:]
        else:
            token, value = get_phrase(value)
            tokenlist.append(token)
    if not value:
        return
    tokenlist.append(ValueTerminal(';', 'parameter-separator'))
    tokenlist.append(parse_mime_parameters(value[1:]))
def _find_mime_parameters ( tokenlist , value ) : while value and value [ 0 ] != ';' : if value [ 0 ] in PHRASE_ENDS : tokenlist . append ( ValueTerminal ( value [ 0 ] , 'misplaced-special' ) ) value = value [ 1 : ] else : token , value = get_phrase ( value ) tokenlist . append ( token ) if not value : return tokenlist . append ( ValueTerminal ( ';' , 'parameter-separator' ) ) tokenlist . append ( parse_mime_parameters ( value [ 1 : ] ) )