parse graphs from dot files