]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
Allow newlines in regular maps
authorPatrick McHardy <kaber@trash.net>
Wed, 18 Mar 2009 09:45:31 +0000 (10:45 +0100)
committerPatrick McHardy <kaber@trash.net>
Wed, 18 Mar 2009 09:45:31 +0000 (10:45 +0100)
The previous patch only handled sets and verdict maps.

Signed-off-by: Patrick McHardy <kaber@trash.net>
src/parser.y

index c527ce1fe4968ff329cb71fc1969f16a663c3d09..cc7e467cc54c1a32a78dd4658e44564cceaa0a9f 100644 (file)
@@ -913,12 +913,14 @@ map_list          :       map_list_expr
                                $1->location = @$;
                                $$ = $1;
                        }
-                       |       map_list        COMMA
+                       |       map_list        COMMA   opt_newline
                        ;
 
-map_list_expr          :       map_lhs_expr    ARROW   concat_expr
+map_list_expr          :       opt_newline     map_lhs_expr    opt_newline
+                                               ARROW           opt_newline
+                                               concat_expr     opt_newline
                        {
-                               $$ = mapping_expr_alloc(&@$, $1, $3);
+                               $$ = mapping_expr_alloc(&@$, $2, $6);
                        }
                        ;