pslprolo.red 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. % module pslprolo; % PSL dependent code for REDUCE.
  2. % Author: Anthony C. Hearn.
  3. % This file defines functions, variables and declarations needed to
  4. % make REDUCE and the underlying PSL system compatible, and which need
  5. % to be input before the system independent REDUCE source is loaded.
  6. % Support for package creation.
  7. symbolic procedure create!-package(u,v);
  8. % Make module list u into a package with path v.
  9. % Second argument is no longer used.
  10. if null idp car u then typerr(car u,"package name")
  11. else progn(put(car u,'package,u),
  12. % put(car u,'path,if null v then list car u else v),
  13. car u);
  14. % create!-package('(pslprolo),nil);
  15. % Code for resolving aliasing name conflicts.
  16. fluid '(!*quotenewnam);
  17. symbolic procedure define!-alias!-list u;
  18. begin scalar x;
  19. a: if null u then return nil;
  20. x := intern compress append(explode '!~,explode car u);
  21. put(car u,'newnam,x);
  22. put(x,'oldnam,car u);
  23. put(car u,'quotenewnam,x);
  24. u := cdr u;
  25. go to a
  26. end;
  27. % PSL doesn't need PRINTPROMPT.
  28. remflag('(printprompt),'lose);
  29. symbolic procedure printprompt u; nil;
  30. flag('(printprompt),'lose);
  31. flag('(gcdn),'lose); % Defined in bignum package.
  32. flag('(aconc atsoc copy delasc eqcar geq lastpair leq mkquote neq
  33. prin2t reversip rplacw putc yesp),'lose);
  34. flag('(rblock foreach lprim repeat while),'user); % permits redefinition
  35. % The following assignment is done this way for bootstrapping.
  36. flag('(set),'eval);
  37. set('!*quotenewnam,nil);
  38. define!-alias!-list
  39. '(arrayp do for on off let clear flatten imports
  40. indx mkid mkvec vector editf spaces2 prettyprint);
  41. set('!*quotenewnam,t);
  42. remflag('(set),'eval);
  43. % Resolution of non-local variable definitions.
  44. % The following PSL variables differ from the Standard LISP Report
  45. remprop('!*comp,'vartype);
  46. remprop('!*raise,'vartype);
  47. % The following are not in the Standard LISP Report, but differ from
  48. % usual REDUCE usage.
  49. remprop('cursym!*,'vartype);
  50. % endmodule;
  51. end;