update grammar and generator