Prolog.c: a simple Prolog interpreter written in 200 LOC of C++ (2000)
cl.cam.ac.uk
cl.cam.ac.uk
He also has theory papers explaining the architecture. For example: http://logic.cse.unt.edu/tarau/research/NewJinniPapers/fluen...
(a couple of others in the Wikipedia disambiguation page are worrisome ...)
You could even write a compiler (http://comjnl.oxfordjournals.org/content/34/1/64.full.pdf) or disassembler (http://www.dtic.mil/dtic/tr/fulltext/u2/a242987.pdf) in Prolog fairly easy. All thanks to the really smooth support of tree-like structures.
I do wonder why all this seems to be a little forgotten. Granted, the syntax and semantics are a bit unusual, but the expressive power can hardly be matched.
I understand this isn't a code review and I'm not trying to be critical but it's saddens me to see poor C++ code being shown online because that's partly responsible for the bad rap of the language - I know there are other reasons, but this doesn't help.
It certainly _could_ be a lot different, using a more functional approach, but it likely wouldn't be, and would remain a basic OO program dressed in new syntax.