Created
February 22, 2010 22:22
-
-
Save ericnormand/311583 to your computer and use it in GitHub Desktop.
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
(def end (p/not-followed-by p/anything)) | |
(def lang1 | |
(p/alt | |
(p/invisi-conc (term (partial = :a)) end) | |
(p/invisi-conc (term (partial = :a)) (term (partial = :a)) end))) | |
(def lang2 | |
(p/invisi-conc (p/alt (term (partial = :a)) | |
(p/invisi-conc (term (partial = :a)) (term (partial = :a)))) | |
end)) | |
(lang1 {:remainder [:a :a]}) | |
; => [:a {:remainder nil}] | |
(lang2 {:remainder [:a :a]}) | |
; => nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment