recursive parsing of .dat files