Last active
December 16, 2015 06:39
-
-
Save mnemnion/5393177 to your computer and use it in GitHub Desktop.
A bit of Clojure to make case-insensitive token match rules in ANTLR
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
(defn caseify [string] | |
(apply str (map (fn [foo] (apply str ["(" "'" (upper-case foo) "'" "|" "'" foo "'" ")"])) | |
(rest (split string #""))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment