glhead.psl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. %
  2. % GLHEAD.PSL.13 16 FEB. 1983
  3. %
  4. % HEADER FOR GLISP FOR COMPATIBILITY WITH PORTABLE STANDARD LISP (PSL)
  5. % G. NOVAK 20 OCTOBER 1982
  6. %
  7. (GLOBAL '(GLQUIETFLG GLSEPBITTBL GLUNITPKGS GLSEPMINUS GLOBJECTNAMES
  8. GLTYPENAMES GLBREAKONERROR GLUSERSTRNAMES GLLASTFNCOMPILED
  9. GLLASTSTREDITED GLCAUTIOUSFLG GLLISPDIALECT GLBASICTYPES
  10. GLOBJECTTYPES GLTYPESUSED))
  11. (FLUID '(TTLIST SPECS SOURCE GLGLOBALVARS DOMAINNAME ARGTYPES NOTFLG
  12. GLAMBDAFN ADDISATYPE PAIRLIST PROGG BITTBL KEY Y TYPES
  13. CONTEXT EXPR VALBUSY FAULTFN GLSEPATOM GLSEPPTR *GL* *GLVAL*
  14. GLTOPCTX RESULTTYPE RESULT GLNATOM FIRST OPNDS OPERS
  15. GLEXPR DESLIST EXPRSTACK GLTYPESUBS GLPROGLST
  16. TYPE GLNRECURSIONS GLFNSUBS GLEVALSUBS))
  17. % CASEQ MACRO FOR PSL
  18. (DM CASEQ (L)
  19. (PROG (CVAR CODE)
  20. (SETQ CVAR (COND ((ATOM (CADR L))(CADR L))
  21. (T 'CASEQSELECTORVAR)))
  22. (SETQ CODE (CONS 'COND (MAPCAR (CDDR L)
  23. (FUNCTION (LAMBDA (X)
  24. (COND ((EQ (CAR X) T) X)
  25. ((ATOM (CAR X))
  26. (CONS (LIST 'EQ CVAR
  27. (LIST 'QUOTE (CAR X)))
  28. (CDR X)))
  29. (T (CONS (LIST 'MEMQ CVAR
  30. (LIST 'QUOTE (CAR X)))
  31. (CDR X)))))))))
  32. (RETURN (COND ((ATOM (CADR L)) CODE)
  33. (T (LIST 'PROG (LIST CVAR)
  34. (LIST 'SETQ CVAR (CADR L))
  35. (LIST 'RETURN CODE)))))))