[RPL/2] self compiling ?

DEMAINE Benoit-Pierre benoit at demaine.info
Ven 16 Nov 22:40:04 CET 2007


Adrian Blake wrote:
> I am not sure if I have asked this in the past.
> 
> I wish to have a list, a long list, within a program, then compile it, then execute it. Self generation of code.
> 
> Can this be done,  some suggestions.

Yes. I did this in Prolog and RPL. Works fine.

In fact, doable in almost all script langages.

The "tcc" compiler allows to do this for C.

Generating RPL from RPL is something I used to do on HP48.

Generating machine/system programs (compile RPL into a system executable
file) may be more tricky. I usually use Makefils for this.

-- 
 >o_/ DEMAINE Benoit-Pierre (aka DoubleHP) http://benoit.demaine.info/
If computing were an exact science, IT engineers would not have work \_o<

"So all that's left, Is the proof that love's not only blind but deaf."
(FAKE TALES OF SAN FRANCISCO, Arctic Monkeys)


Plus d'informations sur la liste de diffusion RPL2