tweak grammar generation