Eric Blake
2014-04-03 16:18:54 UTC
Hello GNU awk readers,
On today's Austin Group call (the people in charge of POSIX), we visited
http://austingroupbugs.net/view.php?id=226.
This is in regards to the POSIX awk specification at:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html
Among other things, there were two action items pointed out that this
list might be able to help with:
1. GNU awk has a bug regarding ;; as a terminator. The POSIX grammar
allows for:
awk '{print};;{print}'
but gawk rejects this case. This was deemed to be a bug in gawk, since
POSIX was based on the nawk behavior at the time POSIX was standardized,
and nawk has always supported this. Remember, the grammar specified in
mentions that an empty statement must be rejected.
2. Based on existing implementations, there is consensus that the POSIX
grammar is overly restrictive, and that we should change it to permit:
awk '{print} {print}'
and:
awk '/foo/; {print}'
since existing implementations all support it. But to do that, we need
someone with help in writing grammars to propose the changes to the one
appearing on the POSIX page. Any input would be appreciated.
On today's Austin Group call (the people in charge of POSIX), we visited
http://austingroupbugs.net/view.php?id=226.
This is in regards to the POSIX awk specification at:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html
Among other things, there were two action items pointed out that this
list might be able to help with:
1. GNU awk has a bug regarding ;; as a terminator. The POSIX grammar
allows for:
awk '{print};;{print}'
but gawk rejects this case. This was deemed to be a bug in gawk, since
POSIX was based on the nawk behavior at the time POSIX was standardized,
and nawk has always supported this. Remember, the grammar specified in
terminator : terminator ';'
| terminator NEWLINE
| ';'
| NEWLINE
;
which allows two ';' in a row, and nothing else in the normative text| terminator NEWLINE
| ';'
| NEWLINE
;
mentions that an empty statement must be rejected.
2. Based on existing implementations, there is consensus that the POSIX
grammar is overly restrictive, and that we should change it to permit:
awk '{print} {print}'
and:
awk '/foo/; {print}'
since existing implementations all support it. But to do that, we need
someone with help in writing grammars to propose the changes to the one
appearing on the POSIX page. Any input would be appreciated.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org