Update grammar.cpp