I hope these codes
(12 3.5 1e4)
could be treated as three symbols
(|12| |3.5| |1e4|)
rather than three numbers.
Can I fulfill this by setting the reader?
Update:
I have a collection of data which is organized as nested lists:
(abc,d/e-f 12ab, 21e4, %rqa, (foo bar), ....)
Different items are separated by commas or spaces (tab and newline included). I want to read them in w.r.t. the nested structure, and without changing any character. The commas can be set as spaces by this:
(set-syntax-from-char #\, #\Space)
Finally the problem remains at the numbers. 21e4
is transferred to 210000.0
by the reader. I don't want to write a parser all from scratch, and try to utilize the reader of common-lisp as much as possible.
You could, I guess. But that would probably end in tears, as you would lose the ability to read numbers.
What are you trying to accomplish, with this, that isn't solvable by iterating over a list of numbers, creating symbols with
make-symbol
andstring
?