Archived

This topic is now archived and is closed to further replies.

How would you implement Lisp interpreter

This topic is 5118 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know the basic structure of a Lisp interpreter, I have read some source of simple ones and have implement a rudimentary one. The question I want to ask is how to deal with numbers. I ''ve read that some Lisp maintains a table of number and each number has only one instance. Would you do this or would you let a number has its own instance when created? Having only one instance of each number has the advantage that numbers can be compared by EQ and involves only comparision of pointers. However, I think doing so may be slower because every time a number is generated (maybe from calculation) has to be checked if it has already existed. So, how would you deal with numbers (or even other data types like string and array)?

Share this post


Link to post
Share on other sites
*kicks evil twin's book search*

Sorry, I would give you an excellent book resource too, but--it is not behaving.

Anyways, there are several series of articles on scripting on this site. I personally like the series by Greg Rosenblatt.

Anyways, I really wish I could locate that book I had, as it is really excellent :/. However, I've heard nothing but good things about the Dragon Book.

edit: this topic actually appears enough, that I think it would be fairly decent if one of the forum goers who knows lisp a little better were to write an article about making a lisp interpretor.


DakeDesu, protecter of newbie posters. Destroyer of elitist b*ggers™; And most certainly NOT AN ALIEN .
This is a special test for quote cleaning--signatures should be delete from all quotes. This is a test.

[edited by - DakeDesu on December 13, 2003 5:47:25 AM]

Share this post


Link to post
Share on other sites