DOT parser rewritten