F
fabricemarchant
Hi !
I've translated Andru Luvisi small LISP interpreter sl3.c
http://www.sonoma.edu/users/l/luvisi/sl3.c
in C++ in order to understand how it works and to experiment with small
LISP.
http://fabrice.marchant.free.fr/LISP/slf/060521/
(For now, my C++ code isn't the result of an object analysis, just a
translation from C, eliminating "switches" or "if ladders" for
example.)
As a LISP, the main loop is a "read, eval, print".
Please, could you give me hints about the way to define a ">>" operator
to replace the "readObj" function of LISP objects ?
// Main loop, in slf.c++
while( notExitFlag )
cout << *readObj( )->eval( top_env ) << '\n';
Thanks for advance.
Fabrice
I've translated Andru Luvisi small LISP interpreter sl3.c
http://www.sonoma.edu/users/l/luvisi/sl3.c
in C++ in order to understand how it works and to experiment with small
LISP.
http://fabrice.marchant.free.fr/LISP/slf/060521/
(For now, my C++ code isn't the result of an object analysis, just a
translation from C, eliminating "switches" or "if ladders" for
example.)
As a LISP, the main loop is a "read, eval, print".
Please, could you give me hints about the way to define a ">>" operator
to replace the "readObj" function of LISP objects ?
// Main loop, in slf.c++
while( notExitFlag )
cout << *readObj( )->eval( top_env ) << '\n';
Thanks for advance.
Fabrice