From 9491f1a8eecf1c023ebe3a30b1e92e44a4a39a05 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 17 Feb 2020 22:37:29 +0100 Subject: parser: incorrect handle location Handle location is not correct, this leads to misleading error reporting. Signed-off-by: Pablo Neira Ayuso --- src/parser_bison.y | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/parser_bison.y b/src/parser_bison.y index f5d7026a..819c78bf 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -2231,7 +2231,7 @@ tableid_spec : family_spec HANDLE NUM memset(&$$, 0, sizeof($$)); $$.family = $1; $$.handle.id = $3; - $$.handle.location = @$; + $$.handle.location = @3; } ; @@ -2246,7 +2246,7 @@ chain_spec : table_spec identifier chainid_spec : table_spec HANDLE NUM { $$ = $1; - $$.handle.location = @$; + $$.handle.location = @3; $$.handle.id = $3; } ; @@ -2270,7 +2270,7 @@ set_spec : table_spec identifier setid_spec : table_spec HANDLE NUM { $$ = $1; - $$.handle.location = @$; + $$.handle.location = @3; $$.handle.id = $3; } ; @@ -2294,7 +2294,7 @@ flowtable_spec : table_spec identifier flowtableid_spec : table_spec HANDLE NUM { $$ = $1; - $$.handle.location = @$; + $$.handle.location = @3; $$.handle.id = $3; } ; @@ -2318,7 +2318,7 @@ obj_spec : table_spec identifier objid_spec : table_spec HANDLE NUM { $$ = $1; - $$.handle.location = @$; + $$.handle.location = @3; $$.handle.id = $3; } ; @@ -2334,7 +2334,7 @@ obj_identifier : identifier handle_spec : HANDLE NUM { memset(&$$, 0, sizeof($$)); - $$.handle.location = @$; + $$.handle.location = @2; $$.handle.id = $2; } ; -- cgit v1.2.3