Search code examples
clojurespecifications

Is there a language spec for clojure?


Is there a language specification for clojure? Something that precisely defines the lexical syntax and grammar in EBNF or something similar?

The closest thing that I could find is the clojure website, but that doesn't really quite meet the requirements of a language spec (despite being an absolutely wonderful resource). If there is no spec, has our BDFL made mention of any plans for one?


Solution

  • This is the closest thing to an official Clojure EBNF that you are likely to find.

    https://github.com/laurentpetit/ccw/blob/3738a4fd768bcb0399630b7f6a6427a3066bdaa9/clojure-antlr-grammar/src/Clojure.g