The implementation

(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