'Performs a projective dependency parse on the list of tokens using
a chart-based, span-concatenation algorithm similar to Eisner (1996).
:param tokens: The list of input tokens.
:type tokens: list(str)
:return: An iterator over parse trees.
:rtype: iter(Tree)'

def parse(self, tokens):

    self._tokens = list(tokens)
    chart = []
    for i in range(0, (len(self._tokens) + 1)):
        chart.append([])
        for j in range(0, (len(self._tokens) + 1)):
            chart[i].append(ChartCell(i, j))
            if (i == (j + 1)):
                chart[i][j].add(DependencySpan((i - 1), i, (i - 1), [(-1)], [u'null']))
    for i in range(1, (len(self._tokens) + 1)):
        for j in range((i - 2), (-1), (-1)):
            for k in range((i - 1), j, (-1)):
                for span1 in chart[k][j]._entries:
                    for span2 in chart[i][k]._entries:
                        for newspan in self.concatenate(span1, span2):
                            chart[i][j].add(newspan)
    for parse in chart[len(self._tokens)][0]._entries:
        conll_format = u''
        for i in range(len(tokens)):
            conll_format += (u' DCTB %d DCTB %s DCTB %s DCTB %s DCTB %s DCTB %s DCTB %d DCTB %s DCTB %s DCTB %s\n' % ((i + 1), tokens[i], tokens[i], u'null', u'null', u'null', (parse._arcs[i] + 1), u'ROOT', u'-', u'-'))
        dg = DependencyGraph(conll_format)
        (yield dg.tree())
