 
          <ows>     = #'[\\s-_]*'
          "))
-       (insta/transform 
+       (insta/transform
          {:flat (constantly "-flat")
           :sharp (constantly "-sharp")
           :major (constantly :major)

         scale      = root | no-root

         root       = pitch <ows> r-scale?
         <r-scale>  = (major | minor) 
                    | pentatonic
                    | (major | minor) <ows> pentatonic
                    | pentatonic <ows> (major | minor) 
                    | blues

         major      = #'(?i)maj(or)?'

          :pitch (fn ([letter]
                       {:pitch (keyword letter)})
                     ([letter accidental]
                       {:pitch (keyword (str letter accidental))}))
          :scale (fn [[type & attrs]]
                   (conj {:type type}
                         (if-let [pitch (:pitch (first attrs))]
                           (let [attrs (rest attrs)]
                             {:pitch pitch
                              :scale (case (count attrs)
                                       0 :major
                                       1 (if (= (first attrs) :pentatonic)
