Parse dot file to construct graph