'Initialize the header Column objects from the table ``lines`` for a CDS
header.
Parameters
lines : list
List of table lines'

def get_cols(self, lines):

    if (self.readme and self.data.table_name):
        in_header = False
        readme_inputter = core.BaseInputter()
        f = readme_inputter.get_lines(self.readme)
        lines = []
        comment_lines = 0
        for line in f:
            line = line.strip()
            if in_header:
                lines.append(line)
                if line.startswith(('------', '=======')):
                    comment_lines += 1
                    if (comment_lines == 3):
                        break
            else:
                match = re.match('Byte-by-byte    Description    of    file:    (?P<name>.+)$', line, re.IGNORECASE)
                if match:
                    names = [s for s in re.split('[,    ]+', match.group('name')) if s]
                    for pattern in names:
                        if fnmatch.fnmatch(self.data.table_name, pattern):
                            in_header = True
                            lines.append(line)
                            break
        else:
            raise core.InconsistentTableError("Can't    find    table    {0}    in    {1}".format(self.data.table_name, self.readme))
    found_line = False
    for (i_col_def, line) in enumerate(lines):
        if re.match('Byte-by-byte    Description', line, re.IGNORECASE):
            found_line = True
        elif found_line:
            i_col_def -= 1
            break
    re_col_def = re.compile('\\s*\n                                                                                                                                                (?P<start>    \\d+    \\s*    -)?    \\s*\n                                                                                                                                                (?P<end>            \\d+)                                \\s+\n                                                                                                                                                (?P<format>    [\\w.]+)                    \\s+\n                                                                                                                                                (?P<units>    \\S+)                                \\s+\n                                                                                                                                                (?P<name>        \\S+)\n                                                                                                                                                (\\s+    (?P<descr>    \\S.*))?', re.VERBOSE)
    cols = []
    for line in itertools.islice(lines, (i_col_def + 4), None):
        if line.startswith(('------', '=======')):
            break
        match = re_col_def.match(line)
        if match:
            col = core.Column(name=match.group('name'))
            col.start = (int(re.sub('[-\\s]', '', (match.group('start') or match.group('end')))) - 1)
            col.end = int(match.group('end'))
            col.unit = match.group('units')
            if (col.unit == '---'):
                col.unit = None
            col.description = (match.group('descr') or '').strip()
            col.raw_type = match.group('format')
            col.type = self.get_col_type(col)
            match = re.match('\\?    (?P<equal>    =)?    (?P<nullval>    \\S*)    (\\s+    (?P<descriptiontext>    \\S.*))?', col.description, re.VERBOSE)
            if match:
                col.description = (match.group('descriptiontext') or '').strip()
                if issubclass(col.type, core.FloatType):
                    fillval = 'nan'
                else:
                    fillval = '0'
                if (match.group('nullval') == '-'):
                    col.null = '---'
                    for i in [1, 2, 3, 4]:
                        self.data.fill_values.append((('-' * i), fillval, col.name))
                else:
                    col.null = match.group('nullval')
                    self.data.fill_values.append((col.null, fillval, col.name))
            cols.append(col)
        elif cols:
            cols[(-1)].description += line.strip()
        else:
            raise ValueError('Line    "{}"    not    parsable    as    CDS    header'.format(line))
    self.names = [x.name for x in cols]
    self.cols = cols
