def parse(self, file_obj):
order = <NUM_LIT:1><EOL>host = {"<STR_LIT:host>": ['<STR_LIT:*>'], "<STR_LIT>": {}, }<EOL>for line in file_obj:<EOL><INDENT>line = line.rstrip('<STR_LIT:\n>').lstrip()<EOL>if line == '<STR_LIT>':<EOL><INDENT>self._config.append({<EOL>'<STR_LIT:type>': '<STR_LIT>',<EOL>'<STR_LIT:value>': line,<EOL>'<STR_LIT:host>': '<STR_LIT>',<EOL>'<STR_LIT>': order,<EOL>})<EOL>order += <NUM_LIT:1><EOL>continue<EOL><DEDENT>if line.startswith('<STR_LIT:#>'):<EOL><INDENT>self._config.append({<EOL>'<STR_LIT:type>': '<STR_LIT>',<EOL>'<STR_LIT:value>': line,<EOL>'<STR_LIT:host>': '<STR_LIT>',<EOL>'<STR_LIT>': order,<EOL>})<EOL>order += <NUM_LIT:1><EOL>continue<EOL><DEDENT>if '<STR_LIT:=>' in line:<EOL><INDENT>if line.lower().strip().startswith('<STR_LIT>'):<EOL><INDENT>proxy_re = re.compile(r"<STR_LIT>", re.I)<EOL>match = proxy_re.match(line)<EOL>key, value = match.group(<NUM_LIT:1>).lower(), match.group(<NUM_LIT:2>)<EOL><DEDENT>else:<EOL><INDENT>key, value = line.split('<STR_LIT:=>', <NUM_LIT:1>)<EOL>key = key.strip().lower()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>i = <NUM_LIT:0><EOL>while (i < len(line)) and not line[i].isspace():<EOL><INDENT>i += <NUM_LIT:1><EOL><DEDENT>if i == len(line):<EOL><INDENT>raise Exception('<STR_LIT>' % line)<EOL><DEDENT>key = line[:i].lower()<EOL>value = line[i:].lstrip()<EOL><DEDENT>if key == '<STR_LIT:host>':<EOL><INDENT>self._config.append(host)<EOL>value = value.split()<EOL>host = {<EOL>key: value,<EOL>'<STR_LIT>': {},<EOL>'<STR_LIT:type>': '<STR_LIT>',<EOL>'<STR_LIT>': order<EOL>}<EOL>order += <NUM_LIT:1><EOL><DEDENT>elif key in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>if key in host['<STR_LIT>']:<EOL><INDENT>host['<STR_LIT>'][key].append(value)<EOL><DEDENT>else:<EOL><INDENT>host['<STR_LIT>'][key] = [value]<EOL><DEDENT><DEDENT>elif key not in host['<STR_LIT>']:<EOL><INDENT>host['<STR_LIT>'].update({key: value})<EOL><DEDENT><DEDENT>self._config.append(host)<EOL>
Read an OpenSSH config from the given file object.

@param file_obj: a file-like object to read the config file from
@type file_obj: file