edn-format / edn

Extensible Data Notation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single-quote is not mentioned as a valid symbol character

bendlas opened this issue · comments

The language on symbols and keywords: https://github.com/edn-format/edn#symbols
doesn't mention, that ' is allowed in symbols.

Good point.

It is also worth noting that according to the Clojure reader (documented at http://clojure.org/reader), ' is allowed in Clojure symbols (and thus keywords):

Symbols begin with a non-numeric character and can contain alphanumeric characters and *, +, !, -, _, ', and ? (other characters may be allowed eventually).

I think this is an error in the edn specification.

Printing all symbols of the core namespace gives +' as symbol. This cannot be parsed by a parser written after the spec. Who can fix the spec?

There seems to be a similar problem with the spec not allowing the "<" and ">" characters in symbols.

I think this is a spec bug. I created #89.