From: Ondrej Zajicek Date: Wed, 17 Feb 2010 10:29:48 +0000 (+0100) Subject: Changes right recursion to left in the grammar of the case expression. X-Git-Tag: v1.2.2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14f6aca48037a0653e6bcfa27a4da48e8f962198;p=thirdparty%2Fbird.git Changes right recursion to left in the grammar of the case expression. --- diff --git a/filter/config.Y b/filter/config.Y index f8674e5c2..fcbee7140 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -273,16 +273,17 @@ fprefix_set: ; switch_body: /* EMPTY */ { $$ = NULL; } - | set_item ':' cmds switch_body { - $$ = $1; - $$->data = $3; - $$->left = $4; + | switch_body set_item ':' cmds { + $$ = $2; + $$->data = $4; + $$->left = $1; } - | ELSE ':' cmds { + | switch_body ELSE ':' cmds { $$ = f_new_tree(); $$->from.type = T_VOID; $$->to.type = T_VOID; - $$->data = $3; + $$->data = $4; + $$->left = $1; } ;