Created
May 31, 2012 16:48
-
-
Save hugoduncan/2844691 to your computer and use it in GitHub Desktop.
Trying to parse nested lists with cgrand's parsley
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; parse nested, punctuated lists in parsley | |
(def nested-list-parser | |
(parser | |
:expr #{:e1 [:expr "," :e1]} | |
:e1 #{"e" [:e1 ";" "e"]})) | |
(clojure.pprint/pprint (nested-list-parser "e;e;e,e;e")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment