Instaparse

Remix this to get started with Instaparse.

{:deps {org.clojure/clojure {:mvn/version "1.10.0"}
        instaparse {:mvn/version "1.4.10"}
        compliment {:mvn/version "0.3.9"}}}
deps.edn
Extensible Data Notation

Happy parsing 🎉

(require '[instaparse.core :as insta])
(def word-parser
  (insta/parser "sentence = word (<space> word)* <dot>
                 space = #'\\s'
                 dot = '.'
                 word = #'[A-Za-z]+'"))
(word-parser "hello instaparse.")
0.2s
Clojure
Vector(3) [:sentence, Vector(2), Vector(2)]
Runtimes (1)