Some changes in the parsing function. Now the real SML end is used to detect the end of the file and not the beginning