On Jul 19, 2007, at 10:47 PM, skaller wrote:
> On Thu, 2007-07-19 at 22:28 -0400, Peter Tanski wrote:
>> On 19 July 2007, Erick Tryzelaar wrote:
>
>>  There might be a way to do
>> interpreted code with a hook through CINT <http://root.cern.ch/root/
>> Cint.html>.  So that could handle code generation and execution; for
>> parsing the command line it would take a lot of work, even sponging
>> off of readline and the current parser, because each statement would
>> have to be wrapped with the current environment.
>
> Parsing can be done incrementally, and possibly symbol table building.
> Everything after that is wholistic.
>
> Lets face it: Felix doesn't even have separate compilation.
> REPL is a refinement of separate compilation -- Felix is
> designed as a WPA -- Whole Program Analyser.

One that doesn't require 2GB RAM to run :)

> You could do some tricks. For example, accumulate definitions
> without rebuilding, since definitions don't "do" anything.
>
> Also don't forget, Felix uses *setwise* lookup: the scope
> of an identifier is the context in which it is defined,
> and that includes *previous* statements (like C function scope).

With an interpreter you would need to keep a global "interpreter"  
scope that, in the absence of bytecode, would probably require  
maintaining a sourcecode state in memory (the parser state) so you  
could modify it according to the next interpreter statement, output  
and recompile and relink the whole object again.  Personally, I don't  
think it is worth it: given more time I would rather master felix.   
You know, until a few emails ago I did not know the 'static' option  
existed, which is what I wanted since felix 1.1.

Cheers,
Pete


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to