rename 'rules' to 'grammar'