':type name: str
:rtype: list of CaperClosure'

def _closure_split(self, name):

    closures = []
    def end_closure(closures, buf):
        buf = buf.strip(STRIP_CHARS)
        if (len(buf) < 2):
            return
        cur = CaperClosure(len(closures), buf)
        cur.left = (closures[(len(closures) - 1)] if (len(closures) > 0) else None)
        if cur.left:
            cur.left.right = cur
        closures.append(cur)
    state = CL_START
    buf = ''
    for (x, ch) in enumerate(name):
        if ((state == CL_START) and (ch in CL_START_CHARS)):
            end_closure(closures, buf)
            state = CL_END
            buf = ''
        buf += ch
        if ((state == CL_END) and (ch in CL_END_CHARS)):
            end_closure(closures, buf)
            state = CL_START
            buf = ''
        elif ((state == CL_START) and (buf[(-3):] in CL_END_STRINGS)):
            end_closure(closures, buf[:(-3)])
            state = CL_START
            buf = ''
    end_closure(closures, buf)
    return closures
