Update domain name to kpe.io
[umlisp-orf.git] / parse-macros.lisp
index dd79bd76c0f7dce573ad5224d17b0854c3732093..70210fb4006ea341f02d79c6a49415116d51acea 100644 (file)
 (defmacro with-umls-file ((line filename) &body body)
 "Opens a UMLS and processes each parsed line with (body) argument"
   (let ((ustream (gensym "STRM-"))
-       (eof (gensym "EOF-")))
+        (eof (gensym "EOF-")))
     `(let ((,eof (gensym "EOFSYM-")))
       (with-open-file
-         (,ustream (umls-pathname ,filename) :direction :input)
-       (do ((,line (read-umls-line ,ustream ,eof)
-                   (read-umls-line ,ustream ,eof)))
-           ((eq ,line ,eof) t)
-         ,@body)))))
+          (,ustream (umls-pathname ,filename) :direction :input)
+        (do ((,line (read-umls-line ,ustream ,eof)
+                    (read-umls-line ,ustream ,eof)))
+            ((eq ,line ,eof) t)
+          ,@body)))))
 
 (defmacro with-buffered-umls-file ((line filename) &body body)
   "Opens a UMLS and processes each parsed line with (body) argument"
   (let ((ustream (gensym "STRM-"))
-       (buffer (gensym "BUF-"))
-       (eof (gensym "EOF-")))
+        (buffer (gensym "BUF-"))
+        (eof (gensym "EOF-")))
     `(let ((,buffer (make-fields-buffer))
-          (,eof (gensym "EOFSYM-")))
+           (,eof (gensym "EOFSYM-")))
       (with-open-file
-         (,ustream (umls-pathname ,filename) :direction :input)
-       (do ((,line (read-buffered-fields ,buffer ,ustream #\| ,eof)
-                   (read-buffered-fields ,buffer ,ustream #\| ,eof)))
-           ((eq ,line ,eof) t)
-         ,@body)))))
+          (,ustream (umls-pathname ,filename) :direction :input)
+        (do ((,line (read-buffered-fields ,buffer ,ustream #\| ,eof)
+                    (read-buffered-fields ,buffer ,ustream #\| ,eof)))
+            ((eq ,line ,eof) t)
+          ,@body)))))
 
 (defmacro with-buffered2-umls-file ((line filename) &body body)
   "Opens a UMLS and processes each parsed line with (body) argument"
   (let ((ustream (gensym "STRM-"))
-       (buffer (gensym "BUF-"))
-       (eof (gensym "EOF-")))
+        (buffer (gensym "BUF-"))
+        (eof (gensym "EOF-")))
     `(let ((,buffer (make-fields-buffer2))
-          (,eof (gensym "EOFSYM-")))
+           (,eof (gensym "EOFSYM-")))
       (with-open-file
-         (,ustream (umls-pathname ,filename)
-          :direction :input :if-exists :overwrite)
-       (do ((,line (read-buffered-fields ,buffer ,ustream #\| ,eof)
-                   (read-buffered-fields ,buffer ,ustream #\| ,eof)))
-           ((eq ,line ,eof) t)
-         ,@body)))))
+          (,ustream (umls-pathname ,filename)
+           :direction :input :if-exists :overwrite)
+        (do ((,line (read-buffered-fields ,buffer ,ustream #\| ,eof)
+                    (read-buffered-fields ,buffer ,ustream #\| ,eof)))
+            ((eq ,line ,eof) t)
+          ,@body)))))