;;;; 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.
;;;; 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"
(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