Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!jobone!lynx.unm.edu!fg1.plk.af.mil!mammoth.cs.unm.edu!ees1a0.engr.ccny.cuny.edu!cslabs2c6!cord2403
From: cord2403@cslabs2c6 (Homo Androides)
Subject: Implementing SAL interpreter in Prolog
Message-ID: <CzA4rs.3nr@ees1a0.engr.ccny.cuny.edu>
Summary: Implementing a SAL interpreter in Prolog
Keywords: SAL, Prolog, Interpreter
Sender: news@ees1a0.engr.ccny.cuny.edu
Organization: City College of New York
X-Newsreader: TIN [version 1.2 PL2]
Date: Mon, 14 Nov 1994 22:50:15 GMT
Lines: 32

Hello.

I am interested in writing an interpreter for the language SAL(N) [Simple 
Algorithmic Language] as defined in "The Theory of Computability : 
Programs, Machines, Effectiveness and Feasibility" by R. Sommerhalder and 
S. C. van Westrhenen.  I have seen the book "Writing Interpreters and 
Compilers" (Don't remember the author's name) but I found its code to be 
pre-ANSI C and a bit difficult to understand on a quick read.  I have 
been told that it is easy to implement such an interpreter in Prolog, but 
I do not know where to start.  For starters, I feel I have a general idea 
about parsing and lexical analysis (i.e. deciding whether the statements 
are legitimate to the language) but.. where I feel lost is.. what do I do 
next? (i.e. carrying out the interpreted actions).

I own the Clocksin Prolog book, and I even think there is a project to 
write a Prolog interpreter in Prolog (he he, overkill) in the latter 
hapters but I need something that can get me up to speed fairly fast.

Does anybody have pointers to reasonable references on implementing an 
interpreter, whether in Prolog (Logic), Functional (LISP/Scheme) or 
Imperative (C, Pascal, C++, etc.) ?

Err, keep in mind that I have not taken a Compiler Construction course 
yet, thus my cluelesness.

Thanks,

Jose' Cordones
cord2403@cslab.engr.ccny.cuny.edu
"Every day, we are working harder and harder to come up with more 
complicated addresses."

