Xref: utzoo comp.ai:8962 comp.lang.c++:12695 comp.lang.c:37987 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!sp64.csrd.uiuc.edu!bliss From: bliss@sp64.csrd.uiuc.edu (Brian Bliss) Newsgroups: comp.ai,comp.lang.c++,comp.lang.c Subject: Re: Lisp Eval in C or C++ Message-ID: <1991Apr5.234351.22542@csrd.uiuc.edu> Date: 5 Apr 91 23:43:51 GMT References: <1991Apr4.182329.5513@searchtech.com> <11809@dog.ee.lbl.gov> Sender: news@csrd.uiuc.edu (news) Reply-To: bliss@sp64.csrd.uiuc.edu (Brian Bliss) Organization: Center for Supercomputing Research and Development Lines: 29 In article <1991Apr4.182329.5513@searchtech.com> belinda@searchtech.com (Belinda Hoshstrasser) writes: >We are involved in redoing a large expert system in C++. It was >originally written in Lisp. ... Has anyone out there ever implemented >eval in C or C++? I'm working on an implementation of it. I basically boils down to writing a C interpreter. The project is called the applicaton executive, and the syntax off the call is: int sae (register char *string, char *retloc, char *routine, ... ) string - the text to be evaluated retloc - pointer to where we store the return value, if we are interpreting an entire function routine - the name of the routine to interpret, followed by it's arguments return value is number of errors. so if we have int val; sae ("int func (int x, int y) { return (x + y); }", &val, "func", 3, 4); then the value of val is set to 7. bb