Fix parser + test print and toposort.