standards/54410: one-true-awk not POSIX compliant (no extended REs)

Tim Robbins tjr at freebsd.org
Thu Oct 14 02:22:22 PDT 2004


On Thu, Oct 14, 2004 at 12:18:23AM +0400, Andrey Chernov wrote:
> On Wed, Oct 13, 2004 at 08:00:50PM +0000, Jens Schweikhardt wrote:
> > The following reply was made to PR standards/54410; it has been noted by GNATS.
> > 
> > From: Jens Schweikhardt <schweikh at schweikhardt.net>
> > To: FreeBSD-gnats-submit at FreeBSD.org
> > Cc:  
> > Subject: Re: standards/54410: one-true-awk not POSIX compliant (no extended REs)
> > Date: Wed, 13 Oct 2004 21:57:29 +0200
> > 
> >  Upon further investigation, awk appears only to be missing the {} ERE
> >  operator in its variations. Other ERE operators like + and | work as
> >  expected. I've sent a bug report to bwk asking if he wants to fix it or
> >  would be happy with a patch.
> 
> Just to note.
> There more POSIX non-compliant places exists in one-true-awk, like no 
> collating for [a-z]-type regexp ranges.
> GNU awk does right job here.

The right way to fix this is to use the libc regex code -- trying to fix
awk's antique regex code is a lost cause.

Jens, I came up with this patch a while ago and sent it to Andrey in
private mail:
	http://people.freebsd.org/~tjr/awk-re.diff
Unfortunately I've been too busy with non-FreeBSD related things lately
to do much with it. I seem to remember fixing some minor problems with this
patch in Perforce and not updating the copy on the web, but it shows that
the POSIX regex. interface + some small 4.4BSD extensions is enough
to implement everything awk needs.


Tim


More information about the freebsd-standards mailing list