]> git.sur5r.net Git - kconfig-frontends/blobdiff - libs/parser/yconf.y
Synchronise with v4.10
[kconfig-frontends] / libs / parser / yconf.y
index de90ea0b4bc22a8369943641b6d1016b09252d8c..f57c06283bce9a0bb4ba5cc5ccc78fe2751244f4 100644 (file)
@@ -31,7 +31,7 @@ struct symbol *symbol_hash[SYMBOL_HASHSIZE];
 static struct menu *current_menu, *current_entry;
 
 %}
-%expect 30
+%expect 32
 
 %union
 {
@@ -62,6 +62,7 @@ static struct menu *current_menu, *current_entry;
 %token <id>T_TYPE
 %token <id>T_DEFAULT
 %token <id>T_SELECT
+%token <id>T_IMPLY
 %token <id>T_RANGE
 %token <id>T_VISIBLE
 %token <id>T_OPTION
@@ -124,7 +125,7 @@ stmt_list:
 ;
 
 option_name:
-       T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE
+       T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_IMPLY | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE
 ;
 
 common_stmt:
@@ -216,6 +217,12 @@ config_option: T_SELECT T_WORD if_expr T_EOL
        printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
 };
 
+config_option: T_IMPLY T_WORD if_expr T_EOL
+{
+       menu_add_symbol(P_IMPLY, sym_lookup($2, 0), $3);
+       printd(DEBUG_PARSE, "%s:%d:imply\n", zconf_curname(), zconf_lineno());
+};
+
 config_option: T_RANGE symbol symbol if_expr T_EOL
 {
        menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4);
@@ -664,6 +671,11 @@ static void print_symbol(FILE *out, struct menu *menu)
                        expr_fprint(prop->expr, out);
                        fputc('\n', out);
                        break;
+               case P_IMPLY:
+                       fputs( "  imply ", out);
+                       expr_fprint(prop->expr, out);
+                       fputc('\n', out);
+                       break;
                case P_RANGE:
                        fputs( "  range ", out);
                        expr_fprint(prop->expr, out);