Howdy list, As a first step in producing a complete formal grammar of Clojure I've put together some machinery and documentation for developing ANTLR grammars in a leiningen/Clojure environment. I think there is enough there that you can get directly to writing and testing grammars.
rsch.antlr <https://github.com/mobileink/rsch.antlr> is intended as a kind of research workbench for getting started with and exploring ANTLR grammars. It's quite elementary, with only a tiny bit of Clojure code for testing grammars from a repl or using lein test. But it contains some working examples and shell scripts and sufficient documentation to get you started working with grammars immediately. Although I'm using it to work on a Clojure grammar, it is language agnostic, so you can use it to get started on any language or DSL. I expect to add stuff to rsch.antlr, but I don't envisage ever packaging it as a product; if you want to use it just clone it and follow the instructions. I think it's simple enough, with enough doco, that you'll see immediately what to do. See also clj-antlr<https://github.com/aphyr/clj-antlr>, which is a more ambitious effort to Clojurize ANTLR. The focus of rsch.antlr is more on the process of developing and testing grammars, so it has more documentation at a more elementary level. Anybody interested in helping with a formal Clojure grammar should take a look at src/antlr/sym.g4, which is a rudimentary beginning of a grammar for Clojure symbols. One nice thing about ANTLR is that it makes it easy to modularize so you can work (test) on different parts of a grammar independently. Cheers, Gregg -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.