1 ;;;; -*- Mode: Lisp -*- 2 3 ;;;; variables.lisp -- 4 5 ;;;; See file COPYING for copyright licensing information. 6 7 (in-package "CL.EXT.DACF.UNIFICATION") ; DACF = Data And Control Flow. 8 9 10 (defun make-var-name (&optional (s (gensym "UV_")) (package *package*)) 11 (declare (type (or string symbol character) s)) 12 (intern (concatenate 'string "?" (string s)) package)) 13 14 15 (eval-when (:load-toplevel :execute) 16 (setf (fdefinition 'new-var) #'make-var-name)) 17 18 19 (defun variablep (x) 20 (and (symbolp x) 21 (or (char= (char (symbol-name x) 0) #\?) 22 (string= x "_")))) 23 24 (defun variable-any-p (x) 25 (and (symbolp x) 26 (or (string= x "_") 27 (string= x "?_")))) 28 29 30 ;;; end of file -- variables.lisp --