update grammar rules