From 7ec49701c4fc3b186a8841d4ff208909edd9e4e5 Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Mon, 16 Aug 2010 22:55:31 -0400 Subject: [PATCH] --- yaml --- r: 220663 b: refs/heads/master c: 8ea13e2c87c83b7cb0b360cb8779415967727647 h: refs/heads/master i: 220661: ead8bebf1e80d4658213accb0b4d0d9e26432355 220659: 9fdbae4fa5a371cfa783a2ce6fcde2a1fbf96637 220655: 86ac20034ff900c6e54a04dc526bf2e642595260 v: v3 --- [refs] | 2 +- trunk/Documentation/kbuild/kconfig-language.txt | 3 ++- trunk/scripts/kconfig/zconf.y | 14 +++++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 6fd4d9bcbc4d..52caac5cf42b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ef211607ed49c475735898514c60a9797208b699 +refs/heads/master: 8ea13e2c87c83b7cb0b360cb8779415967727647 diff --git a/trunk/Documentation/kbuild/kconfig-language.txt b/trunk/Documentation/kbuild/kconfig-language.txt index b472e4e0ba67..2fe93ca7c77c 100644 --- a/trunk/Documentation/kbuild/kconfig-language.txt +++ b/trunk/Documentation/kbuild/kconfig-language.txt @@ -322,7 +322,8 @@ mainmenu: "mainmenu" This sets the config program's title bar if the config program chooses -to use it. +to use it. It should be placed at the top of the configuration, before any +other statement. Kconfig hints diff --git a/trunk/scripts/kconfig/zconf.y b/trunk/scripts/kconfig/zconf.y index 23dfd3baa7a1..e9b14efd7414 100644 --- a/trunk/scripts/kconfig/zconf.y +++ b/trunk/scripts/kconfig/zconf.y @@ -36,7 +36,7 @@ static struct menu *current_menu, *current_entry; #define YYERROR_VERBOSE #endif %} -%expect 26 +%expect 28 %union { @@ -104,14 +104,15 @@ static struct menu *current_menu, *current_entry; %} %% -input: stmt_list; +input: nl start | start; + +start: mainmenu_stmt stmt_list | stmt_list; stmt_list: /* empty */ | stmt_list common_stmt | stmt_list choice_stmt | stmt_list menu_stmt - | stmt_list T_MAINMENU prompt nl | stmt_list end { zconf_error("unexpected end statement"); } | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } | stmt_list option_name error T_EOL @@ -342,6 +343,13 @@ if_block: | if_block choice_stmt ; +/* mainmenu entry */ + +mainmenu_stmt: T_MAINMENU prompt nl +{ + menu_add_prompt(P_MENU, $2, NULL); +}; + /* menu entry */ menu: T_MENU prompt T_EOL