Hi,
I have implemented a regular expression parser/matcher for strings
that implements the full POSIX extended syntax. It is written entirely
in Common Lisp and has been tested to work on CMUCL, CLISP and
Macintosh CL.
You can find it at Digitool's site
ftp://ftp.digitool.com/mcl/contrib/regexp.tar.gz
One note of warning: the source files seem to have carriage-returns
instead of newlines since it was done on a Macintosh so you would have
to replace ^M by ^J on a Unix machine to use it.
I would appreciate any feedback - bug reports / suggestions for
improvement.
At present, although the package is reasonably fast, no great effort
has been made to optimize the matching algorithm. Also, at least one
bug is known to exist - a regular expression like "(x*)*" will send
the matching function into an infinite loop. This is the only
pathological case that it fails. It comfortably passes the rest of the
test suite (mostly copied from the GNU rx package).
Enjoy,
Sudhir
P.S. I am sorry about this tardy announcement but I don't have
convenient access to the Usenet.
I think the URL is:
ftp://ftp.digitool.com/pub/mcl/contrib/regexp.tar.gz
>>>>> On Fri, 27 Dec 1996 19:34:52 GMT, ·······@gol.com (Sudhir Shenoy) said:
Sudhir> Hi,
Sudhir> I have implemented a regular expression parser/matcher for
Sudhir> strings that implements the full POSIX extended syntax. It
Sudhir> is written entirely in Common Lisp and has been tested to
Sudhir> work on CMUCL, CLISP and Macintosh CL.
Sudhir> You can find it at Digitool's site
Sudhir> ftp://ftp.digitool.com/mcl/contrib/regexp.tar.gz
Sudhir> One note of warning: the source files seem to have
Sudhir> carriage-returns instead of newlines since it was done on
Sudhir> a Macintosh so you would have to replace ^M by ^J on a
Sudhir> Unix machine to use it.
Sudhir> I would appreciate any feedback - bug reports /
Sudhir> suggestions for improvement.
Sudhir> At present, although the package is reasonably fast, no
Sudhir> great effort has been made to optimize the matching
Sudhir> algorithm. Also, at least one bug is known to exist - a
Sudhir> regular expression like "(x*)*" will send the matching
Sudhir> function into an infinite loop. This is the only
Sudhir> pathological case that it fails. It comfortably passes the
Sudhir> rest of the test suite (mostly copied from the GNU rx
Sudhir> package).
Sudhir> Enjoy, Sudhir
Sudhir> P.S. I am sorry about this tardy announcement but I don't
Sudhir> have convenient access to the Usenet.