def parse_compound_file(f, context=None):
f.readline()  <EOL>for lineno, row in enumerate(csv.reader(f, delimiter='<STR_LIT:\t>')):<EOL><INDENT>compound_id, names, formula = row[:<NUM_LIT:3>]<EOL>names = (decode_name(name) for name in names.split('<STR_LIT>'))<EOL>m = re.match(r'<STR_LIT>', formula)<EOL>if m is not None:<EOL><INDENT>if m.group(<NUM_LIT:2>) != '<STR_LIT>':<EOL><INDENT>formula = '<STR_LIT>'.format(m.group(<NUM_LIT:1>), m.group(<NUM_LIT:2>))<EOL><DEDENT>else:<EOL><INDENT>formula = '<STR_LIT>'.format(m.group(<NUM_LIT:1>))<EOL><DEDENT><DEDENT>formula = formula.strip()<EOL>if formula == '<STR_LIT>' or formula == '<STR_LIT>':<EOL><INDENT>formula = None<EOL><DEDENT>mark = FileMark(context, lineno, <NUM_LIT:0>)<EOL>yield CompoundEntry(compound_id, names, formula, filemark=mark)<EOL><DEDENT>
Iterate over the compound entries in the given file