home *** CD-ROM | disk | FTP | other *** search
-
- [LISCO.PST]
- [Post production scheme to compile LISP into REC]
- [20 December 1980]
-
- [[
- Type a LISP function using {}`s rather than ()`s, and
- enclosing the whole function within *...|. End the line
- with a carriage return. Use lower case. For example:
-
- *{car {cdr {quote {1 2 3 4 5}}}}|
-
- Each new keystroke will show another step of compilation.
- ]]
-
-
-
- [many spaces are redundant]
- (<0> <1>,<0> <1>)
- (<0>{ <1>,<0>{<1>)
- (<0> }<1>,<0>}<1>)
- (<0>{ }<1>,<0>{}<1>)
- ( <0>,<0>)
-
- [others are essential]
- (<0>*<1>{<2>,<0><1> {*<2>)
- (<0>%<1>}<2>,<0><1>} %<2>)
- (<0>*<1>,%<0><1>)
- (<0>%<1>,#<0><1>)
-
- [isolate balancing parentheses]
- (<0>:{<1>{<2>}:<3>,<0>{<1>:{<2>}:<3>)
- (<0>#:{<1>}:<2>,<0>!<1>!<2>)
- (<0>:{<1>}:<2>,<0>[<1>]<2>)
- (<0>#{<1>}<2>,<0>#:{<1>}:<2>)
- (<0>[<1>,<0>{<1>)
- (<0>]<1>,<0>}<1>)
- (<0>#<1>,<0><1>)
-
- [separate elements of top level]
- (<0>&<1>!<2>!<3>,<0><1>!<2>!&<3>)
- (<0>&<1>{<2>!<3>,<0>&<1>#{<2>!<3>)
- (<0>&<1>,<0><1>)
-
- [put markers between top level elements]
- (<0>~!<1>!<2>!<3>,<0>^!<1>!^~<2>!<3>)
- (<0>~ <1>,<0>~<1>)
- (<0>~<1> <2>!<3>,<0>^<1>^~<2>!<3>)
- (<0>~!<3>,<0>!<3>)
- (<0>~<1>!<3>,<0>^<1>^!<3>)
-
- [auxiliary cursors]
- (<0>?r!<1>,<0><1>)
- (<0>?s!<1>,<0><1>)
- (<0>?r<1> <2>!<3>,<0>nLn<1>$S?r<2>!<3>)
- (<0>?s<1> <2>!<3>,<0><1>$rmml<1>$S?s<2>!<3>)
-
- [always be sure that EVAL gets a balanced expression]
- ({<1>|<2>,#{<1>|<2>)
-
- [EVAL: compile the primitive LISP forms]
- (!{lambda <1>!<2>,!#{lambda <1>!<2>)
- (!!lambda {<1>}<2>!<3>!<4>|<5>,<4>{? ?r<1> !}<2>{? ?s<1> !}<3>|<5>)
- (!car <1>!<2>|<3>,<1> <2>|@0<3>)
- (!cdr <1>!<2>|<3>,<1> <2>|@1<3>)
- (!cons <1>!<2>|<3>,<1> <2>|@2<3>)
- (!atom <1>!<2>|<3>,<1> <2>|@3<3>)
- (!eq <1>!<2>|<3>,<1> <2>|@4<3>)
- (!quote <1>!<2>|<3>,<2>|`<1>`<3>)
- (!if ^<1>^^<2>^^<3>^!<4>|<5>,<3> {? ;L} <2> {? `T`=} <1> ?x <4>|}<5>)
- (!if <1>!<2>,!if ~&<1>!<2>)
- (!? <1>!<2>|<3>,<2>|<1><3>)
- (!<0> <1>!<2>|<3>,<1> <2>|@<0><3>)
- (!<0>!<2>|<3>,<2>|@<0><3>)
- (?x <1>|<2>,<1>|{<2>)
- (<1> <2>|<3>,<2>|<1>$ryG<3>)
-
- [close out the compilation]
- (|<1>,{<1>T;})
-
- [end]
-