-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Portably read float and complex literals without special syntax.
* Instead of using a special $ character, just portably modify the XC readtable to do the right thing for floats by installing reader macros for every possible initial character for a float. Special care needs to be taken for #\., since consing dot needs to work. As of the time of this commit, CCL, ECL, and CLISP break without installing a left parenthesis macro that can also communicate with our new dot reader macro, while SBCL and CMU CL do just fine without the additional new left parenthesis character macro. It's unclear to me which behavior is correct, and it may be the case that the standard is underspecified in the situation where a reader macro is installed for dot and then someone tries to read in a dotted list. In any case, installing a left parenthesis reader macro for everybody is a portable solution that is guaranteed to work everywhere. * Also just install a reader macro for #c which constructs target complex numbers instead of writing out the constant construction manually. * This avoids the big hack where we intercepted reading normal number syntax in the reader only for specific versions of SBCL to catch float and complex literals written the normal way and flame. Now we can make sure host float and complex number literals never show up during the build when bootstrapping from *any* host Lisp, by never allowing host float and complex literals to be read in in the first place. * This change uncovered a bug in CCL, whereby it was no longer able to read #:-cache correctly. I've filed a bug for this here Clozure/ccl#489 and worked around the issue by just replacing it with its string name, since it was only used as an argument for SYMBOLICATE. * ECL also needs some help with the radix readers. See comment for bug report.
- Loading branch information
Showing
44 changed files
with
558 additions
and
518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.