You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Ralf S. Engelschall" <rs...@engelschall.com> on 1996/07/23 08:55:47 UTC

RegExp stuff to be included in 1.2?

I know the discussion about the RegExp routines which should included in the
new Apache code. It will be used by lot of modules in the feature, I think.
One of these modules, which requires a RegExp library, is my mod_rewrite.  A
powerful URL rewriting module which uses Regular Expressions to rewrite URLs
on-the-fly (It can be obtained from the Apache Module Registry Page - current
version is 2.0).

But I use the old regexp Routines from Henry Spencer, the System 8 ones!  And
I know, there are a lot of other ones available!

This leads to the question:
   WHICH regexp routines will be actually included in Apache 1.2 and higher???

I know that there was no final decision in the past about which one should be
included in the Apache code distribution!

I for myself would say: rx-1.0 from GNU, but that should not count.  But if
there is still no final answer, I will give you some more hints about
available versions.

The following is a look inside the RegEx subtree of my software archive:

==================
RegEx
RegEx/wrapper
RegEx/wrapper/regex.c
RegEx/wrapper/regex.c.EVA
RegEx/wrapper/regex-wrapper.tar.gz
RegEx/wrapper/regex-wrapper.tar.gz.EVA
RegEx/POSIX.2
RegEx/POSIX.2/regex-spencer-44bsd.tar.gz
RegEx/POSIX.2/regex-spencer-44bsd.tar.gz.EVA
RegEx/POSIX.2/rx-0.05.tar.gz
RegEx/POSIX.2/rx-0.07.2.tar.gz
RegEx/POSIX.2/rx-1.0.tar.gz
RegEx/POSIX.2/rx-1.0.tar.gz.EVA
RegEx/POSIX.2/rxdispencer2.tar.gz
RegEx/POSIX.2/rxdispencer2.tar.gz.EVA
RegEx/POSIX.2/regex-0.12.tar.gz
RegEx/POSIX.2/regex-0.12.tar.gz.EVA
RegEx/V8
RegEx/V8/regexp-spencer-860402.tar.gz
RegEx/V8/regexp-spencer-860402.tar.gz.EVA
RegEx/V8/regexp-spencer-951110.tar.gz
RegEx/V8/regexp-spencer-951110.tar.gz.EVA
RegEx/V8/regexp-spencer-gilmore.tar.gz
RegEx/V8/regexp-spencer-gilmore.tar.gz.EVA
RegEx/BSD
RegEx/BSD/regex-Yigit.tar.gz
RegEx/BSD/regex-Yigit.tar.gz.EVA
==================

And here are my attachments (the .EVA files):

==================
Oneline: a wrapper for the V8 regcomp library to implement the old re_xxx
         functions from 4.2BSD
Origin:  FreeBSD 1.1.5.1 /usr/src/lib/libc/regex.c

Oneline: General code to be a wrapper for V8/SVR4/BSD regexp libraries
Origin:  Amanda 2.2.6.5 source code

Oneline: Henry Spencers implementation of the POSIX.2 regex(3) library
         [version alpha3.4 for 4.4BSD]
Origin:  Origin: ftp://zoo.toronto.edu/pub/regex.shar

Oneline: the _NEW_ GNU regexp library
Origin:  GNU archive, ftp://ftp.cygnus.com/pub/lord/

Oneline: Rx, replaces with a backtracking algorithm from Henry Spencer
Origin:  ftp://ftp.cygnus.com/pub/lord/

Oneline: The combined RegEx(POSIX) / RegExp(V8) library from GNU (POSIX draft
         P10003.2/D11.2 compliant)
Origin:  GNU archive

Oneline: Henry Spencers reimplementation of the AT&T Sys V8 regexp(3) library
         [original version as of 2. April 1986]
Origin:  Origin: ftp://zoo.toronto.edu/pub/oldregexp.shar

Oneline: Henry Spencers reimplementation of the AT&T Sys V8 regexp(3) library
         [last change: 10 Nov 1995 = LATEST!]
Origin:  Origin: ftp://zoo.toronto.edu/pub/bookregexp.shar

Oneline: The RegExp Library from Henry Spencer, enhanced by John Gilmore
         (GNU) for egrep and ed

Oneline: O. Yigits PUBLIC DOMAIN equivalents of regex routines as found in
         4.nBSD UN*X, with minor extensions
==================

These are all freely available RegExp implementations I know about.

Again the question: 
Which one should we included in the Apache core distribution?

Greetings,
                                        Ralf S. Engelschall    
                                        rse@engelschall.com
                                        http://www.engelschall.com/~rse

Re: RegExp stuff to be included in 1.2?

Posted by Tom Tromey <tr...@creche.cygnus.com>.
Alexei> I guess I could be convinced to use rx. Except that it uses
Alexei> autoconf, and since we don't (yet), that could be a problem.

Actually, I'd recommend avoiding rx in the short term.  It might be a
good package, but it has had maintenance problems, and even many of
the hard-core GNU people are reluctant to use it.

In terms of the GPL: my understanding is that the Apache SSL stuff
needs some proprietary library to work.  I think there are probably
bad legalistic interactions here.  My advice is to avoid the GPL in a
situation like this.

Tom
-- 
tromey@cygnus.com                 Member, League for Programming Freedom

Re: RegExp stuff to be included in 1.2?

Posted by ra...@madhaus.utcs.utoronto.ca.
> Hmm. Do you have a copy without the PHP stuff in there? (the one
> distributed, at least, with php-2.0b3, seems to have been modified by
> you).

I guess I have munged it a bit.  You can grab the original package from
http://madhaus.utcs.utoronto.ca/~rasmus/regexpr.tar.gz

-Rasmus

Re: RegExp stuff to be included in 1.2?

Posted by Alexei Kosut <ak...@organic.com>.
On Tue, 23 Jul 1996 rasmus@madhaus.utcs.utoronto.ca wrote:

> If you look in the mod_php sources, you will see that I use regexpr
> from Tatu Ylonen.  No real technical reason for using this over any other,
> other than the fact that the license is completely unrestrictive.  I have
> included it below.  Another plus is that it doesn't require any special
> configuration or anything.  It consists of a single .c file along with a
> header file.  It can be compiled directly into Apache without any problems.
> Everyone who uses mod_php these days are already compiling it in.

Hmm. Do you have a copy without the PHP stuff in there? (the one
distributed, at least, with php-2.0b3, seems to have been modified by
you).

I must say, though, at this point I'm leaning towards one of the Spencer
packages, don't know which though. The AT&T V8 one compiles cleanly on my
machine, but isn't POSIX compatible (don't know if we want this - but, for
example, I don't see a way to specify case-insensitivity with the V8
version). On the other hand, the POSIX version gives me a number of
warnings (which I mentioned earlier).

At any rate, though, all of Spencer's packages look like they'd be usable:
the license restrictions are probably not a problem; as long as we provide
attribution, we should be able to use them just fine. As well, we should
be able to take the source files (regexp.c, regsub.c and regerror.c for
the V8 version, regcomp.c, regexp.c, regerror.c and regfree.c for the
POSIX version) and just drop them in to the current Apache makefile, with
little fuss, plus the header file.

Would anyone object to the use of a Spencer regex package? Does anyone
have an opinion as to which one to use?

-- Alexei Kosut <ak...@organic.com>            The Apache HTTP Server 
   http://www.nueva.pvt.k12.ca.us/~akosut/      http://www.apache.org/




Re: RegExp stuff to be included in 1.2?

Posted by ra...@madhaus.utcs.utoronto.ca.
> I guess I could be convinced to use rx. Except that it uses autoconf, and
> since we don't (yet), that could be a problem. As well, I'm not sure if we
> could use GPLed software with the current Apache license. Does anyone
> know?
> 
> Whichever package we use, I think we'd have to do some rearranging of the
> source and header files, probably write a new makefile to work with
> Apache's. Blah.

If you look in the mod_php sources, you will see that I use regexpr
from Tatu Ylonen.  No real technical reason for using this over any other,
other than the fact that the license is completely unrestrictive.  I have
included it below.  Another plus is that it doesn't require any special
configuration or anything.  It consists of a single .c file along with a
header file.  It can be compiled directly into Apache without any problems.
Everyone who uses mod_php these days are already compiling it in.



regexpr.h

Author: Tatu Ylonen <yl...@ngs.fi>

Copyright (c) 1991 Tatu Ylonen, Espoo, Finland

Permission to use, copy, modify, distribute, and sell this software
and its documentation is hereby granted without fee, provided that the
above copyright notice appears in all source code copies, the name of
Tatu Ylonen is not used to advertise products containing this software
or a derivation thereof, and all modified versions are clearly marked
as such.


Re: RegExp stuff to be included in 1.2?

Posted by Alexei Kosut <ak...@organic.com>.
On Tue, 23 Jul 1996, Ralf S. Engelschall wrote:

> I for myself would say: rx-1.0 from GNU, but that should not count.  But if
> there is still no final answer, I will give you some more hints about
> available versions.

Hmm. I took a look at rx, and it seems rather large - 2/3 the size of
Apache itself, and five times the size of, for example, Spencer's
POSIX-compatible package (the one you reference at
ftp://zoo.toronto.com/pub/regex.shar). Except when I compile that, I get
a lot of "warning: integer overflow detected: op "<<"" errors (native cc,
Solaris 2.5).

I guess I could be convinced to use rx. Except that it uses autoconf, and
since we don't (yet), that could be a problem. As well, I'm not sure if we
could use GPLed software with the current Apache license. Does anyone
know?

Whichever package we use, I think we'd have to do some rearranging of the
source and header files, probably write a new makefile to work with
Apache's. Blah.

*sigh*

-- Alexei Kosut <ak...@organic.com>            The Apache HTTP Server 
   http://www.nueva.pvt.k12.ca.us/~akosut/      http://www.apache.org/