manuel-serrano / bigloo

a practical Scheme compiler
http://www-sop.inria.fr/indes/fp/Bigloo
Other
139 stars 20 forks source link

Numerical character constants #5

Closed svenha closed 5 years ago

svenha commented 6 years ago

R7RS, R6Rs and many Scheme implementations settled on the following convention for numerical character constants: #\x41 . Bigloo uses #a065 for the same character #\A. For better interoperability in the Scheme world, could bigloo support the #\xHEX notation?

manuel-serrano commented 6 years ago

Did that. I have also added the new named character R7RS introduces (alarm, ...). The new commit will be there in a moment.

svenha commented 6 years ago

You extended the reader side, which is a good step because it allows bigloo to read data from other Scheme implementations. How about the writer side? write writes Latin-1 characters that are not in ASCII as #a223 which other Schemes cannot read.

manuel-serrano commented 6 years ago

Did that too. I have just pushed that version.

svenha commented 6 years ago

Excellent! I will test it soon.

svenha commented 6 years ago

The current 4.3d tar file shows problems with some character constants: 1:=> (char->integer #\xe9) 233

This is ok, but the next fails:

1:=> (char->integer #\xea)

File "stdin", line 2, character 42:

(char->integer #\xea)

*** ERROR:read Illegal character -- #\xea 1:=> File "stdin", line 2, character 42:

(char->integer #\xea)

*** WARNING:bigloo:read Superfluous closing parenthesis `)'

Is the bootstrap incomplete?

manuel-serrano commented 6 years ago

Ah yes, I see that. A small mistake in the parser that confuses xea with an (unknown) character names (such as tab, space, null, ...). I fixed that. I will upload a new version in a couple of minutes. Thanks.

svenha commented 5 years ago

The new version is there :-) and I can confirm that #\x character constants work now.