Re: Modified Interpreter

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Sat, Jul 12, 2003 at 09:26:26PM -0500, gertie at visionsix.com wrote:
> > 
> > But what about binding in the interpreter so your complied Eu programs could
> > interpret Eu code in strings?
> > 
> > It depends on the model of execute() that is chosen - does the executed code
> > have access to the same symbols as the calling program or not.
> 
> It should have access to the vars in scope when the execute() call was 
> executed.

In other words, unsupported not only in the translator, but also in the binder!

Or, execute() might not have access to anything in the calling program, and
hence be suported by binding, and then we add an eval() which does have access
to those things and is not supported by binding.

Another idea might be to just add support for variable_id(), and then allow
the passing of routine and variable id's in the execute statement (execute(
"code", {routine ids}, {variable ids}) for example).

> Question is: 
> 
> 1) should it modify those vars in the calling program
> 1a) meaning the calling program halts until the string is done

If variable_id() is supported, yes.

> 2) return altered var values
> 2a) meaning the calling program halts until the string is done

Yes.

> 3) be able to trigger an event in the calling program
> 3b) the calling program continues on it's merry way

No (unless its done by calling a routine id from the main program, then yes
... but i think you mean threads, in which case no).
> 
> I vote for a switch.

Better to do:

start_thread(execute("eval'd code that will trigger an event in the calling
program"))

imo ... much more clearer (and not limited to executed code...i.e. execute()
can't be supported by the translator, but start_thread() can).

> 
> Kat
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
> 

jbrown

-- 
 /"\  ASCII ribbon              | http://www.geocities.com/jbrown1050/
 \ /  campain against           | Linux User:190064
  X   HTML in e-mail and        | Linux Machine:84163
 /*\  news, and unneeded MIME   | http://verify.stanford.edu/evote.html

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu