rewrite the parse_one_file function, split the period into three different types