function cleanGrammar(d, path) {
  return cleanPatternFields(clean(d, grammarSchema, path), path)
}
@param {Grammar} d
  Grammar to clean.
@param {string} path
  Path.
@returns {Grammar}
  Cleaned grammar.