http://clojure.org/reader says symbols "begin with a non-numeric
character and can contain alphanumeric characters and *, + ..."
What are the numeric characters? It seems to include '+' and '-' as
well as digits -- is that correct, and are there any more?
Cheers
--
Abhishek Reddy
http://abhishek.geek.nz
For something as simple as this (as well as things far more complex), it
never hurts to include a few examples (transcripts of Clojure REPL
interactions) that illustrate you issue.
Anyway, it seems that if a token begins with '+' or '-' and is
immediately followed by a digit or a decimal point, then the parser is
committed to decoding a number and if the sequence of characters so
beginning and continuing through until a white-space character
(including ',') cannot be validly construed as or decoded to a number,
then some sort of failure results.
The only possible anomaly I've been able to detect is this:
user=> +.0
java.lang.ClassNotFoundException: +.0
As far as I can tell, any input subsequence (either initial or following
a white-space or comma separator) that begins with '+' or '-' and whose
next character is a decimal point will yield this error. A sequence
beginning with '+' or '-' and followed by a (non-white-space) character
that is not a digit and not a decimal point will be decoded as a
symbol.
Considering the particular error elicited, I suspect some sort of bug.
At a minimum, it seems a "sub-optimal" indication of an unacceptable
input sequence.
Randall Schulz