[comp.lang.scheme] Prolog implemented in Scheme

sdp2@cunixb.cc.columbia.edu (Scott D Pauls) (04/16/91)

Several weeks ago, I saw an announcement on the net about a scheme-implemented 
version of prolog (albeit small).  After ftping it back to my system and
playing with it in MIT Scheme 7.0, I discovered the following problem:
in places where the prolog simulator was going to make use of braces or square
brackets as part of functions, scheme got confused.  The following is some
sample output: 
******SCHEME INTERACTION******
(load-noisily "prolog.ss")
;Value: debug?
;Value: user-debug?

.
.  intervening definitions
.

;Value: zero
;Value: one
PARSE-OBJECT: Undefined atom delimiter #\{

;;;;here's the code when it blows up...
*****CODE SEGMENT FROM PRIM.SS IN PROLOG1.1 PACKAGE******
;;; constants
(define ZERO	(real 0.0))
(define ONE	(real 1.0))
(define TWO	(real 2.0))
(define BRACKETS '( > { } < ) )     ;;;;*****From what I can tell, this is
                                    ;;;;*****where the problem arises.
**********************************

;;hmmm, brackets don't work well
{
(
[
;;All three of these make the same error,
;;"Containing expression ends prematurely"
*************************

Doesn't seem to like anything does it?  According to the Scheme Standard, 
{}[] are "reserved for future extensions to the language".  Does this mean
they can't be used as symbols?  From the above output, it seems that Scheme
thinks of them as possible delimiters for expressions initially, but
later decides that using them is objectionable.  Can anyone help me out
in deciding what exactly is going on? 

Thank you,

Scott Pauls		sdp2@cunixb.cc.columbia.edu

the pin will set you free