Closed igorw closed 10 years ago
FWIW, edn-java allows -
, +
and .
as symbols and interprets the passage as:
If -
, +
or .
are the first character, the second character (if present) must be non-numeric.
The implementation considers anything beginning with -
or +
followed by a digit a number and attempts to parse it as such. If this fails, it must have been an invalid symbol. -
or +
followed by a non-digit is a symbol. There's a special case check for .
followed by a digit that takes place after otherwise successful recognition of a symbol.
(But there's a bug such that it currently accepts symbols of the form prefix/+name
: bpsm/edn-java#36)
The spec currently reads (emphasis mine):
This implies that
+
,-
and.
must have at least one non-numeric character following as part of the symbol. It should be reworded to clarify that those characters are also valid as single-character symbols.