(Click to view the contents, go to the attachments to download.)
——————
The code in C is an almost literal reimplementation of the Pascal code listed in the book. The first author rewrote the interpreter because C is vastly more popular than Pascal, and because...
... the code in Unix Pascal worked fine back in 1999. It is very close to the code listed in the book. Regrettably, that Pascal compiler is no more, and the best available public-domain compiler, Free Pascal, does not like a few things which older compilers were happy to accept.
Toy Prolog is a perfectly usable system, but it is toy, after all. So, for example, floating-point numbers are not supported and the associativity of arithmetic operators leaves something to be desired. We may later remove some small flaws, but do not hold your breath. (-:)
——————
All these program are licensed
under a Creative Commons Attribution 3.0 Unported License.
© Feliks Kluźniak & Stanisław Szpakowicz
ċ
ToyProlog_in_C.zip
(82k)
Stan Szpakowicz,
Oct 24, 2013, 11:00 AM
ċ
ToyProlog_in_Unix_Pascal.zip
(76k)
Stan Szpakowicz,
Oct 11, 2013, 6:06 AM