From 26d92bb8921ac4e022cdc88bde8fc7bc617f8766 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 23 Mar 2011 12:49:53 +0100 Subject: A hack to distinguish if..else from else: in case. The old BIRD grammar needs two lookaheads to distinguish if..else from else: in case, which caused the parser to fail on some combinations of both expressions. This patch replaces two tokens 'else' ':' by one token 'else:' to fix that. --- filter/config.Y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'filter/config.Y') diff --git a/filter/config.Y b/filter/config.Y index 8ff20466..b9aa67f8 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -305,11 +305,11 @@ switch_body: /* EMPTY */ { $$ = NULL; } $$->data = $4; $$->left = $1; } - | switch_body ELSE ':' cmds { + | switch_body ELSECOL cmds { $$ = f_new_tree(); $$->from.type = T_VOID; $$->to.type = T_VOID; - $$->data = $4; + $$->data = $3; $$->left = $1; } ; -- cgit v1.2.3