]> git.ipfire.org Git - thirdparty/nftables.git/commit
parser_bison: Avoid set references in odd places
authorPhil Sutter <phil@nwl.cc>
Sat, 16 Nov 2019 20:02:07 +0000 (21:02 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 18 Nov 2019 14:19:35 +0000 (15:19 +0100)
commit816ce7261bdf9296307bad5cafe79e895f537978
tree458531532d78b5b3d4433910f8de6e340f4580ed
parenta21b003dbd6b382a60b1d3425d929848f6968993
parser_bison: Avoid set references in odd places

With set references being recognized by symbol_expr and that being part
of primary_expr as well as primary_rhs_expr, they could basically occur
anywhere while in fact they are allowed only in quite a few spots.

Untangle things a bit by introducing set_ref_expr and adding that only
in places where it is needed to pass testsuites.

Make sure users can define variables as set references, eg.

define xyz = @setref

And allow to use them from set expressions and statements too.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser_bison.y