program prolog(input, output); { System dependent... procedure setlinebuffering; external; } {was on Sun c2007} label 99; {error failure; stop} type alfa = packed array [1..10] of char; #include "lex.type.P" {Lexical Types} #include "syntax.type.P" {Syntactic Types} #include "env.type.P" {Environments} var prog:tree; #include "tree.P" {Manipulate trees and nodes} #include "syntax.P" {The Parser} #include "env.P" {Manipulate Environments} #include "syntax.print.P" {Print a Parse Tree} #include "execute.P" {interpreter} begin { setlinebuffering; { system dependent } prog:=parser; writeln; writeln(' --- end of parsing --- '); printtree(prog, nil); writeln; writeln(' --- running --- '); execute(prog); 99:writeln; writeln(' --- finished --- ') end. {\fB Prolog Interpreter, Main Program. \fP} { L. Allison, Dept. Computer Science, Monash University, Australia 3800 } { http://www.csse.monash.edu.au/~lloyd/tildeLogic/Prolog.toy/ } {Do not remove: Main.p, env*P, execute.P, unify.P, rename.P, prove.P, lex*P, } { syntax*P, tree.P are released under Gnu `copyleft' General Public Licence }