diff --git a/Makefile b/Makefile index 97504701..83ed4096 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ SRC = system syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \ inquir acount gz sys decsys ecc alan sail kcc kcc_sy c games archy dcp \ spcwar rwg libmax rat z emaxim rz maxtul aljabr cffk das ell ellen \ jim jm jpg macrak maxdoc maxsrc mrg munfas paulw reh rlb rlb% share \ - tensor transl wgd zz graphs lmlib pratt nschem + tensor transl wgd zz graphs lmlib pratt nschem scheme DOC = info _info_ sysdoc sysnet syshst kshack _teco_ emacs emacs1 c kcc chprog BIN = sys2 emacs _teco_ lisp liblsp alan inquir sail comlap c decsys moon graphs diff --git a/build/build.tcl b/build/build.tcl index 1db0acd2..a43b9321 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -2022,6 +2022,17 @@ respond "*" ":link lisp;defns mid,l;defns >\r" respond "*" ":midas liblsp;_libdoc;fft\r" respond "*" ":midas liblsp;_libdoc;phase\r" +# Old? Scheme interpreter +respond "*" "complr\013" +respond "_" "scheme;_nschsy\r" +respond "_" "\032" +type ":kill\r" +respond "*" ":lisp\r" +respond "Alloc?" "n" +respond "*" {(load "scheme; nschsy fasl")} +respond "\n" "(schemedump)" +respond "==>" "(quit)" + # New Scheme interpreter respond "*" "complr\013" respond "_" "nschem;scheme interp_schint lsp\r" diff --git a/doc/scheme/docume.89 b/doc/scheme/docume.89 new file mode 100755 index 00000000..97c5b872 --- /dev/null +++ b/doc/scheme/docume.89 @@ -0,0 +1,2194 @@ +.xgp +.vsp 11 +.squish +.ltrspc 0 +.c << text font >> +.font 0 25fr1 +.c << SCHEME font >> +.font 1 22fg +.c << heading fonts >> +.font 2 30vrb +.font 3 66vr +.font 4 gls;foo1 +.quote +.dummy _ +.twinch 6.25 +.tlinch 9 +.sidm 53 +.c << want to flush losing multiple cr's >> +.crcomp +.c << want to make leading spaces on line small >> +.c << want to have at least 3 lines of a section on a page >> +.sblock 5 +.spw 16 +.adjust +.center +2MASSACHUSETTS INSTITUTE OF TECHNOLOGY +.CENTER +ARTIFICIAL INTELLIGENCE LABORATORY +.sp +.spread +/0AI Memo No. 452//January 1978 +.sp +.center +2THE__REVISED__REPORT__ON +.sp 2 +.center +3SCHEME +.sp +.center +2A__DIALECT__OF__LISP +.sp +.center +0by +.sp +.center +Guy Lewis Steele Jr.* and Gerald Jay Sussman +.sp 2 +0Abstract: +.br + SCHEME is a dialect of LISP. +It is an expression-oriented, applicative order, +interpreter-based language which allows one to +manipulate programs as data. +It differs from most current dialects of LISP +in that it closes all lambda-expressions +in the environment of their definition or declaration, +rather than in the execution environment. +This has the consequence that variables are normally lexically scoped, +as in ALGOL. However, in contrast with ALGOL, +SCHEME treats procedures as a first-class data type. +They can be the values of variables, the returned values of +procedures, and components of data structures. +Another difference from LISP is that SCHEME is +implemented in such a way that tail-recursions execute +without net growth of the interpreter stack. +The effect of this is that a procedure call behaves like a GOTO, +and thus procedure calls can be used to implement iterations, +as in PLASMA. + Here we give a complete "user manual" for the SCHEME +language. Some features described here were not documented in the original +report on SCHEME (for instance particular macros). +Other features have been added, changed, or deleted +as our understanding of certain language issues evolved. +Annotations to the manual describe the motivations +for these changes. + + +.sp +.in 4 +.un 4 +Keywords:__LISP, SCHEME, LISP-like languages, +lambda-calculus, environments, lexical scoping, dynamic scoping, +fluid variables, control structures, macros, extensible syntax, +extensible languages +.in 0 + +.sp +This report describes research done at the Artificial Intelligence +Laboratory of the Massachusetts Institute of Technology. +Support for the laboratory's artificial intelligence research +is provided in part by the Advanced Research Projects Agency +of the Department of Defense under Office of Naval Research contract N00014-75-C-0643. +.sp +*__NSF Fellow + +.page +.spage +.php1 +.he1 +1Steele and Sussman +.he2 +1The Revised Report on SCHEME0 + +.section +A.__The Representation of SCHEME Procedures as S-expressions +.sp + SCHEME programs are represented as LISP s-expressions. +The evaluator interprets these s-expressions in a specified way. +This specification constitutes the definition of the language. + The definition of SCHEME is a little fuzzy around the edges. +This is because of the inherent extensibility of LISP-like languages +{Note LISP Is a Ball of Mud}. +We can define a few essential features +which constitute the "kernel" of the language, +and also enumerate several syntactic and semantic extensions +which are convenient and normally included in a given implementation. +The existence of a mechanism for such extensions +is a part of the kernel of SCHEME; however, any particular +such extension is not necessarily part of the kernel. +.sp + For those who like this sort of thing, +here is the BNF for SCHEME programs {Note LISP BNF}: +.sp +.nofill +.spw 13 +.in 4 +1