X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=parse-common.lisp;h=1e40444eac2bd7ea1485eea896fc1bf4f81c2f12;hb=cc0d0f58d7261d12a8d6a89153f58ea693618e79;hp=c47acb40aa20c1d7f1db60e23b22b478bfcc0ce9;hpb=58e6e7e38d835e51beb5f21440b4b7bd27d106f2;p=umlisp.git diff --git a/parse-common.lisp b/parse-common.lisp index c47acb4..1e40444 100644 --- a/parse-common.lisp +++ b/parse-common.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: parse-common.lisp,v 1.5 2003/05/05 23:13:28 kevin Exp $ +;;;; $Id: parse-common.lisp,v 1.6 2003/05/06 01:34:57 kevin Exp $ ;;;; ;;;; This file, part of UMLisp, is ;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D. @@ -16,8 +16,10 @@ ;;;; as governed by the terms of the GNU General Public License. ;;;; ************************************************************************* -(in-package :umlisp) -(declaim (optimize (speed 3) (safety 1) (compilation-speed 0) (debug 3))) +(in-package #:umlisp) + +(eval-when (:compile-toplevel) + (declaim (optimize (speed 3) (safety 1) (compilation-speed 0) (debug 3)))) (defun umls-pathname (filename &optional (extension "")) "Return pathname for a umls filename" @@ -37,19 +39,12 @@ (pathname filename))) -(defun read-umls-line-new (strm) - "Read a line from a UMLS stream, split into fields" - (let ((line (read-line strm nil 'eof))) - (if (stringp line) ;; ensure not 'eof - (delimited-string-to-list line #\| t) - line))) - -(defun read-umls-line (strm) +(defun read-umls-line (strm &optional (eof 'eof)) "Read a line from a UMLS stream, split into fields" - (let ((line (read-line strm nil 'eof))) - (if (stringp line) ;; ensure not 'eof - (delimited-string-to-list line #\| t) - line))) + (let ((line (read-line strm nil eof))) + (if (eq line eof) + eof + (delimited-string-to-list line #\| t)))) ;;; Find field lengths for LEX and NET files