Defect report from : Paul Eggert , UCLA
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 176 line 6881 section awk Grammar objection {20060210b}
Problem:
Edition of Specification (Year): 2004
Defect code : 1. Error
Currently the POSIX specification for 'awk' requires support for
statements like this:
print $x++--
print $$0++--
This is because the grammar in the 'awk' Grammar section allows these
statements, and there is no ambiguity in the grammar here, so the
precedence and associativity rules are not needed and do not apply.
However, in practice, 'awk' implementations do not always support
expressions in which a subexpression's principal operator has a lower
precedence than the operator of the parent expression. This is
because the usual LL(1) and LALR(1) parsing techniques often do not
allow such expressions. For example, 'nawk', 'gawk', and 'mawk' all
reject the first usage, and 'gawk' rejects the second one.
Action:
Insert this text before XCU page 176 line 6881:
Each expression in an 'awk' program shall conform to the precedence
and associativity rules, even when this is not needed to resolve an
ambiguity. For example, because '$' has higher precedence than
'++', the string '$x++--' is not a valid 'awk' expression even
though it is unambiguously parsed by the grammar as '$(x++)--'.
|