Updated Mapper grammar and added Reducer grammar.