instaparse

If you're not trampolining your parser, why bother getting up in the morning?
Ed 2021-06-09T11:40:01.010100Z

So I fiddled with my grammar a bit, so it captured some more strings than I needed to actually do the transformations I wanted to do using regexes, and the recursive printer ended up being

(defn write-tag [writer template]
  (if (vector? template)
    (doseq [s (next template)]
      (write-tag writer s))
    (.write writer template))
  writer)

(defn write-template [template]
  (.toString (write-tag (StringWriter.) template)))
Simples ... should have just tried to write it in the first place 😉

1