working latest and earliest dates algo, added grammar5.g, a grammar tested and working