Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!cs.utexas.edu!utnut!nott!cu23.crl.aecl.ca!cp1423.crl.aecl.ca!ray
From: ray@crl.aecl.ca (Ray Waddington)
Subject: Re: smalltalk interpreter
Message-ID: <ray.139.000D816F@crl.aecl.ca>
Lines: 51
Sender: news@cu23.crl.aecl.ca (USENET News System)
Nntp-Posting-Host: cp1423.crl.aecl.ca
Organization: AECL Research
X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
References:  <9411300738.AA00435@rt.el.utwente.nl>
Date: Thu, 1 Dec 1994 18:30:14 GMT

Actually, T-Gen (for VWIN) isn't that hard to port to VWIN32. What kind of 
complexity do you have in your source expressions? I've done something
similar (in VWIN32) to what I believe you're asking, but just for simple 
mathematical and logical expression source input. It doesn't use the compiler 
classes at all, as it's a run-time image. Where T-Gen won't 
help you is with the "code generation" for the target. With the compiler 
unavailable to you, look at the Object>>perform:withArguments: method and 
related methods. If execution speed is a consideration, the 
perform:withArguments: method appears to be the closest to the virtual machine.

Ray Waddington


In article <9411300738.AA00435@rt.el.utwente.nl> Arno Breunese 
<A.P.J.Breunese@EL.UTWENTE.NL> writes:>Date: Wed, 30 Nov 1994 08:38:10 +0100
>From: Arno Breunese <A.P.J.Breunese@EL.UTWENTE.NL>
>Subject: Re: smalltalk interpreter

>Futeh Kao <futeh@HAPPY.CC.UTEXAS.EDU> wrote:

>: Hi, is there an interpreter class that interprets
>: and then executes a string during runtime?  In
>: Digitalk vwin32, there is the CompilerInterface class.
>: However, it's not allowed to be distributed with the
>: runtime application.  I think there is also a package
>: called tgen.  Unfortunately, there isn't a vwin32 version.

>Even if there would be a VWin32 version that would not help: T-gen is a
>compiler compiler (a la yacc, i.e. something to write compilers in),
>not a compiler itself. It is a nice piece of work though.

>In general I think that you do not want to execute just 'any'
>expression, so if you formalize things you could use T-gen or something
>similar to compile your own language and invoke predefined Smalltalk
>methods. Unless you really want to add code on the fly, this should not
>require the CompilerInterface class.

>Arno

> __________________________________________________________________
>[=]                 A.P.J.Breunese@el.utwente.nl              [v][^]
>|------------------------------------------------------------------|
>|                           Arno Breunese                          |
>|                         Control Laboratory                       |
>|               Department of Electrical Engineering               |
>|                        University of Twente                      |
>|                       Enschede, Netherlands                      |
>|__________________________________________________________________|
>|  phone +31 53 892806                          fax +31 53 340045  |
> ------------------------------------------------------------------

