kconfig: remove redundant if_block rule
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 11 Dec 2018 11:00:54 +0000 (20:00 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 15 Dec 2018 08:45:21 +0000 (17:45 +0900)
The code block surrounded by "if" ... "endif" is stmt_list.

Remove the redundant if_block symbol entirely.

Remove "stmt_list: stmt_list end" rule as well since it would
obviously cause conflicts.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/kconfig/zconf.y

index a92f167e8267bd1beccba98067f05431d5e5ceeb..dcbf6439ace94dc6bd64fbe1efb2ef136f6d2858 100644 (file)
@@ -123,7 +123,6 @@ stmt_list:
        | stmt_list common_stmt
        | stmt_list choice_stmt
        | stmt_list menu_stmt
-       | stmt_list end                 { zconf_error("unexpected end statement"); }
        | stmt_list T_WORD error T_EOL  { zconf_error("unknown statement \"%s\"", $2); }
        | stmt_list error T_EOL         { zconf_error("invalid statement"); }
 ;
@@ -330,14 +329,7 @@ if_end: end
        }
 };
 
-if_stmt: if_entry if_block if_end
-;
-
-if_block:
-         /* empty */
-       | if_block common_stmt
-       | if_block menu_stmt
-       | if_block choice_stmt
+if_stmt: if_entry stmt_list if_end
 ;
 
 /* menu entry */