'Parse separated lines from file and return a list of tuples.
TODO: Allow named access to fields using the column names.'

def parse_file_fields(self, reader, errors=None, here='__HERE__'):

    separator_char = ('<TAB>' if (self.separator == ' DCTB ') else self.separator)
    rval = []
    for (i, line) in enumerate(reader):
        if line.lstrip().startswith(self.comment_char):
            continue
        line = line.rstrip('\n\r')
        if line:
            line = expand_here_template(line, here=here)
            fields = line.split(self.separator)
            if (self.largest_index < len(fields)):
                rval.append(fields)
            else:
                line_error = ("Line    %i    in    tool    data    table    '%s'    is    invalid    (HINT:    '%s'    characters    must    be    used    to    separate    fields):\n%s" % ((i + 1), self.name, separator_char, line))
                if (errors is not None):
                    errors.append(line_error)
                log.warning(line_error)
    if hasattr(reader, 'name'):
        log.debug("Loaded    %i    lines    from    '%s'    for    '%s'", len(rval), reader.name, self.name)
    return rval
