Artifact 7ad2112f82bee69a4fd3659d0cb6c4f40c36527ac04cc8411b319f198b45ed14:
- Executable file
r37/packages/rlisp88/bquote.red
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1572) [annotate] [blame] [check-ins using] [more...]
- Executable file
r38/packages/rlisp88/bquote.red
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1572) [annotate] [blame] [check-ins using]
module bquote; % Support for backquote. % Author: Anthony C. Hearn. % Copyright (c) 1993 The RAND Corporation. All rights reserved. % Lisp parsing case. symbolic procedure tokbquote; begin crchar!* := readch1(); nxtsym!* := list('backq,rread()); ttype!* := 3; return nxtsym!* end; put('!`,'tokprop,'tokbquote); put('backq,'formfn,'formbquote); symbolic procedure formbquote(u,vars,mode); mkbquote cadr u; symbolic procedure mkbquote u; % Returns the "unevaled" form of u. if null u or constantp u then u else if atom u then mkquote u else if car u eq 'quote then if cadr u eq '!# then rederr "Invalid use of # after '" else mkquote u else if car u eq 'listify then mkbquote cdr u else if car u eq '!# then if eqcar(cdr u,'!@) then if null cdddr u then caddr u else list('append,caddr u,mkbquote cdddr u) else list('cons,cadr u,mkbquote cddr u) else if car u eq '!@ then rederr "Invalid use of @" else list('cons,mkbquote car u,mkbquote cdr u); % Rlisp parsing case. put('backquote,'stat,'bquotstat); symbolic procedure bquotstat; list('backquote,rl2l cadr rlis()); symbolic procedure rl2l u; if atom u then u else if atom car u then car u . rl2l cdr u else if caar u eq 'hash or caar u eq '!# then if eqcar(cadar u,'!@) then '!# . '!@ . cadr cadar u . rl2l cdr u else '!# . cadar u . rl2l cdr u else rl2l car u . rl2l cdr u; put('backquote,'formfn,'formbquote); endmodule; end;