I've been using Gambit Scheme as my primary language for about a <br>year now, and I'm finding it pretty much the best for what <br>I'm doing. However, the one thing that I find lacking is read- <br>macros: Why doesn't Scheme have an equivalent to CL's set-macro-char
<br>and the like? It seems to me that you can do lots of interesting <br>things with them that you couldn't do otherwise.<br><br>Does anyone know of a way to do something equivalent to the following CL in Gambit? I suspect that there's some way to do it using readtables...but I have no idea how..
<br> <br>(set-macro-character #\] (get-macro-character #\))) <br><br>(set-dispatch-macro-character #\# #\[ <br> #'(lambda (stream char1 char2) <br> (let ((accum nil) <br> (pair (read-delimited-list #\] stream t)))
<br> (do ((i (ceiling (car pair)) (1+ i))) <br> ((> i (floor (cadr pair))) <br> (list 'quote (nreverse accum))) <br> (push i accum)))))<br><br>Thanks for your time, any help is appreciated!
<br><br>James<br><br>