diff options
| -rw-r--r-- | Documentation/kbuild/kconfig-language.txt | 3 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.y | 14 |
2 files changed, 13 insertions, 4 deletions
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index b472e4e0ba67..2fe93ca7c77c 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt | |||
| @@ -322,7 +322,8 @@ mainmenu: | |||
| 322 | "mainmenu" <prompt> | 322 | "mainmenu" <prompt> |
| 323 | 323 | ||
| 324 | This sets the config program's title bar if the config program chooses | 324 | This sets the config program's title bar if the config program chooses |
| 325 | to use it. | 325 | to use it. It should be placed at the top of the configuration, before any |
| 326 | other statement. | ||
| 326 | 327 | ||
| 327 | 328 | ||
| 328 | Kconfig hints | 329 | Kconfig hints |
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 23dfd3baa7a1..e9b14efd7414 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
| @@ -36,7 +36,7 @@ static struct menu *current_menu, *current_entry; | |||
| 36 | #define YYERROR_VERBOSE | 36 | #define YYERROR_VERBOSE |
| 37 | #endif | 37 | #endif |
| 38 | %} | 38 | %} |
| 39 | %expect 26 | 39 | %expect 28 |
| 40 | 40 | ||
| 41 | %union | 41 | %union |
| 42 | { | 42 | { |
| @@ -104,14 +104,15 @@ static struct menu *current_menu, *current_entry; | |||
| 104 | %} | 104 | %} |
| 105 | 105 | ||
| 106 | %% | 106 | %% |
| 107 | input: stmt_list; | 107 | input: nl start | start; |
| 108 | |||
| 109 | start: mainmenu_stmt stmt_list | stmt_list; | ||
| 108 | 110 | ||
| 109 | stmt_list: | 111 | stmt_list: |
| 110 | /* empty */ | 112 | /* empty */ |
| 111 | | stmt_list common_stmt | 113 | | stmt_list common_stmt |
| 112 | | stmt_list choice_stmt | 114 | | stmt_list choice_stmt |
| 113 | | stmt_list menu_stmt | 115 | | stmt_list menu_stmt |
| 114 | | stmt_list T_MAINMENU prompt nl | ||
| 115 | | stmt_list end { zconf_error("unexpected end statement"); } | 116 | | stmt_list end { zconf_error("unexpected end statement"); } |
| 116 | | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } | 117 | | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } |
| 117 | | stmt_list option_name error T_EOL | 118 | | stmt_list option_name error T_EOL |
| @@ -342,6 +343,13 @@ if_block: | |||
| 342 | | if_block choice_stmt | 343 | | if_block choice_stmt |
| 343 | ; | 344 | ; |
| 344 | 345 | ||
| 346 | /* mainmenu entry */ | ||
| 347 | |||
| 348 | mainmenu_stmt: T_MAINMENU prompt nl | ||
| 349 | { | ||
| 350 | menu_add_prompt(P_MENU, $2, NULL); | ||
| 351 | }; | ||
| 352 | |||
| 345 | /* menu entry */ | 353 | /* menu entry */ |
| 346 | 354 | ||
| 347 | menu: T_MENU prompt T_EOL | 355 | menu: T_MENU prompt T_EOL |
