An implementation of a shift reduce algorithm based on a grammar provided