Mail Archives: djgpp/2000/09/15/10:34:19
> >Is there a obvious technique for passing the source code for a small C
> >function (e.g., `for (i=1;i<=N;i++) y[i]=foo(x[i]);'), which might be in
> >a file or passed via command-line, to an already-compiled C program and
> >have that program be able to interpret and use the function internally?
-: Write an interpreter for a C-Like Language.
Is this the way gnuplot (for example) `reads' functions for plotting?
I suppose I could toss everything into a Tcl environment, but that
would be massive overkill for this application.
-: sounds like a lex and yacc job to me. (or flex and bison,
-: if you are gnu to this... ugh)
Yes, that's the direction I initially took, but it gave me nightmares.
-: Use DXEs:
-: 1. Call to gcc.exe to compile the external C file.
-: 2. Call dxegen.exe to make it into a DXE.
-: 3. Load it with _dxe_load().
-: 4. Run it.
Ok, I like this idea. It sounds straightforward and involves minimal
overhead. I'll take a stab at it.
Thanks to everyone who replied.
- Raw text -