From b608abcbb9600d329677382284a21b32bce5eda2 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 23 Jul 2019 11:53:39 +0200 Subject: parser_bison: Fix for deprecated statements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bison-3.3 started to warn about: /home/n0-1/git/nftables/src/parser_bison.y:117.1-19: warning: deprecated directive, use ‘%define api.prefix {nft_}’ [-Wdeprecated] 117 | %name-prefix "nft_" | ^~~~~~~~~~~~~~~~~~~ /home/n0-1/git/nftables/src/parser_bison.y:119.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated] 119 | %pure-parser | ^~~~~~~~~~~~ /home/n0-1/git/nftables/src/parser_bison.y:124.1-14: warning: deprecated directive, use ‘%define parse.error verbose’ [-Wdeprecated] 124 | %error-verbose | ^~~~~~~~~~~~~~ Replace the last two as suggested but leave the first one in place as that causes compilation errors in scanner.l - flex seems not to pick up the changed internal symbol names. Signed-off-by: Phil Sutter Acked-by: Pablo Neira Ayuso --- src/parser_bison.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/parser_bison.y b/src/parser_bison.y index 53e66952..b463a140 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -116,12 +116,12 @@ int nft_lex(void *, void *, void *); %name-prefix "nft_" %debug -%pure-parser +%define api.pure %parse-param { struct nft_ctx *nft } %parse-param { void *scanner } %parse-param { struct parser_state *state } %lex-param { scanner } -%error-verbose +%define parse.error verbose %locations %initial-action { -- cgit v1.2.3