From: Jeff
Subject: Regular expression library
Date: 
Message-ID: <3w6jd.371836$D%.201258@attbi_s51>
Now that I've finally gotten my domain name registered and a
(moderately) healthy webpage up, I was wondering if some of you
wouldn't mind journerying there and taking a quick look at the regular
expression library I wrote for Common Lisp.

I'd like comments on it. How does the code look, is it easy to follow,
etc. Is there anything especially obvious that could be done to speed
it up aside from DECLARE expressions?

You can find it at the site below, under the "Code Library".

Jeff M.

-- 
(surf-to "http://www.retrobyte.org/")
(mail-to (concatenate 'string "massung" ยท@" "gmail.com"))

From: Yuji Minejima
Subject: Re: Regular expression library
Date: 
Message-ID: <pan.2004.11.07.01.45.10.554236@nifty.ne.jp>
On Sat, 06 Nov 2004 15:57:51 +0000, Jeff wrote:

> I'd like comments on it. How does the code look, is it easy to follow,
> etc. Is there anything especially obvious that could be done to speed
> it up aside from DECLARE expressions?

Hi,
I think I can't say I'm a lisp newbie because I've been writing programs
in Emacs Lisp and Common lisp for a few years, but I also think I'm no way
a Lisp wizard.

Although I don't follow the logic thoroughly and I took only a quick
grance at it. My impression of your code is that it's very clean.

That is, 
* All functions fit on a single screen which means very 
  easy to grasp what's going on.
* defcharset macro is intuitive.
* names are easy to understand.

If I'm forced to do nitpicking, I might say for me some comments seem
redundant in cases like this,
> ;; Create a regular expression from a string
> (defun make-regex (string)
>   "Create a regular expression from a string"

and comments like the following might better supplied as a function
documentation
>;; Matches a compiled regular expression list to an input stream
>(defun match-compiled-expression (stream expressions)
But I guess that's a matter of taste.

As for speeding up the code, how about building DFA of the regular
expression as the regular expression it supports seems fairly basic
or the real regular expression compared to Perl's extended regular
expression.

Regards,

Yuji.

-- 
my personal web site: http://homepage1.nifty.com/bmonkey/index-en.html
From: Jeff M.
Subject: Re: Regular expression library
Date: 
Message-ID: <1100019669.207012.323400@c13g2000cwb.googlegroups.com>
Thanks for the comments. I put up a newer version which puts the
"comments" in the documentation portion of all the functions.  Also, I
renamed the FLEX macro to DEFLEXER (keeps the spirit, and is more
Lisp-y). I hope someone else can find it useful, too.

Jeff M.