Graph file parser and basic topologic sort