NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/53885 (awk ERE bug)



The following reply was made to PR bin/53885; it has been noted by GNATS.

From: Martijn Dekker <martijn%inlv.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
        jdolecek%NetBSD.org@localhost, kre%munnari.OZ.AU@localhost
Cc: 
Subject: Re: bin/53885 (awk ERE bug)
Date: Fri, 18 Jan 2019 17:18:52 +0100

 Op 18-01-19 om 15:35 schreef jdolecek%NetBSD.org@localhost:
 > nawk doesn't support {} in regular expressions. e.g. this also fails:
 > echo "aaa" | nawk '/a{3}/ { print "matched" }'
 > As Kernigham notes in https://github.com/onetrueawk/awk/issues/26 changing
 > this would be very difficult.
 
 POSIX requires that awk supports standard EREs[*1] which include bounds
 (interval expressions)[*2], and it has done for many years[*3].
 
 If it is true that nawk's ERE implementation is so "exceedingly
 complicated and fragile" that adding a basic and standard ERE feature
 would be too difficult, then this awk is broken by design and you should
 consider using some other awk implementation as the default awk.
 
 - M.
 
 [*1]
 http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html#tag_20_06_13_04
 
 [*2] point 5 at
 http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04_06
 
 [*3] I was able to verify this back to the 2004 version, but the
 requirement may well be older. In any case 2004 is 15 years ago now.
 



Home | Main Index | Thread Index | Old Index