A  parser for grammar