From: vsync
Subject: Re: Iterating through a file.
Date: 
Message-ID: <86elu72dq3.fsf@piro.quadium.net>
Greg Menke <··········@mindspring.com> writes:

> I've been toying with a form for a little while to read the contents
> of some file, line by line do stuff with it.  The little piece of code
> below is what I'm using at the moment, but its sort of ugly.  I was
> wondering if theres a cleaner way, maybe something elegant using 'do'-
> to avoid the return & let.

I've recently completed a smallish package to parse CVS logs, create
mappings between log entries and files, and generate a set of HTML
reports.  It has a lot of iteration through lines of files, and after
2 or 3 false starts coding this thing, it's pretty consistent within
the parsing algorithm that I've discovered I like.

If you want, I would probably be able to package this up sometime this
week and post it.  I'm not a LOOP fan, so all the iteration is done
with DO or DO*, which sounds like what you're talking about.
Interested in seeing it?

(BTW, I wouldn't hold this code up as any standard of beauty, either.
I think it's some sort of rule that parsing code is pretty much
guaranteed to be painful.  Or I'm just not enough of a guru :)

-- 
vsync
http://quadium.net/ - last updated Tue May 1 00:25:22 PDT 2001
(cons (cons (car (cons 'c 'r)) (cdr (cons 'a 'o))) ; Orjner
      (cons (cons (car (cons 'n 'c)) (cdr (cons nil 's))) nil))