Upgrade grammar