summaryrefslogtreecommitdiffstats
path: root/package/config/zconf.y
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2011-02-02 14:49:50 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2011-02-02 15:54:50 +0100
commita538d4057e3add76889270ec097572223b11ba07 (patch)
tree59e2430e7b40d13e086c2a82004a474c86a8cab4 /package/config/zconf.y
parent72daa122b6a4a9562109299d0b747c71aac1e483 (diff)
downloadbuildroot-novena-a538d4057e3add76889270ec097572223b11ba07.tar.gz
buildroot-novena-a538d4057e3add76889270ec097572223b11ba07.zip
package/config: rebase against 2.6.37
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/config/zconf.y')
-rw-r--r--package/config/zconf.y21
1 files changed, 18 insertions, 3 deletions
diff --git a/package/config/zconf.y b/package/config/zconf.y
index 04d57886c..0717a3235 100644
--- a/package/config/zconf.y
+++ b/package/config/zconf.y
@@ -36,7 +36,7 @@ static struct menu *current_menu, *current_entry;
#define YYERROR_VERBOSE
#endif
%}
-%expect 28
+%expect 30
%union
{
@@ -68,6 +68,7 @@ static struct menu *current_menu, *current_entry;
%token <id>T_DEFAULT
%token <id>T_SELECT
%token <id>T_RANGE
+%token <id>T_VISIBLE
%token <id>T_OPTION
%token <id>T_ON
%token <string> T_WORD
@@ -123,7 +124,7 @@ stmt_list:
;
option_name:
- T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT
+ T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE
;
common_stmt:
@@ -359,7 +360,7 @@ menu: T_MENU prompt T_EOL
printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
};
-menu_entry: menu depends_list
+menu_entry: menu visibility_list depends_list
{
$$ = menu_add_menu();
};
@@ -430,6 +431,19 @@ depends: T_DEPENDS T_ON expr T_EOL
printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
};
+/* visibility option */
+
+visibility_list:
+ /* empty */
+ | visibility_list visible
+ | visibility_list T_EOL
+;
+
+visible: T_VISIBLE if_expr
+{
+ menu_add_visibility($2);
+};
+
/* prompt statement */
prompt_stmt_opt:
@@ -526,6 +540,7 @@ static const char *zconf_tokenname(int token)
case T_IF: return "if";
case T_ENDIF: return "endif";
case T_DEPENDS: return "depends";
+ case T_VISIBLE: return "visible";
}
return "<token>";
}