awk: Fix overly permissive func arg list parsing
authorBrian Foley <bpfoley@google.com>
Mon, 7 Jan 2019 02:32:59 +0000 (18:32 -0800)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 21 Jan 2019 11:59:19 +0000 (12:59 +0100)
commit1c42c18e9601ee1416d61663f5a91874954c524d
tree3ee100f9d73c739daa1effca974666a52d81c271
parent08a514c097f1451678940a3178a9565b9d65a193
awk: Fix overly permissive func arg list parsing

It allows things like 'func f(a b)' and 'func f(a,)' which GNU awk forbids.

function                                             old     new   delta
parse_program                                        327     367     +40
chain_expr                                            40      67     +27
parse_expr                                           891     915     +24
EMSG_TOO_FEW_ARGS                                     30      18     -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 91/-12)             Total: 79 bytes

Signed-off-by: Brian Foley <bpfoley@google.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/awk.c
testsuite/awk.tests