Debian Bug report logs - #355442
mawk: missing Posix ERE curly braces

version graph

Package: mawk; Maintainer for mawk is Steve Langasek <vorlon@debian.org>; Source for mawk is src:mawk.

Reported by: Fabien COUTANT <fabien.coutant@neuf.fr>

Date: Sun, 5 Mar 2006 17:33:42 UTC

Severity: normal

Tags: fixed-upstream

Found in version mawk/1.3.3-11

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#355442; Package mawk. Full text and rfc822 format available.

Acknowledgement sent to Fabien COUTANT <fabien.coutant@neuf.fr>:
New Bug report received and forwarded. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Fabien COUTANT <fabien.coutant@neuf.fr>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: mawk: missing Posix ERE curly braces
Date: Sun, 05 Mar 2006 18:32:49 +0100
Package: mawk
Version: 1.3.3-11
Severity: normal

mawk claims to comply with Posix 1003.2.  I can't check it directly, but
checking instead SUSv2 (which I think equals Posix concerning Awk), it
mandates that regular expressions support the interval repetition count
feature.  I am talking about {m}/{m,}/{m,n} at the place where you use ?, *
or +.

The sample program:

    BEGIN {
	s="abacab"
	r1="(a[bc]){2,3}"
	r2="(a[bc])(a[bc])+"
	print s~r1, s~r2
    }

should print "1 1" but it doesn't.
This is both a program bug (incomplete regexp implementation) and a
documentation bug (not 100% Posix compatible, should be added to the BUGS
section unless corrected).
	

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.15-1-k7-smp
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)

Versions of packages mawk depends on:
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an

-- no debconf information

-- 
Hope this helps,
Fabien.



Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#355442; Package mawk. Full text and rfc822 format available.

Acknowledgement sent to Aleksey Cheusov <vle@gmx.net>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #10 received at submit@bugs.debian.org (full text, mbox):

From: Aleksey Cheusov <vle@gmx.net>
To: Fabien COUTANT <fabien.coutant@neuf.fr>
Cc: 355442@bugs.debian.org, Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: Bug#355442: mawk: missing Posix ERE curly braces
Date: Mon, 06 Mar 2006 12:27:31 +0200
 FC> Package: mawk
 FC> Version: 1.3.3-11
 FC> Severity: normal

 FC> mawk claims to comply with Posix 1003.2.  I can't check it directly, but
 FC> checking instead SUSv2 (which I think equals Posix concerning Awk), it
 FC> mandates that regular expressions support the interval repetition count
 FC> feature.  I am talking about {m}/{m,}/{m,n}
 FC> at the place where you use ?, *
 FC> or +.

Look at this patch
http://www.mova.org/~cheusov/pub/mawk_external_regexp.patch

It allows to link mawk with external regexp library.

0 ~>mawk '/^a{3,5}$/'
aa
aaa
aaa
aaaa
aaaa
aaaaa
aaaaa
aaaaaa
0 ~>

-- 
Best regards, Aleksey Cheusov.




Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#355442; Package mawk. Full text and rfc822 format available.

Acknowledgement sent to Aleksey Cheusov <vle@gmx.net>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#355442; Package mawk. Full text and rfc822 format available.

Acknowledgement sent to Fabien COUTANT <fabien.coutant@neuf.fr>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #20 received at submit@bugs.debian.org (full text, mbox):

From: Fabien COUTANT <fabien.coutant@neuf.fr>
To: Aleksey Cheusov <vle@gmx.net>
Cc: 355442@bugs.debian.org, Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: Bug#355442: mawk: missing Posix ERE curly braces
Date: Mon, 06 Mar 2006 19:48:45 +0100
On Monday, 06 March 2006, you (Aleksey Cheusov) wrote:
> Look at this patch
> http://www.mova.org/~cheusov/pub/mawk_external_regexp.patch
> 
> It allows to link mawk with external regexp library.
> 
> 0 ~>mawk '/^a{3,5}$/'
> aa
> aaa
> aaa
> aaaa
> aaaa
> aaaaa
> aaaaa
> aaaaaa
> 0 ~>
> 
> -- 
> Best regards, Aleksey Cheusov.

Thanks, it looks interesting, I will try it.
Is there any chance it is integrated into mainstream, and become widespread ?
(which was, indirectly, the purpose of my bug report)

-- 
Hope this helps,
Fabien.



Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#355442; Package mawk. Full text and rfc822 format available.

Acknowledgement sent to Fabien COUTANT <fabien.coutant@neuf.fr>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#355442; Package mawk. Full text and rfc822 format available.

Acknowledgement sent to Aleksey Cheusov <vle@gmx.net>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #30 received at submit@bugs.debian.org (full text, mbox):

From: Aleksey Cheusov <vle@gmx.net>
To: Fabien COUTANT <fabien.coutant@neuf.fr>
Cc: 355442@bugs.debian.org, Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: Bug#355442: mawk: missing Posix ERE curly braces
Date: Wed, 08 Mar 2006 12:15:58 +0200
 FC> On Monday, 06 March 2006, you (Aleksey Cheusov) wrote:
 >> Look at this patch
 >> http://www.mova.org/~cheusov/pub/mawk_external_regexp.patch
 >> 
 >> It allows to link mawk with external regexp library.
 >> 
 >> 0 ~>mawk '/^a{3,5}$/'
 >> aa
 >> aaa
 >> aaa
 >> aaaa
 >> aaaa
 >> aaaaa
 >> aaaaa
 >> aaaaaa
 >> 0 ~>

 FC> Thanks, it looks interesting, I will try it.  Is there any chance
 FC> it is integrated into mainstream, and become widespread ?  (which
 FC> was, indirectly, the purpose of my bug report)

Do not forget to autoconf mawk sources using autoconf 2.13,
later versions didn't work for me.

It looks like mawk is almost dead. AFAIK nobody maintains it.

P.S.
Here is my bugreport for mawk
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314323

It looks very similar to your BR.

-- 
Best regards, Aleksey Cheusov.




Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#355442; Package mawk. Full text and rfc822 format available.

Acknowledgement sent to Aleksey Cheusov <vle@gmx.net>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message sent on to Fabien COUTANT <fabien.coutant@neuf.fr>:
Bug#355442. (Thu, 09 Jul 2009 09:24:06 GMT) Full text and rfc822 format available.

Message #38 received at 355442-submitter@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: 355442-submitter@bugs.debian.org
Subject: #355442 mawk: missing Posix ERE curly braces
Date: Thu, 09 Jul 2009 05:15:46 -0400
[Message part 1 (text/plain, inline)]
The program's used - but it appears that there's no maintainer in Debian.
fwiw, I put a copy including this fix in

	ftp://invisible-island.net/mawk/

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[signature.asc (application/pgp-signature, inline)]

Added tag(s) fixed-upstream. Request was from Thomas Dickey <dickey@his.com> to control@bugs.debian.org. (Tue, 28 Jul 2009 08:51:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Steve Langasek <vorlon@debian.org>:
Bug#355442; Package mawk. (Mon, 01 Mar 2010 19:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Steve Langasek <vorlon@debian.org>. (Mon, 01 Mar 2010 19:39:03 GMT) Full text and rfc822 format available.

Message #45 received at 355442@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 355442@bugs.debian.org
Subject: Re: mawk: missing Posix ERE curly braces
Date: Mon, 1 Mar 2010 13:37:53 -0600
Hi,

Fabien COUTANT wrote:

> I am talking about {m}/{m,}/{m,n} at the place where you use ?, *
> or +.
> 
> The sample program:
> 
>     BEGIN {
> 	s="abacab"
> 	r1="(a[bc]){2,3}"
> 	r2="(a[bc])(a[bc])+"
> 	print s~r1, s~r2
>     }
> 
> should print "1 1" but it doesn't.

With Aleksey Cheusov’s patch, this can be fixed by using libc regexp,
but ideally I would like mawk’s internal regexp to handle this, too.
I have a skeleton of an implementation mocked up, but I stopped when
the relationship between REcompile and RE_lex started getting ugly and
I ran out of time.  How should the pair of interval endpoints be
passed from RE_lex to REcompile?  And how should they be stored on the
op_stack?  Ideas welcome.

Jonathan




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 06:07:59 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.