FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Update 2005-10-16

 
Post new topic   Reply to topic     Forum Index -> dLISP
View previous topic :: View next topic  
Author Message
PeyloW



Joined: 12 Oct 2005
Posts: 14
Location: Sweden

PostPosted: Sun Oct 16, 2005 7:56 am    Post subject: Update 2005-10-16 Reply with quote

All changes in CHANGES.
It should naturaly be (fac 5) => 15, not (fac 5) => 5 as noted.

Next vital thing I want to complete is the unified evaluation of arguments. Nearly all functions for evaluating build-in forms have argument checking. This should be handled centrally to minimise code. I am thinking of something in the line of regexp and the argument handling in the ZEND engine (PHP scripting engine).

Cell* evalArguments(char[] fmt, Cell* args);
That returns the evaluated arguments, and raises ArgumentException if the arguments does not comform to the fmt string.
Each argument is a simgle char. Optionally prefixed with ' if it should not be evaluated (Such as symbol and list passed to defun). Optionally postfixed with ? (zero or one), * (zero or more) or + (one or more) to indicate repetition or count. As many forms expects arguments in pairs (such as let) I would also like to be able to group arguments with ( and ).
"(yv)+" Would be one or more pairs of one symbol and any value.

Well, no problem there, but... what if "(yv)?'v"? If the first group fails on the second argument (v) then both should be rewinded and v the value that just evaluated as y be returned as v but not evaluated. Recursively call evalArguments() with subgroups have crossed my mind as the most logical approach. But I have not yet come up with a clean solution for rewinding arguments.

Ideas are welcome.
Back to top
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> dLISP All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group