CSC302 2011S, Class 34: Implementing LISP Overview: * Detour: Quoting. * eval, continued. * Flaws in eval. * Graham's Claims. * Implementing Lisp. Admin: * Easter weekend consumed my time. I'm not sure when I'm getting grades to you. * Those of you who missed one assignment may make up for it by implementing a simple LISP interpreter in C (basically, writing the parser and the N or so key functions). For the parser, you need not implement the shorthand of '. * Reading for Wednesday: Trail: The Reflection API, available at http://download.oracle.com/javase/tutorial/reflect/ * Reminder: Projects start Friday. * Due to prereg and College committee work, I need folks to sign up for appointments. Times at http://www.cs.grinnell.edu/~rebelsky/Schedule/signup.2011S.txt. Signup via email. * CS Picnic: Friday, May 6, 2011. * EC for Thursday's Bites to Bits. * EC for Friday's CS table. Detour: Quoting. * Why we don't teach it in 151: It's more complicated than you think * Important lessons on high-level syntax, undelrying representation, and interpretation. eval, continued. ;;; Procedure: ;;; eval ;;; Parameters: ;;; expression - to be evaluated ;;; An atom or list: S-expression ;;; environment - binds values to names ;;; Association list: A list of (symbol value) lists ;;; Purpose: ;;; Returns the value of the expression in that environment An S expression is either: * an atom * a pair of two S expressions A list is a form of S-expression in which the cdr of the last pair in the sequence is NIL. * Flaws in eval. * Graham's Claims. * Implementing Lisp.