X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=parse-common.lisp;h=c47acb40aa20c1d7f1db60e23b22b478bfcc0ce9;hb=58e6e7e38d835e51beb5f21440b4b7bd27d106f2;hp=8ba30e61bf9be0c4c52c68774fac2ed169372a92;hpb=48a89995e768d67fcda55849a70b0ea759ad190a;p=umlisp.git diff --git a/parse-common.lisp b/parse-common.lisp index 8ba30e6..c47acb4 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.4 2002/10/21 02:23:46 kevin Exp $ +;;;; $Id: parse-common.lisp,v 1.5 2003/05/05 23:13:28 kevin Exp $ ;;;; ;;;; This file, part of UMLisp, is ;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D. @@ -37,19 +37,19 @@ (pathname filename))) -(defun read-umls-line (strm) +(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 - (let* ((len (length line)) - (maybe-remove-terminal ;; LRWD doesn't have '|' at end of line - (if (char= #\| (char line (1- len))) - (subseq line 0 (1- len)) - line))) - (declare (fixnum len)) - (delimited-string-to-list maybe-remove-terminal #\|)) + (delimited-string-to-list line #\| t) line))) +(defun read-umls-line (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))) ;;; Find field lengths for LEX and NET files