Lisp Eval in C or C++

Brian Bliss bliss at sp64.csrd.uiuc.edu
Sat Apr 6 09:43:51 AEST 1991


In article <1991Apr4.182329.5513 at searchtech.com> belinda at 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



More information about the Comp.lang.c mailing list