[comp.sys.mac.programmer] Shell of an interpreter wanted

vrm@blackwater.cerc.wvu.wvnet.edu (Vasile R. Montan) (12/17/90)

I recently posted a request for hints on writing an interpreter.
Someone suggested that I not start from scratch, but rather begin
with the shell of an interpreter which somebody else has already
written.  This would save me an incredible amount of work, since
I have very little idea how to write an interpreter.

If someone has the shell of an interpreter which includes the
major parts of a language (looping, branching, parsing, variable
management, etc.) into which I could add my own commands, would
you consider sending me a copy?  I am working in Pascal, although
this would be such a boon that I would try to learn C if some C
code were available.

I want the interpreter for a 'build-it-yourself' kind of program,
a kind of a very specialized Hypercard.  I want to be able to
have the user's scripts respond to various things that happen.

Thank you very much!

--Kurisuto (who is not Vasile)
un020070@vaxa.wvnet.edu

Andrew Gilmartin (12/18/90)

In article <1115@babcock.cerc.wvu.wvnet.edu> vrm@blackwater.cerc.wvu.wvnet.edu
(Vasile R. Montan) writes:

>If someone has the shell of an interpreter which includes the
>major parts of a language (looping, branching, parsing, variable
>management, etc.) into which I could add my own commands, would
>you consider sending me a copy?

ExTalk is available for anonymous FTP from brownvm.brown.edu. Once,
connected, cd to "andrew.1a0".

Note: interpreting the code that is not hard, but managing variables
of different data types is.

> I am working in Pascal, although
>this would be such a boon that I would try to learn C if some C
>code were available.

Wirth's Algorithms + Data Structues = Programs has pascal code for
a pascal like language. The chapter is quite lucid, however the
book's code tends to be obscure and often buggy. 

Lawson.English@p88.f15.n300.z1.fidonet.org (Lawson English) (12/19/90)

Vasile R. Montan writes in a message to All

VRM> If someone has the shell of an interpreter which includes the 
VRM> major parts of a language (looping, branching, parsing, variable 
VRM> management, etc.) into which I could add my own commands, would 
VRM> you consider sending me a copy? I am working in Pascal, although 
VRM> this would be such a boon that I would try to learn C if some 
VRM> C code were available. 

Look for a book called "Programming Languages: An Interpreter-Based Approach"
by Samuel N. Kamin, Addison-Wesely, ISBN 0-201-06824-9. It gives complete 
source
code in Pascal for LISP, APL, SCHEME, SASL, CLU, SmallTalk, and PROLOG 
interpreters
(or at least sub-sets of those languages).

Lawson
 

 

--  
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!300!15.88!Lawson.English
Internet: Lawson.English@p88.f15.n300.z1.fidonet.org