                  :junk     ""
                  :logical  (strfirst val)
                  :name     (map string/lower-case val)
-                 :nvseq    (delesort val)
-                 :nvsubseq ["  " (strfirst val) "=" (strlast val) "\n"]
+                 :nvseq    (string/join " " (delesort val))
+                 :nvsubseq [(strfirst val) "=" (strlast val)]
                  :partref  (strfirst val)
                  :percent  "%"
                  :r        (strfirst val)

        child :nvseq
        f     (fn [& v] (into [child] (nml-uniq v)))]
      (insta/transform {child f} tree)))

;; main


    (let [val (nml-get tree nml key)]
      (println (if no-prefix val (str nml ":" key "=" val))))))

;;(defn- nml-map [tree]
;; (let [q  #(str "\"" % "\"")
;;       f0 (fn [& nvsubseqs   ] (into {} nvsubseqs))
;;       f1 (fn [dataref values] { (q (nml-str dataref)) (q (nml-str values)) })
;;       f2 (fn [& stmts       ] (into {} stmts))
;;       f3 (fn [name nvseq    ] { (q (nml-str name)) nvseq })]
;;   (insta/transform {:nvseq f0 :nvsubseq f1 :s f2 :stmt f3 } tree)))

(defn- nml-map [tree]
  (let [f0 (fn [& nvsubseqs   ] (into {} nvsubseqs))
        f1 (fn [dataref values] { (nml-str dataref) (nml-str values) })
        f2 (fn [& stmts       ] (into {} stmts))
        f3 (fn [name nvseq    ] { (nml-str name) nvseq })]
    (insta/transform {:nvseq f0 :nvsubseq f1 :s f2 :stmt f3 } tree)))

(defn- nml-name [x]
