mirror of https://github.com/vacp2p/research.git
instaparse hello world
This commit is contained in:
parent
e95a998375
commit
17c5d87462
|
@ -3,5 +3,6 @@
|
|||
:url "http://example.com/FIXME"
|
||||
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
|
||||
:url "https://www.eclipse.org/legal/epl-2.0/"}
|
||||
:dependencies [[org.clojure/clojure "1.10.0"]]
|
||||
:dependencies [[org.clojure/clojure "1.10.0"]
|
||||
[instaparse "1.4.10"]]
|
||||
:repl-options {:init-ns hello-abnf.core})
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
(ns hello-abnf.core)
|
||||
(ns hello-abnf.core
|
||||
(:require [instaparse.core :as insta]))
|
||||
|
||||
(defn foo
|
||||
"I don't do a whole lot."
|
||||
[x]
|
||||
(println x "Hello, World!"))
|
||||
|
||||
(def as-and-bs
|
||||
(insta/parser
|
||||
"S = AB*
|
||||
AB = A B
|
||||
A = 'a'+
|
||||
B = 'b'+"))
|
||||
|
||||
(as-and-bs "aaaaabbbaaaabb")
|
||||
|
|
Loading…
Reference in New Issue