added missing terminators in bnf definition