This implementation has the same tree building logic as the parser described by Nivre (2003), differing from it only with respect to the control structure.
it can be seen as a different realization of the schema shown in Section 3.6.