X-Git-Url: https://git.distorted.org.uk/~mdw/lisp/blobdiff_plain/d7d819976cb5d84766bffd2c5272c86203687ee9..562ed2ddc451abe9be0ec5bb9684b2df56942d8f:/infix.lisp diff --git a/infix.lisp b/infix.lisp index 64a0a30..a77f51e 100644 --- a/infix.lisp +++ b/infix.lisp @@ -94,8 +94,12 @@ ;;;-------------------------------------------------------------------------- ;;; The tokenizer. -(defconstant eof (cons :eof nil) - "A magical object which `get-token' returns at end-of-file.") +(eval-when (:compile-toplevel :load-toplevel :execute) + (let ((value (cons :eof nil))) + (unless (and (boundp 'eof) + (equal (symbol-value 'eof) value)) + (defconstant eof (cons :eof nil) + "A magical object which `get-token' returns at end-of-file.")))) (defun default-get-token () "Read a token from *stream* and store it in *token*."