revised grammar to keep it equivalent to grammar.pdf