Returns a list of complete Fortran statements for the specified lines by
        dealing with comments and line continuations. Returns a list of tuples of
        the form (linenum, statement, orginal character length).

        :arg start: the start index in the overall document for these lines.

def _get_statements(self, lines, start):
        """Returns a list of complete Fortran statements for the specified lines by
        dealing with comments and line continuations. Returns a list of tuples of
        the form (linenum, statement, orginal character length).

        :arg start: the start index in the overall document for these lines.
        """
        result = []
        statement = []
        nocomment = [l.split("!")[0] for l in lines]
        length = 0

        for i in range(len(nocomment)):
            line = nocomment[i].strip()
            linenum = start + i
            length += len(lines[i]) + 1

            if len(line) == 0 or line[-1] != "&":
                statement.append(line)
                result.append((linenum-len(statement)+1, 
                               " ".join(statement), length))
                statement = []
                length = 0
            else:
                #Append the line without the continuation character.
                statement.append(line[:len(line)-1])

        return result