CS620 Lab 14 LISP101
Goal
To start to learn the syntax and semantics of LISP.
Deliverable
A set of notes on what you have learned about S-expressions
and Functions. PLus
a demo of one of the LISP functions defined in the text.
You can show me your notes on paper, in a computer file,
or on the web.
Process
- Open a terminal window and follow the instructions in the LISP handout for starting XLISP running in the window.
- Open the text at page 171 and input the LISP expressions. Do they work as predicted?
Take notes of expressions and what happens. Especially note any typing mistakes.
By taking note of our errors we can learn to avoid them.
- The three function definitions (defun ....) are expression as well.
- Input them carefully.
- Repeat for pages 173-175.
- Create a file called fact.lsp that contains the defun on page 176.
Be very very very careful about parentheses.
- Starting with the (load "fact.lsp") command on page 177 test out
the definition and expressions on pages 177 and 178.
. . . . . . . . . ( end of section CS620 Lab 14 LISP101) <<Contents | Index>>
Glossary
- BNF::="Backus-Naur Form", for syntax and grammar, developed by Backus and Naur.
- EBNF::="Extended " BNF.
- HTML::= "HyperText Markup Language", used on the WWW.
- HTML_page::syntax= "<HTML>" head body.
- Java::="An " OO " Language from Sun".
- LISP::= "LISt Processing Language".
- LRM::="Language Reference Manual".
- OO::="Object-Oriented".
- Prolog::="Programming in Logic".
- TBA::="To Be Announced".
- UML::="Unified Modeling Language".
- URL::=Universal_Resource_Locator,
- Universal_Resource_Locator::syntax= protocol ":" location, where
Net
- protocol::= "http" | "ftp" | "mailto" | ... ,
- location::= O( "//" host) O(pathname).
(End of Net)
- WWW::= See http://www.csci.csusb.edu/dick/cs620/,
index to web site for this class.
- XBNF::="eXtreme" BNF, developed by the teacher from EBNF, designed
to ASCII input of syntax, semantics, and other formal specifications.