summaryrefslogtreecommitdiff
path: root/adk/config
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-12-21 00:26:41 -0600
committerWaldemar Brodkorb <wbx@openadk.org>2014-12-21 00:26:41 -0600
commitf82981b97110ac217ff7f0d7e5fd7d26036adfde (patch)
tree96963c6238cceed76c78e3c93cbcce78a6bd6bd4 /adk/config
parent716ce66d95ede0e13cc182417a4d020ff5984407 (diff)
add patch to Kconfig
Add following patch https://lkml.org/lkml/2010/7/19/178 This allows to select for symbol as module and for special predefined values on int/string/hex symbols.
Diffstat (limited to 'adk/config')
-rw-r--r--adk/config/Makefile4
-rw-r--r--adk/config/expr.h9
-rw-r--r--adk/config/kconfig-language.txt (renamed from adk/config/Kconfig-language.txt)7
-rw-r--r--adk/config/lex.zconf.c_shipped137
-rw-r--r--adk/config/lkc.h1
-rw-r--r--adk/config/menu.c70
-rw-r--r--adk/config/symbol.c88
-rw-r--r--adk/config/zconf.hash.c_shipped303
-rw-r--r--adk/config/zconf.tab.c_shipped543
-rw-r--r--adk/config/zconf.tab.h_shipped107
-rw-r--r--adk/config/zconf.y17
11 files changed, 806 insertions, 480 deletions
diff --git a/adk/config/Makefile b/adk/config/Makefile
index 7e91da1bf..b6c253f18 100644
--- a/adk/config/Makefile
+++ b/adk/config/Makefile
@@ -78,7 +78,7 @@ lkc_defs.h: lkc_proto.h
# The following requires flex/bison
# By default we use the _shipped versions, uncomment the
# following line if you are modifying the flex/bison src.
-#LKC_GENPARSER:= 1
+# LKC_GENPARSER:= 1
ifdef LKC_GENPARSER
@@ -86,7 +86,7 @@ ifdef LKC_GENPARSER
bison -t -d -v -b $* -p $(notdir $*) $<
%.hash.c: %.gperf
- gperf < $< > $@
+ gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$$' -p -t zconf.gperf
lex.%.c: %.l
flex -P$(notdir $*) -o$@ $<
diff --git a/adk/config/expr.h b/adk/config/expr.h
index 412ea8a2a..94d891937 100644
--- a/adk/config/expr.h
+++ b/adk/config/expr.h
@@ -54,6 +54,13 @@ struct expr_value {
tristate tri;
};
+struct expr_select_value {
+ struct expr *expr;
+ tristate tri;
+ struct expr *value;
+ struct expr_select_value *next;
+};
+
struct symbol_value {
void *val;
tristate tri;
@@ -83,6 +90,7 @@ struct symbol {
struct property *prop;
struct expr_value dir_dep;
struct expr_value rev_dep;
+ struct expr_select_value *val_dep;
};
#define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
@@ -151,6 +159,7 @@ struct property {
* P_PROMPT, P_DEFAULT, P_MENU, P_COMMENT */
struct file *file; /* what file was this property defined */
int lineno; /* what lineno was this property defined */
+ struct expr *value; /* the optional P_SELECT value */
};
#define for_all_properties(sym, st, tok) \
diff --git a/adk/config/Kconfig-language.txt b/adk/config/kconfig-language.txt
index c412c2458..68ec5d1f9 100644
--- a/adk/config/Kconfig-language.txt
+++ b/adk/config/kconfig-language.txt
@@ -95,14 +95,15 @@ applicable everywhere (see syntax).
bool "foo"
default y
-- reverse dependencies: "select" <symbol> ["if" <expr>]
+- reverse dependencies: "select" <symbol> [<expr>] ["if" <expr>]
While normal dependencies reduce the upper limit of a symbol (see
below), reverse dependencies can be used to force a lower limit of
another symbol. The value of the current menu symbol is used as the
minimal value <symbol> can be set to. If <symbol> is selected multiple
times, the limit is set to the largest selection.
- Reverse dependencies can only be used with boolean or tristate
- symbols.
+ Reverse dependencies without the optional <expr> can only be used with
+ boolean or tristate symbols. If the optional <expr> is supplied,
+ the <symbol> will be set to that value if possible.
Note:
select should be used with care. select will force
a symbol to a value without visiting the dependencies.
diff --git a/adk/config/lex.zconf.c_shipped b/adk/config/lex.zconf.c_shipped
index dc3e81807..069e44b77 100644
--- a/adk/config/lex.zconf.c_shipped
+++ b/adk/config/lex.zconf.c_shipped
@@ -1,5 +1,6 @@
+#line 2 "lex.zconf.c"
-#line 3 "scripts/kconfig/lex.zconf.c"
+#line 4 "lex.zconf.c"
#define YY_INT_ALIGNED short int
@@ -160,7 +161,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -764,8 +773,10 @@ int zconf_flex_debug = 0;
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *zconftext;
+#line 1 "zconf.l"
#define YY_NO_INPUT 1
+#line 6 "zconf.l"
/*
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
* Released under the terms of the GNU GPL v2.0.
@@ -777,7 +788,6 @@ char *zconftext;
#include <string.h>
#include <unistd.h>
-#define LKC_DIRECT_LINK
#include "lkc.h"
#define START_STRSIZE 16
@@ -791,8 +801,8 @@ static char *text;
static int text_size, text_asize;
struct buffer {
- struct buffer *parent;
- YY_BUFFER_STATE state;
+ struct buffer *parent;
+ YY_BUFFER_STATE state;
};
struct buffer *current_buf;
@@ -802,15 +812,15 @@ static int last_ts, first_ts;
static void zconf_endhelp(void);
static void zconf_endfile(void);
-void new_string(void)
+static void new_string(void)
{
- text = malloc(START_STRSIZE);
+ text = xmalloc(START_STRSIZE);
text_asize = START_STRSIZE;
text_size = 0;
*text = 0;
}
-void append_string(const char *str, int size)
+static void append_string(const char *str, int size)
{
int new_size = text_size + size + 1;
if (new_size > text_asize) {
@@ -824,12 +834,13 @@ void append_string(const char *str, int size)
text[text_size] = 0;
}
-void alloc_string(const char *str, int size)
+static void alloc_string(const char *str, int size)
{
- text = malloc(size + 1);
+ text = xmalloc(size + 1);
memcpy(text, str, size);
text[size] = 0;
}
+#line 844 "lex.zconf.c"
#define INITIAL 0
#define COMMAND 1
@@ -914,7 +925,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -922,7 +938,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( zconftext, zconfleng, 1, zconfout )
+#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -999,9 +1015,13 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
+#line 73 "zconf.l"
+
int str = 0;
int ts, i;
+#line 1024 "lex.zconf.c"
+
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -1058,9 +1078,11 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
/* rule 1 can match eol */
+#line 78 "zconf.l"
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
+#line 78 "zconf.l"
{
current_file->lineno++;
return T_EOL;
@@ -1068,16 +1090,19 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
+#line 82 "zconf.l"
YY_BREAK
case 4:
YY_RULE_SETUP
+#line 85 "zconf.l"
{
BEGIN(COMMAND);
}
YY_BREAK
case 5:
YY_RULE_SETUP
+#line 89 "zconf.l"
{
unput(zconftext[0]);
BEGIN(COMMAND);
@@ -1086,8 +1111,9 @@ YY_RULE_SETUP
case 6:
YY_RULE_SETUP
+#line 96 "zconf.l"
{
- struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
+ const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
BEGIN(PARAM);
current_pos.file = current_file;
current_pos.lineno = current_file->lineno;
@@ -1102,11 +1128,13 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
+#line 109 "zconf.l"
YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
+#line 110 "zconf.l"
{
BEGIN(INITIAL);
current_file->lineno++;
@@ -1114,36 +1142,45 @@ YY_RULE_SETUP
}
YY_BREAK
+
case 9:
YY_RULE_SETUP
+#line 118 "zconf.l"
return T_AND;
YY_BREAK
case 10:
YY_RULE_SETUP
+#line 119 "zconf.l"
return T_OR;
YY_BREAK
case 11:
YY_RULE_SETUP
+#line 120 "zconf.l"
return T_OPEN_PAREN;
YY_BREAK
case 12:
YY_RULE_SETUP
+#line 121 "zconf.l"
return T_CLOSE_PAREN;
YY_BREAK
case 13:
YY_RULE_SETUP
+#line 122 "zconf.l"
return T_NOT;
YY_BREAK
case 14:
YY_RULE_SETUP
+#line 123 "zconf.l"
return T_EQUAL;
YY_BREAK
case 15:
YY_RULE_SETUP
+#line 124 "zconf.l"
return T_UNEQUAL;
YY_BREAK
case 16:
YY_RULE_SETUP
+#line 125 "zconf.l"
{
str = zconftext[0];
new_string();
@@ -1153,16 +1190,19 @@ YY_RULE_SETUP
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
+#line 130 "zconf.l"
BEGIN(INITIAL); current_file->lineno++; return T_EOL;
YY_BREAK
case 18:
YY_RULE_SETUP
+#line 131 "zconf.l"
/* ignore */
YY_BREAK
case 19:
YY_RULE_SETUP
+#line 132 "zconf.l"
{
- struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
+ const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
if (id && id->flags & TF_PARAM) {
zconflval.id = id;
return id->token;
@@ -1174,29 +1214,35 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
+#line 142 "zconf.l"
/* comment */
YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
+#line 143 "zconf.l"
current_file->lineno++;
YY_BREAK
case 22:
YY_RULE_SETUP
+#line 144 "zconf.l"
YY_BREAK
case YY_STATE_EOF(PARAM):
+#line 145 "zconf.l"
{
BEGIN(INITIAL);
}
YY_BREAK
+
case 23:
/* rule 23 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up zconftext again */
YY_RULE_SETUP
+#line 151 "zconf.l"
{
append_string(zconftext, zconfleng);
zconflval.string = text;
@@ -1205,6 +1251,7 @@ YY_RULE_SETUP
YY_BREAK
case 24:
YY_RULE_SETUP
+#line 156 "zconf.l"
{
append_string(zconftext, zconfleng);
}
@@ -1215,6 +1262,7 @@ case 25:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up zconftext again */
YY_RULE_SETUP
+#line 159 "zconf.l"
{
append_string(zconftext + 1, zconfleng - 1);
zconflval.string = text;
@@ -1223,12 +1271,14 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
+#line 164 "zconf.l"
{
append_string(zconftext + 1, zconfleng - 1);
}
YY_BREAK
case 27:
YY_RULE_SETUP
+#line 167 "zconf.l"
{
if (str == zconftext[0]) {
BEGIN(PARAM);
@@ -1241,6 +1291,7 @@ YY_RULE_SETUP
case 28:
/* rule 28 can match eol */
YY_RULE_SETUP
+#line 175 "zconf.l"
{
printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno());
current_file->lineno++;
@@ -1249,13 +1300,16 @@ YY_RULE_SETUP
}
YY_BREAK
case YY_STATE_EOF(STRING):
+#line 181 "zconf.l"
{
BEGIN(INITIAL);
}
YY_BREAK
+
case 29:
YY_RULE_SETUP
+#line 187 "zconf.l"
{
ts = 0;
for (i = 0; i < zconfleng; i++) {
@@ -1285,6 +1339,7 @@ case 30:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up zconftext again */
YY_RULE_SETUP
+#line 209 "zconf.l"
{
current_file->lineno++;
zconf_endhelp();
@@ -1294,6 +1349,7 @@ YY_RULE_SETUP
case 31:
/* rule 31 can match eol */
YY_RULE_SETUP
+#line 214 "zconf.l"
{
current_file->lineno++;
append_string("\n", 1);
@@ -1301,6 +1357,7 @@ YY_RULE_SETUP
YY_BREAK
case 32:
YY_RULE_SETUP
+#line 218 "zconf.l"
{
while (zconfleng) {
if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t'))
@@ -1313,6 +1370,7 @@ YY_RULE_SETUP
}
YY_BREAK
case YY_STATE_EOF(HELP):
+#line 228 "zconf.l"
{
zconf_endhelp();
return T_HELPTEXT;
@@ -1321,6 +1379,7 @@ case YY_STATE_EOF(HELP):
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(COMMAND):
+#line 234 "zconf.l"
{
if (current_file) {
zconf_endfile();
@@ -1332,8 +1391,10 @@ case YY_STATE_EOF(COMMAND):
YY_BREAK
case 33:
YY_RULE_SETUP
+#line 243 "zconf.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
+#line 1398 "lex.zconf.c"
case YY_END_OF_BUFFER:
{
@@ -2060,8 +2121,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2300,6 +2361,9 @@ void zconffree (void * ptr )
#define YYTABLES_NAME "yytables"
+#line 243 "zconf.l"
+
+
void zconf_starthelp(void)
{
new_string();
@@ -2313,6 +2377,7 @@ static void zconf_endhelp(void)
BEGIN(INITIAL);
}
+
/*
* Try to open specified file with following names:
* ./name
@@ -2345,42 +2410,50 @@ void zconf_initscan(const char *name)
exit(1);
}
- current_buf = malloc(sizeof(*current_buf));
+ current_buf = xmalloc(sizeof(*current_buf));
memset(current_buf, 0, sizeof(*current_buf));
current_file = file_lookup(name);
current_file->lineno = 1;
- current_file->flags = FILE_BUSY;
}
void zconf_nextfile(const char *name)
{
+ struct file *iter;
struct file *file = file_lookup(name);
- struct buffer *buf = malloc(sizeof(*buf));
+ struct buffer *buf = xmalloc(sizeof(*buf));
memset(buf, 0, sizeof(*buf));
current_buf->state = YY_CURRENT_BUFFER;
- zconfin = zconf_fopen(name);
+ zconfin = zconf_fopen(file->name);
if (!zconfin) {
- printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
+ printf("%s:%d: can't open file \"%s\"\n",
+ zconf_curname(), zconf_lineno(), file->name);
exit(1);
}
zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE));
buf->parent = current_buf;
current_buf = buf;
- if (file->flags & FILE_BUSY) {
- printf("%s:%d: do not source '%s' from itself\n",
- zconf_curname(), zconf_lineno(), name);
- exit(1);
- }
- if (file->flags & FILE_SCANNED) {
- printf("%s:%d: file '%s' is already sourced from '%s'\n",
- zconf_curname(), zconf_lineno(), name,
- file->parent->name);
- exit(1);
+ for (iter = current_file->parent; iter; iter = iter->parent ) {
+ if (!strcmp(current_file->name,iter->name) ) {
+ printf("%s:%d: recursive inclusion detected. "
+ "Inclusion path:\n current file : '%s'\n",
+ zconf_curname(), zconf_lineno(),
+ zconf_curname());
+ iter = current_file->parent;
+ while (iter && \
+ strcmp(iter->name,current_file->name)) {
+ printf(" included from: '%s:%d'\n",
+ iter->name, iter->lineno-1);
+ iter = iter->parent;
+ }
+ if (iter)
+ printf(" included from: '%s:%d'\n",
+ iter->name, iter->lineno+1);
+ exit(1);
+ }
}
- file->flags |= FILE_BUSY;
file->lineno = 1;
file->parent = current_file;
current_file = file;
@@ -2390,8 +2463,6 @@ static void zconf_endfile(void)
{
struct buffer *parent;
- current_file->flags |= FILE_SCANNED;
- current_file->flags &= ~FILE_BUSY;
current_file = current_file->parent;
parent = current_buf->parent;
@@ -2409,7 +2480,7 @@ int zconf_lineno(void)
return current_pos.lineno;
}
-char *zconf_curname(void)
+const char *zconf_curname(void)
{
return current_pos.file ? current_pos.file->name : "<none>";
}
diff --git a/adk/config/lkc.h b/adk/config/lkc.h
index 3af99579b..f53f5d446 100644
--- a/adk/config/lkc.h
+++ b/adk/config/lkc.h
@@ -117,6 +117,7 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
+void menu_add_select(struct symbol *sym, struct expr *value, struct expr *dep);
void menu_add_option(int token, char *arg);
void menu_finalize(struct menu *parent);
void menu_set_type(int type);
diff --git a/adk/config/menu.c b/adk/config/menu.c
index a26cc5d2a..cd3a75451 100644
--- a/adk/config/menu.c
+++ b/adk/config/menu.c
@@ -196,6 +196,14 @@ void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep)
menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep);
}
+void menu_add_select(struct symbol *sym, struct expr *value, struct expr *dep)
+{
+ struct property *p;
+
+ p = menu_add_prop(P_SELECT, NULL, expr_alloc_symbol(sym), dep);
+ p->value = value;
+}
+
void menu_add_option(int token, char *arg)
{
switch (token) {
@@ -257,13 +265,22 @@ static void sym_check_prop(struct symbol *sym)
prop_warn(prop,
"config symbol '%s' uses select, but is "
"not boolean or tristate", sym->name);
- else if (sym2->type != S_UNKNOWN &&
+ else if (prop->value == NULL &&
+ sym2->type != S_UNKNOWN &&
sym2->type != S_BOOLEAN &&
sym2->type != S_TRISTATE)
prop_warn(prop,
- "'%s' has wrong type. 'select' only "
- "accept arguments of boolean and "
- "tristate type", sym2->name);
+ "'%s' has wrong type. 'select' without a "
+ "value only accepts arguments of boolean "
+ "and tristate type", sym2->name);
+ else if (prop->value != NULL &&
+ (sym2->type == S_INT ||
+ sym2->type == S_HEX ||
+ sym2->type == S_STRING) &&
+ prop->value->type != E_SYMBOL)
+ prop_warn(prop,
+ "select value for config symbol '%s'"
+ " must be a single symbol", sym2->name);
break;
case P_RANGE:
if (sym->type != S_INT && sym->type != S_HEX)
@@ -279,6 +296,25 @@ static void sym_check_prop(struct symbol *sym)
}
}
+static void finalize_select(struct symbol *sym, struct property *prop,
+ struct expr *dep)
+{
+ struct symbol *es = prop_get_symbol(prop);
+ struct expr_select_value *esv;
+
+ if (prop->value) {
+ esv = malloc(sizeof *esv);
+ esv->expr = expr_alloc_and(expr_alloc_symbol(sym),
+ expr_copy(dep));
+ esv->value = prop->value;
+ esv->next = es->val_dep;
+ es->val_dep = esv;
+ } else {
+ es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr,
+ expr_alloc_and(expr_alloc_symbol(sym), expr_copy(dep)));
+ }
+}
+
void menu_finalize(struct menu *parent)
{
struct menu *menu, *last_menu;
@@ -329,11 +365,8 @@ void menu_finalize(struct menu *parent)
if (menu->sym && menu->sym->type != S_TRISTATE)
dep = expr_trans_bool(dep);
prop->visible.expr = dep;
- if (prop->type == P_SELECT) {
- struct symbol *es = prop_get_symbol(prop);
- es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr,
- expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep)));
- }
+ if (prop->type == P_SELECT)
+ finalize_select(menu->sym, prop, dep);
}
}
for (menu = parent->list; menu; menu = menu->next)
@@ -437,9 +470,15 @@ void menu_finalize(struct menu *parent)
}
if (sym && !sym_is_optional(sym) && parent->prompt) {
+ struct expr_select_value *esv;
+
sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr,
expr_alloc_and(parent->prompt->visible.expr,
expr_alloc_symbol(&symbol_mod)));
+ for (esv = sym->val_dep; esv; esv = esv->next)
+ esv->expr = expr_alloc_or(esv->expr,
+ expr_alloc_and(parent->prompt->visible.expr,
+ expr_alloc_symbol(&symbol_mod)));
}
}
@@ -620,6 +659,7 @@ void get_symbol_str(struct gstr *r, struct symbol *sym,
{
bool hit;
struct property *prop;
+ struct expr_select_value *esv;
if (sym && sym->name) {
str_printf(r, "Symbol: %s [=%s]\n", sym->name,
@@ -656,6 +696,11 @@ void get_symbol_str(struct gstr *r, struct symbol *sym,
} else
str_printf(r, " && ");
expr_gstr_print(prop->expr, r);
+ if (prop->value) {
+ str_printf(r, " (value=");
+ expr_gstr_print(prop->value, r);
+ str_printf(r, ")");
+ }
}
if (hit)
str_append(r, "\n");
@@ -664,6 +709,13 @@ void get_symbol_str(struct gstr *r, struct symbol *sym,
expr_gstr_print(sym->rev_dep.expr, r);
str_append(r, "\n");
}
+ for (esv = sym->val_dep; esv; esv = esv->next) {
+ str_append(r, " Selected by: ");
+ expr_gstr_print(esv->expr, r);
+ str_append(r, " with value: ");
+ expr_gstr_print(esv->value, r);
+ str_append(r, "\n");
+ }
str_append(r, "\n\n");
}
diff --git a/adk/config/symbol.c b/adk/config/symbol.c
index af1deb2be..27f8117d4 100644
--- a/adk/config/symbol.c
+++ b/adk/config/symbol.c
@@ -190,6 +190,7 @@ static void sym_calc_visibility(struct symbol *sym)
{
struct property *prop;
tristate tri;
+ struct expr_select_value *esv;
/* any prompt visible? */
tri = no;
@@ -222,6 +223,15 @@ static void sym_calc_visibility(struct symbol *sym)
sym->rev_dep.tri = tri;
sym_set_changed(sym);
}
+ for (esv = sym->val_dep; esv; esv = esv->next) {
+ tri = expr_calc_value(esv->expr);
+ if (tri == mod && sym_get_type(sym) == S_BOOLEAN)
+ tri = yes;
+ if (esv->tri != tri) {
+ esv->tri = tri;
+ sym_set_changed(sym);
+ }
+ }
}
/*
@@ -307,6 +317,8 @@ void sym_calc_value(struct symbol *sym)
struct symbol_value newval, oldval;
struct property *prop;
struct expr *e;
+ struct expr_select_value *esv;
+ int got_sel_val;
if (!sym)
return;
@@ -368,6 +380,9 @@ void sym_calc_value(struct symbol *sym)
}
if (sym->rev_dep.tri != no)
sym->flags |= SYMBOL_WRITE;
+ for (esv = sym->val_dep; esv; esv = esv->next)
+ if (esv->tri != no)
+ sym->flags |= SYMBOL_WRITE;
if (!sym_is_choice(sym)) {
prop = sym_get_default_prop(sym);
if (prop) {
@@ -377,19 +392,34 @@ void sym_calc_value(struct symbol *sym)
}
}
calc_newval:
- if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) {
- struct expr *e;
- e = expr_simplify_unmet_dep(sym->rev_dep.expr,
- sym->dir_dep.expr);
- fprintf(stderr, "warning: (");
- expr_fprint(e, stderr);
- fprintf(stderr, ") selects %s which has unmet direct dependencies (",
- sym->name);
- expr_fprint(sym->dir_dep.expr, stderr);
- fprintf(stderr, ")\n");
- expr_free(e);
+ if (sym->dir_dep.tri == no) {
+ if (sym->rev_dep.tri != no) {
+ fprintf(stderr, "warning: (");
+ expr_fprint(sym->rev_dep.expr, stderr);
+ fprintf(stderr, ") selects %s which has unmet direct dependencies (",
+ sym->name);
+ expr_fprint(sym->dir_dep.expr, stderr);
+ fprintf(stderr, ")\n");
+ }
+ for (esv = sym->val_dep; esv; esv = esv->next) {
+ if ((esv->tri != no) &&
+ (expr_calc_value(esv->value) != no)) {
+ fprintf(stderr, "warning: (");
+ expr_fprint(esv->expr, stderr);
+ fprintf(stderr, ") selects %s (with value ",
+ sym->name);
+ expr_fprint(esv->value, stderr);
+ fprintf(stderr, ") which has unmet direct dependencies (");
+ expr_fprint(sym->dir_dep.expr, stderr);
+ fprintf(stderr, ")\n");
+ }
+ }
}
- newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri);
+ newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri);
+ for (esv = sym->val_dep; esv; esv = esv->next)
+ if (esv->tri != no)
+ newval.tri = EXPR_OR(newval.tri,
+ expr_calc_value(esv->value));
}
if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)
newval.tri = yes;
@@ -404,6 +434,23 @@ void sym_calc_value(struct symbol *sym)
break;
}
}
+ got_sel_val = 0;
+ for (esv = sym->val_dep; esv; esv = esv->next) {
+ if (esv->tri != no) {
+ struct symbol *ss = esv->value->left.sym;
+
+ if (got_sel_val) {
+ /* warn of more than one value selected */
+ } else {
+ sym->flags |= SYMBOL_WRITE;
+ sym_calc_value(ss);
+ newval.val = ss->curr.val;
+ got_sel_val = 1;
+ }
+ }
+ }
+ if (got_sel_val)
+ break;
prop = sym_get_default_prop(sym);
if (prop) {
struct symbol *ds = prop_get_symbol(prop);
@@ -486,6 +533,8 @@ void sym_set_all_changed(void)
bool sym_tristate_within_range(struct symbol *sym, tristate val)
{
int type = sym_get_type(sym);
+ struct expr_select_value *esv;
+ tristate tri;
if (sym->visible == no)
return false;
@@ -495,11 +544,14 @@ bool sym_tristate_within_range(struct symbol *sym, tristate val)
if (type == S_BOOLEAN && val == mod)
return false;
- if (sym->visible <= sym->rev_dep.tri)
+ tri = sym->rev_dep.tri;
+ for (esv = sym->val_dep; esv; esv = esv->next)
+ tri = EXPR_OR(tri, esv->tri);
+ if (sym->visible <= tri)
return false;
if (sym_is_choice_value(sym) && sym->visible == yes)
return val == yes;
- return val >= sym->rev_dep.tri && val <= sym->visible;
+ return val >= tri && val <= sym->visible;
}
bool sym_set_tristate_value(struct symbol *sym, tristate val)
@@ -795,7 +847,13 @@ const char *sym_get_string_value(struct symbol *sym)
bool sym_is_changable(struct symbol *sym)
{
- return sym->visible > sym->rev_dep.tri;
+ tristate tri = sym->rev_dep.tri;
+ struct expr_select_value *esv;
+
+ for (esv = sym->val_dep; esv; esv = esv->next)
+ tri = EXPR_OR(tri, esv->tri);
+
+ return sym->visible > tri;
}
static unsigned strhash(const char *s)
diff --git a/adk/config/zconf.hash.c_shipped b/adk/config/zconf.hash.c_shipped
index c77a8eff1..5f3e06f16 100644
--- a/adk/config/zconf.hash.c_shipped
+++ b/adk/config/zconf.hash.c_shipped
@@ -1,5 +1,5 @@
-/* ANSI-C code produced by gperf version 3.0.4 */
-/* Command-line: gperf -t --output-file scripts/kconfig/zconf.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/kconfig/zconf.gperf */
+/* ANSI-C code produced by gperf version 3.0.3 */
+/* Command-line: gperf -t --output-file zconf.hash.c -a -C -E -g -k 1,3, -p -t zconf.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
@@ -28,11 +28,11 @@
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
#endif
-#line 10 "scripts/kconfig/zconf.gperf"
+#line 10 "zconf.gperf"
struct kconf_id;
static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
-/* maximum key range = 71, duplicates = 0 */
+/* maximum key range = 50, duplicates = 0 */
#ifdef __GNUC__
__inline
@@ -46,32 +46,32 @@ kconf_id_hash (register const char *str, register unsigned int len)
{
static const unsigned char asso_values[] =
{
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 5, 25, 25,
- 0, 0, 0, 5, 0, 0, 73, 73, 5, 0,
- 10, 5, 45, 73, 20, 20, 0, 15, 15, 73,
- 20, 5, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 10, 40, 5,
+ 0, 0, 5, 52, 0, 20, 52, 52, 10, 20,
+ 5, 0, 35, 52, 0, 30, 0, 15, 0, 52,
+ 15, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52
};
register int hval = len;
@@ -85,85 +85,85 @@ kconf_id_hash (register const char *str, register unsigned int len)
hval += asso_values[(unsigned char)str[0]];
break;
}
- return hval + asso_values[(unsigned char)str[len - 1]];
+ return hval;
}
struct kconf_id_strings_t
{
- char kconf_id_strings_str2[sizeof("if")];
- char kconf_id_strings_str3[sizeof("int")];
+ char kconf_id_strings_str2[sizeof("on")];
+ char kconf_id_strings_str3[sizeof("env")];
char kconf_id_strings_str5[sizeof("endif")];
- char kconf_id_strings_str7[sizeof("default")];
- char kconf_id_strings_str8[sizeof("tristate")];
+ char kconf_id_strings_str6[sizeof("option")];
+ char kconf_id_strings_str7[sizeof("endmenu")];
+ char kconf_id_strings_str8[sizeof("optional")];
char kconf_id_strings_str9[sizeof("endchoice")];
- char kconf_id_strings_str12[sizeof("def_tristate")];
+ char kconf_id_strings_str10[sizeof("range")];
+ char kconf_id_strings_str11[sizeof("choice")];
+ char kconf_id_strings_str12[sizeof("default")];
char kconf_id_strings_str13[sizeof("def_bool")];
- char kconf_id_strings_str14[sizeof("defconfig_list")];
- char kconf_id_strings_str17[sizeof("on")];
- char kconf_id_strings_str18[sizeof("optional")];
- char kconf_id_strings_str21[sizeof("option")];
- char kconf_id_strings_str22[sizeof("endmenu")];
- char kconf_id_strings_str23[sizeof("mainmenu")];
- char kconf_id_strings_str25[sizeof("menuconfig")];
+ char kconf_id_strings_str14[sizeof("help")];
+ char kconf_id_strings_str16[sizeof("config")];
+ char kconf_id_strings_str17[sizeof("def_tristate")];
+ char kconf_id_strings_str18[sizeof("hex")];
+ char kconf_id_strings_str19[sizeof("defconfig_list")];
+ char kconf_id_strings_str22[sizeof("if")];
+ char kconf_id_strings_str23[sizeof("int")];
char kconf_id_strings_str27[sizeof("modules")];
- char kconf_id_strings_str28[sizeof("allnoconfig_y")];
+ char kconf_id_strings_str28[sizeof("tristate")];
char kconf_id_strings_str29[sizeof("menu")];
- char kconf_id_strings_str31[sizeof("select")];
char kconf_id_strings_str32[sizeof("comment")];
- char kconf_id_strings_str33[sizeof("env")];
- char kconf_id_strings_str35[sizeof("range")];
- char kconf_id_strings_str36[sizeof("choice")];
- char kconf_id_strings_str39[sizeof("bool")];
- char kconf_id_strings_str41[sizeof("source")];
- char kconf_id_strings_str42[sizeof("visible")];
- char kconf_id_strings_str43[sizeof("hex")];
- char kconf_id_strings_str46[sizeof("config")];
+ char kconf_id_strings_str33[sizeof("allnoconfig_y")];
+ char kconf_id_strings_str35[sizeof("menuconfig")];
+ char kconf_id_strings_str36[sizeof("string")];
+ char kconf_id_strings_str37[sizeof("visible")];
+ char kconf_id_strings_str41[sizeof("prompt")];
+ char kconf_id_strings_str42[sizeof("depends")];
+ char kconf_id_strings_str44[sizeof("bool")];
+ char kconf_id_strings_str46[sizeof("select")];
char kconf_id_strings_str47[sizeof("boolean")];
- char kconf_id_strings_str51[sizeof("string")];
- char kconf_id_strings_str54[sizeof("help")];
- char kconf_id_strings_str56[sizeof("prompt")];
- char kconf_id_strings_str72[sizeof("depends")];
+ char kconf_id_strings_str48[sizeof("mainmenu")];
+ char kconf_id_strings_str51[sizeof("source")];
};
static const struct kconf_id_strings_t kconf_id_strings_contents =
{
- "if",
- "int",
+ "on",
+ "env",
"endif",
- "default",
- "tristate",
+ "option",
+ "endmenu",
+ "optional",
"endchoice",
- "def_tristate",
+ "range",
+ "choice",
+ "default",
"def_bool",
+ "help",
+ "config",
+ "def_tristate",
+ "hex",
"defconfig_list",
- "on",
- "optional",
- "option",
- "endmenu",
- "mainmenu",
- "menuconfig",
+ "if",
+ "int",
"modules",
- "allnoconfig_y",
+ "tristate",
"menu",
- "select",
"comment",
- "env",
- "range",
- "choice",
- "bool",
- "source",
- "visible",
- "hex",
- "config",
- "boolean",
+ "allnoconfig_y",
+ "menuconfig",
"string",
- "help",
+ "visible",
"prompt",
- "depends"
+ "depends",
+ "bool",
+ "select",
+ "boolean",
+ "mainmenu",
+ "source"
};
#define kconf_id_strings ((const char *) &kconf_id_strings_contents)
#ifdef __GNUC__
__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
+#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif
#endif
@@ -176,95 +176,88 @@ kconf_id_lookup (register const char *str, register unsigned int len)
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 14,
MIN_HASH_VALUE = 2,
- MAX_HASH_VALUE = 72
+ MAX_HASH_VALUE = 51
};
static const struct kconf_id wordlist[] =
{
{-1}, {-1},
-#line 25 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM},
-#line 36 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT},
+#line 43 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM},
+#line 46 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_OPT_ENV, TF_OPTION},
{-1},
-#line 26 "scripts/kconfig/zconf.gperf"
+#line 26 "zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND},
- {-1},
-#line 29 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
-#line 31 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE},
-#line 20 "scripts/kconfig/zconf.gperf"
+#line 42 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_OPTION, TF_COMMAND},
+#line 17 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND},
+#line 28 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_OPTIONAL, TF_COMMAND},
+#line 20 "zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND},
- {-1}, {-1},
-#line 32 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE},
-#line 35 "scripts/kconfig/zconf.gperf"
+#line 40 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND},
+#line 19 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_CHOICE, TF_COMMAND},
+#line 29 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
+#line 35 "zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
-#line 45 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
- {-1}, {-1},
-#line 43 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM},
-#line 28 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
- {-1}, {-1},
-#line 42 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND},
-#line 17 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND},
-#line 15 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_MAINMENU, TF_COMMAND},
- {-1},
-#line 23 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND},
+#line 24 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND},
{-1},
-#line 44 "scripts/kconfig/zconf.gperf"
+#line 22 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND},
+#line 32 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
+#line 37 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_HEX},
+#line 45 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION},
+ {-1}, {-1},
+#line 25 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM},
+#line 36 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT},
+ {-1}, {-1}, {-1},
+#line 44 "zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
-#line 47 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPT_ALLNOCONFIG_Y,TF_OPTION},
-#line 16 "scripts/kconfig/zconf.gperf"
+#line 31 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE},
+#line 16 "zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
- {-1},
-#line 39 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND},
-#line 21 "scripts/kconfig/zconf.gperf"
+ {-1}, {-1},
+#line 21 "zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
-#line 46 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION},
+#line 47 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ALLNOCONFIG_Y,TF_OPTION},
{-1},
-#line 40 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND},
-#line 19 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND},
- {-1}, {-1},
-#line 33 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_TYPE, TF_COMMAND, S_BOOLEAN},
+#line 23 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND},
+#line 38 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_TYPE, TF_COMMAND, S_STRING},
+#line 41 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_VISIBLE, TF_COMMAND},
+ {-1}, {-1}, {-1},
+#line 30 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_PROMPT, TF_COMMAND},
+#line 27 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_DEPENDS, TF_COMMAND},
{-1},
-#line 18 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND},
-#line 41 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND},
-#line 37 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX},
- {-1}, {-1},
-#line 22 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND},
-#line 34 "scripts/kconfig/zconf.gperf"
+#line 33 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str44, T_TYPE, TF_COMMAND, S_BOOLEAN},
+ {-1},
+#line 39 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND},
+#line 34 "zconf.gperf"
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
- {-1}, {-1}, {-1},
-#line 38 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING},
+#line 15 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND},
{-1}, {-1},
-#line 24 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54, T_HELP, TF_COMMAND},
- {-1},
-#line 30 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56, T_PROMPT, TF_COMMAND},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
-#line 27 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72, T_DEPENDS, TF_COMMAND}
+#line 18 "zconf.gperf"
+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_SOURCE, TF_COMMAND}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -285,5 +278,5 @@ kconf_id_lookup (register const char *str, register unsigned int len)
}
return 0;
}
-#line 48 "scripts/kconfig/zconf.gperf"
+#line 48 "zconf.gperf"
diff --git a/adk/config/zconf.tab.c_shipped b/adk/config/zconf.tab.c_shipped
index de5e84ed3..1f6c1bb4a 100644
--- a/adk/config/zconf.tab.c_shipped
+++ b/adk/config/zconf.tab.c_shipped
@@ -73,6 +73,8 @@
/* Copy the first part of user declarations. */
+/* Line 268 of yacc.c */
+#line 1 "zconf.y"
/*
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
@@ -107,6 +109,8 @@ static struct menu *current_menu, *current_entry;
+/* Line 268 of yacc.c */
+#line 114 "zconf.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -175,6 +179,8 @@ static struct menu *current_menu, *current_entry;
typedef union YYSTYPE
{
+/* Line 293 of yacc.c */
+#line 37 "zconf.y"
char *string;
struct file *file;
@@ -185,6 +191,8 @@ typedef union YYSTYPE
+/* Line 293 of yacc.c */
+#line 196 "zconf.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -194,11 +202,15 @@ typedef union YYSTYPE
/* Copy the second part of user declarations. */
+/* Line 343 of yacc.c */
+#line 97 "zconf.y"
/* Include zconf.hash.c here so it can see the token constants. */
#include "zconf.hash.c"
+/* Line 343 of yacc.c */
+#line 214 "zconf.tab.c"
#ifdef short
# undef short
@@ -417,16 +429,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 11
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 290
+#define YYLAST 296
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 36
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 50
/* YYNRULES -- Number of rules. */
-#define YYNRULES 118
+#define YYNRULES 119
/* YYNRULES -- Number of states. */
-#define YYNSTATES 191
+#define YYNSTATES 194
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -479,14 +491,14 @@ static const yytype_uint16 yyprhs[] =
23, 26, 31, 36, 40, 42, 44, 46, 48, 50,
52, 54, 56, 58, 60, 62, 64, 66, 68, 72,
75, 79, 82, 86, 89, 90, 93, 96, 99, 102,
- 105, 108, 112, 117, 122, 127, 133, 137, 138, 142,
- 143, 146, 150, 153, 155, 159, 160, 163, 166, 169,
- 172, 175, 180, 184, 187, 192, 193, 196, 200, 202,
- 206, 207, 210, 213, 216, 220, 224, 228, 230, 234,
- 235, 238, 241, 244, 248, 252, 255, 258, 261, 262,
- 265, 268, 271, 276, 277, 280, 283, 286, 287, 290,
- 292, 294, 297, 300, 303, 305, 308, 309, 312, 314,
- 318, 322, 326, 329, 333, 337, 339, 341, 342
+ 105, 108, 112, 117, 122, 127, 133, 139, 143, 144,
+ 148, 149, 152, 156, 159, 161, 165, 166, 169, 172,
+ 175, 178, 181, 186, 190, 193, 198, 199, 202, 206,
+ 208, 212, 213, 216, 219, 222, 226, 230, 234, 236,
+ 240, 241, 244, 247, 250, 254, 258, 261, 264, 267,
+ 268, 271, 274, 277, 282, 283, 286, 289, 292, 293,
+ 296, 298, 300, 303, 306, 309, 311, 314, 315, 318,
+ 320, 324, 328, 332, 335, 339, 343, 345, 347, 348
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -504,29 +516,29 @@ static const yytype_int8 yyrhs[] =
47, 48, -1, 47, 49, -1, 47, 75, -1, 47,
73, -1, 47, 42, -1, 47, 31, -1, 19, 78,
31, -1, 18, 79, 82, 31, -1, 20, 83, 82,
- 31, -1, 21, 26, 82, 31, -1, 22, 84, 84,
- 82, 31, -1, 24, 50, 31, -1, -1, 50, 26,
- 51, -1, -1, 34, 79, -1, 7, 85, 31, -1,
- 52, 56, -1, 80, -1, 53, 58, 54, -1, -1,
- 56, 57, -1, 56, 75, -1, 56, 73, -1, 56,
- 31, -1, 56, 42, -1, 18, 79, 82, 31, -1,
- 19, 78, 31, -1, 17, 31, -1, 20, 26, 82,
- 31, -1, -1, 58, 41, -1, 14, 83, 81, -1,
- 80, -1, 59, 62, 60, -1, -1, 62, 41, -1,
- 62, 67, -1, 62, 55, -1, 3, 79, 81, -1,
- 4, 79, 31, -1, 64, 76, 74, -1, 80, -1,
- 65, 68, 66, -1, -1, 68, 41, -1, 68, 67,
- -1, 68, 55, -1, 6, 79, 31, -1, 9, 79,
- 31, -1, 70, 74, -1, 12, 31, -1, 72, 13,
- -1, -1, 74, 75, -1, 74, 31, -1, 74, 42,
- -1, 16, 25, 83, 31, -1, -1, 76, 77, -1,
- 76, 31, -1, 23, 82, -1, -1, 79, 82, -1,
- 26, -1, 27, -1, 5, 31, -1, 8, 31, -1,
- 15, 31, -1, 31, -1, 81, 31, -1, -1, 14,
- 83, -1, 84, -1, 84, 34, 84, -1, 84, 28,
- 84, -1, 30, 83, 29, -1, 35, 83, -1, 83,
- 32, 83, -1, 83, 33, 83, -1, 26, -1, 27,
- -1, -1, 26, -1
+ 31, -1, 21, 26, 82, 31, -1, 21, 26, 83,
+ 82, 31, -1, 22, 84, 84, 82, 31, -1, 24,
+ 50, 31, -1, -1, 50, 26, 51, -1, -1, 34,
+ 79, -1, 7, 85, 31, -1, 52, 56, -1, 80,
+ -1, 53, 58, 54, -1, -1, 56, 57, -1, 56,
+ 75, -1, 56, 73, -1, 56, 31, -1, 56, 42,
+ -1, 18, 79, 82, 31, -1, 19, 78, 31, -1,
+ 17, 31, -1, 20, 26, 82, 31, -1, -1, 58,
+ 41, -1, 14, 83, 81, -1, 80, -1, 59, 62,
+ 60, -1, -1, 62, 41, -1, 62, 67, -1, 62,
+ 55, -1, 3, 79, 81, -1, 4, 79, 31, -1,
+ 64, 76, 74, -1, 80, -1, 65, 68, 66, -1,
+ -1, 68, 41, -1, 68, 67, -1, 68, 55, -1,
+ 6, 79, 31, -1, 9, 79, 31, -1, 70, 74,
+ -1, 12, 31, -1, 72, 13, -1, -1, 74, 75,
+ -1, 74, 31, -1, 74, 42, -1, 16, 25, 83,
+ 31, -1, -1, 76, 77, -1, 76, 31, -1, 23,
+ 82, -1, -1, 79, 82, -1, 26, -1, 27, -1,
+ 5, 31, -1, 8, 31, -1, 15, 31, -1, 31,
+ -1, 81, 31, -1, -1, 14, 83, -1, 84, -1,
+ 84, 34, 84, -1, 84, 28, 84, -1, 30, 83,
+ 29, -1, 35, 83, -1, 83, 32, 83, -1, 83,
+ 33, 83, -1, 26, -1, 27, -1, -1, 26, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@@ -536,14 +548,14 @@ static const yytype_uint16 yyrline[] =
112, 113, 114, 118, 122, 122, 122, 122, 122, 122,
122, 122, 126, 127, 128, 129, 130, 131, 135, 136,
142, 150, 156, 164, 174, 176, 177, 178, 179, 180,
- 181, 184, 192, 198, 208, 214, 220, 223, 225, 236,
- 237, 242, 251, 256, 264, 267, 269, 270, 271, 272,
- 273, 276, 282, 293, 299, 309, 311, 316, 324, 332,
- 335, 337, 338, 339, 344, 351, 358, 363, 371, 374,
- 376, 377, 378, 381, 389, 396, 403, 409, 416, 418,
- 419, 420, 423, 431, 433, 434, 437, 444, 446, 451,
- 452, 455, 456, 457, 461, 462, 465, 466, 469, 470,
- 471, 472, 473, 474, 475, 478, 479, 482, 483
+ 181, 184, 192, 198, 208, 214, 220, 226, 229, 231,
+ 242, 243, 248, 257, 262, 270, 273, 275, 276, 277,
+ 278, 279, 282, 288, 299, 305, 315, 317, 322, 330,
+ 338, 341, 343, 344, 345, 350, 357, 364, 369, 377,
+ 380, 382, 383, 384, 387, 395, 402, 409, 415, 422,
+ 424, 425, 426, 429, 437, 439, 440, 443, 450, 452,
+ 457, 458, 461, 462, 463, 467, 468, 471, 472, 475,
+ 476, 477, 478, 479, 480, 481, 484, 485, 488, 489
};
#endif
@@ -591,14 +603,14 @@ static const yytype_uint8 yyr1[] =
39, 39, 39, 39, 40, 40, 40, 40, 40, 40,
40, 40, 41, 41, 41, 41, 41, 41, 42, 42,
43, 44, 45, 46, 47, 47, 47, 47, 47, 47,
- 47, 48, 48, 48, 48, 48, 49, 50, 50, 51,
- 51, 52, 53, 54, 55, 56, 56, 56, 56, 56,
- 56, 57, 57, 57, 57, 58, 58, 59, 60, 61,
- 62, 62, 62, 62, 63, 64, 65, 66, 67, 68,
- 68, 68, 68, 69, 70, 71, 72, 73, 74, 74,
- 74, 74, 75, 76, 76, 76, 77, 78, 78, 79,
- 79, 80, 80, 80, 81, 81, 82, 82, 83, 83,
- 83, 83, 83, 83, 83, 84, 84, 85, 85
+ 47, 48, 48, 48, 48, 48, 48, 49, 50, 50,
+ 51, 51, 52, 53, 54, 55, 56, 56, 56, 56,
+ 56, 56, 57, 57, 57, 57, 58, 58, 59, 60,
+ 61, 62, 62, 62, 62, 63, 64, 65, 66, 67,
+ 68, 68, 68, 68, 69, 70, 71, 72, 73, 74,
+ 74, 74, 74, 75, 76, 76, 76, 77, 78, 78,
+ 79, 79, 80, 80, 80, 81, 81, 82, 82, 83,
+ 83, 83, 83, 83, 83, 83, 84, 84, 85, 85
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -608,14 +620,14 @@ static const yytype_uint8 yyr2[] =
2, 4, 4, 3, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
3, 2, 3, 2, 0, 2, 2, 2, 2, 2,
- 2, 3, 4, 4, 4, 5, 3, 0, 3, 0,
- 2, 3, 2, 1, 3, 0, 2, 2, 2, 2,
- 2, 4, 3, 2, 4, 0, 2, 3, 1, 3,
- 0, 2, 2, 2, 3, 3, 3, 1, 3, 0,
- 2, 2, 2, 3, 3, 2, 2, 2, 0, 2,
- 2, 2, 4, 0, 2, 2, 2, 0, 2, 1,
- 1, 2, 2, 2, 1, 2, 0, 2, 1, 3,
- 3, 3, 2, 3, 3, 1, 1, 0, 1
+ 2, 3, 4, 4, 4, 5, 5, 3, 0, 3,
+ 0, 2, 3, 2, 1, 3, 0, 2, 2, 2,
+ 2, 2, 4, 3, 2, 4, 0, 2, 3, 1,
+ 3, 0, 2, 2, 2, 3, 3, 3, 1, 3,
+ 0, 2, 2, 2, 3, 3, 2, 2, 2, 0,
+ 2, 2, 2, 4, 0, 2, 2, 2, 0, 2,
+ 1, 1, 2, 2, 2, 1, 2, 0, 2, 1,
+ 3, 3, 3, 2, 3, 3, 1, 1, 0, 1
};
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
@@ -623,33 +635,33 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 6, 0, 104, 0, 3, 0, 6, 6, 99, 100,
- 0, 1, 0, 0, 0, 0, 117, 0, 0, 0,
+ 6, 0, 105, 0, 3, 0, 6, 6, 100, 101,
+ 0, 1, 0, 0, 0, 0, 118, 0, 0, 0,
0, 0, 0, 14, 18, 15, 16, 20, 17, 19,
- 21, 0, 22, 0, 7, 34, 25, 34, 26, 55,
- 65, 8, 70, 23, 93, 79, 9, 27, 88, 24,
- 10, 0, 105, 2, 74, 13, 0, 101, 0, 118,
- 0, 102, 0, 0, 0, 115, 116, 0, 0, 0,
- 108, 103, 0, 0, 0, 0, 0, 0, 0, 88,
- 0, 0, 75, 83, 51, 84, 30, 32, 0, 112,
- 0, 0, 67, 0, 0, 11, 12, 0, 0, 0,
- 0, 97, 0, 0, 0, 47, 0, 40, 39, 35,
- 36, 0, 38, 37, 0, 0, 97, 0, 59, 60,
- 56, 58, 57, 66, 54, 53, 71, 73, 69, 72,
- 68, 106, 95, 0, 94, 80, 82, 78, 81, 77,
- 90, 91, 89, 111, 113, 114, 110, 109, 29, 86,
- 0, 106, 0, 106, 106, 106, 0, 0, 0, 87,
- 63, 106, 0, 106, 0, 96, 0, 0, 41, 98,
- 0, 0, 106, 49, 46, 28, 0, 62, 0, 107,
- 92, 42, 43, 44, 0, 0, 48, 61, 64, 45,
- 50
+ 21, 0, 22, 0, 7, 34, 25, 34, 26, 56,
+ 66, 8, 71, 23, 94, 80, 9, 27, 89, 24,
+ 10, 0, 106, 2, 75, 13, 0, 102, 0, 119,
+ 0, 103, 0, 0, 0, 116, 117, 0, 0, 0,
+ 109, 104, 0, 0, 0, 0, 0, 0, 0, 89,
+ 0, 0, 76, 84, 52, 85, 30, 32, 0, 113,
+ 0, 0, 68, 0, 0, 11, 12, 0, 0, 0,
+ 0, 98, 0, 0, 0, 48, 0, 40, 39, 35,
+ 36, 0, 38, 37, 0, 0, 98, 0, 60, 61,
+ 57, 59, 58, 67, 55, 54, 72, 74, 70, 73,
+ 69, 107, 96, 0, 95, 81, 83, 79, 82, 78,
+ 91, 92, 90, 112, 114, 115, 111, 110, 29, 87,
+ 0, 107, 0, 107, 107, 107, 0, 0, 0, 88,
+ 64, 107, 0, 107, 0, 97, 0, 0, 41, 99,
+ 0, 0, 107, 107, 50, 47, 28, 0, 63, 0,
+ 108, 93, 42, 43, 44, 0, 0, 0, 49, 62,
+ 65, 45, 46, 51
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
-1, 3, 4, 5, 33, 34, 108, 35, 36, 37,
- 38, 74, 109, 110, 157, 186, 39, 40, 124, 41,
+ 38, 74, 109, 110, 157, 188, 39, 40, 124, 41,
76, 120, 77, 42, 128, 43, 78, 6, 44, 45,
137, 46, 80, 47, 48, 49, 111, 112, 81, 113,
79, 134, 152, 153, 50, 7, 165, 69, 70, 60
@@ -660,74 +672,74 @@ static const yytype_int16 yydefgoto[] =
#define YYPACT_NINF -90
static const yytype_int16 yypact[] =
{
- 4, 42, -90, 96, -90, 111, -90, 15, -90, -90,
- 75, -90, 82, 42, 104, 42, 110, 107, 42, 115,
- 125, -4, 121, -90, -90, -90, -90, -90, -90, -90,
- -90, 162, -90, 163, -90, -90, -90, -90, -90, -90,
+ 4, 77, -90, 61, -90, 129, -90, 15, -90, -90,
+ 37, -90, 47, 77, 51, 77, 59, 63, 77, 66,
+ 71, 60, 69, -90, -90, -90, -90, -90, -90, -90,
+ -90, 125, -90, 127, -90, -90, -90, -90, -90, -90,
-90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
- -90, 139, -90, -90, 138, -90, 142, -90, 143, -90,
- 152, -90, 164, 167, 168, -90, -90, -4, -4, 77,
- -18, -90, 177, 185, 33, 71, 195, 247, 236, -2,
- 236, 171, -90, -90, -90, -90, -90, -90, 41, -90,
- -4, -4, 138, 97, 97, -90, -90, 186, 187, 194,
- 42, 42, -4, 196, 97, -90, 219, -90, -90, -90,
- -90, 210, -90, -90, 204, 42, 42, 199, -90, -90,
+ -90, 157, -90, -90, 100, -90, 128, -90, 154, -90,
+ 156, -90, 160, 161, 170, -90, -90, 60, 60, 203,
+ 49, -90, 171, 182, 33, 101, 213, 252, 241, -2,
+ 241, 189, -90, -90, -90, -90, -90, -90, -13, -90,
+ 60, 60, 100, 115, 115, -90, -90, 185, 186, 201,
+ 77, 77, 60, 211, 115, -90, 237, -90, -90, -90,
+ -90, 230, -90, -90, 222, 77, 77, 228, -90, -90,
-90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
- -90, 222, -90, 223, -90, -90, -90, -90, -90, -90,
- -90, -90, -90, -90, 215, -90, -90, -90, -90, -90,
- -4, 222, 228, 222, -5, 222, 97, 35, 229, -90,
- -90, 222, 232, 222, -4, -90, 135, 233, -90, -90,
- 234, 235, 222, 240, -90, -90, 237, -90, 239, -13,
- -90, -90, -90, -90, 244, 42, -90, -90, -90, -90,
- -90
+ -90, 245, -90, 65, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, 231, -90, -90, -90, -90, -90,
+ 60, 245, 234, 245, -5, -4, 115, 62, 238, -90,
+ -90, 245, 239, 245, 60, -90, 209, 240, -90, -90,
+ 242, 244, -5, 245, 246, -90, -90, 248, -90, 250,
+ 137, -90, -90, -90, -90, 251, 254, 77, -90, -90,
+ -90, -90, -90, -90
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -90, -90, 269, 271, -90, 23, -70, -90, -90, -90,
- -90, 243, -90, -90, -90, -90, -90, -90, -90, -48,
+ -90, -90, 261, 281, -90, 76, -70, -90, -90, -90,
+ -90, 253, -90, -90, -90, -90, -90, -90, -90, -48,
-90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
- -90, -20, -90, -90, -90, -90, -90, 206, 205, -68,
- -90, -90, 169, -1, 27, -7, 118, -66, -89, -90
+ -90, -20, -90, -90, -90, -90, -90, 212, 210, -68,
+ -90, -90, 175, -1, 104, -7, 123, -66, -89, -90
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -86
+#define YYTABLE_NINF -87
static const yytype_int16 yytable[] =
{
10, 88, 89, 54, 146, 147, 119, 1, 122, 164,
- 93, 141, 56, 142, 58, 156, 94, 62, 1, 90,
+ 164, 141, 56, 142, 58, 156, 143, 62, 1, 90,
91, 131, 65, 66, 144, 145, 67, 90, 91, 132,
127, 68, 136, -31, 97, 2, 154, -31, -31, -31,
-31, -31, -31, -31, -31, 98, 52, -31, -31, 99,
-31, 100, 101, 102, 103, 104, -31, 105, 129, 106,
- 138, 173, 92, 141, 107, 142, 174, 172, 8, 9,
- 143, -33, 97, 90, 91, -33, -33, -33, -33, -33,
- -33, -33, -33, 98, 166, -33, -33, 99, -33, 100,
- 101, 102, 103, 104, -33, 105, 11, 106, 179, 151,
- 123, 126, 107, 135, 125, 130, 2, 139, 2, 90,
- 91, -5, 12, 55, 161, 13, 14, 15, 16, 17,
- 18, 19, 20, 65, 66, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 57, 59, 31, 61, -4,
- 12, 63, 32, 13, 14, 15, 16, 17, 18, 19,
- 20, 64, 71, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 72, 73, 31, 180, 90, 91, 52,
- 32, -85, 97, 82, 83, -85, -85, -85, -85, -85,
- -85, -85, -85, 84, 190, -85, -85, 99, -85, -85,
- -85, -85, -85, -85, -85, 85, 97, 106, 86, 87,
- -52, -52, 140, -52, -52, -52, -52, 98, 95, -52,
- -52, 99, 114, 115, 116, 117, 96, 148, 149, 150,
- 158, 106, 155, 159, 97, 163, 118, -76, -76, -76,
- -76, -76, -76, -76, -76, 160, 164, -76, -76, 99,
- 13, 14, 15, 16, 17, 18, 19, 20, 91, 106,
- 21, 22, 14, 15, 140, 17, 18, 19, 20, 168,
- 175, 21, 22, 177, 181, 182, 183, 32, 187, 167,
- 188, 169, 170, 171, 185, 189, 53, 51, 32, 176,
- 75, 178, 121, 0, 133, 162, 0, 0, 0, 0,
- 184
+ 138, 11, 92, 141, 107, 142, 97, 173, 2, -77,
+ -77, -77, -77, -77, -77, -77, -77, 93, 55, -77,
+ -77, 99, 57, 94, 166, 59, 65, 66, 174, 172,
+ 67, 106, 63, 175, 61, 68, 140, 64, 180, 151,
+ 71, -33, 97, 8, 9, -33, -33, -33, -33, -33,
+ -33, -33, -33, 98, 161, -33, -33, 99, -33, 100,
+ 101, 102, 103, 104, -33, 105, 72, 106, 73, -5,
+ 12, 52, 107, 13, 14, 15, 16, 17, 18, 19,
+ 20, 65, 66, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 123, 126, 31, 135, -4, 12, 82,
+ 32, 13, 14, 15, 16, 17, 18, 19, 20, 90,
+ 91, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 125, 130, 31, 139, 83, 193, 84, 32, -86,
+ 97, 85, 86, -86, -86, -86, -86, -86, -86, -86,
+ -86, 87, 95, -86, -86, 99, -86, -86, -86, -86,
+ -86, -86, -86, 96, 97, 106, 148, 149, -53, -53,
+ 140, -53, -53, -53, -53, 98, 150, -53, -53, 99,
+ 114, 115, 116, 117, 2, 90, 91, 155, 158, 106,
+ 181, 90, 91, 159, 118, 13, 14, 15, 16, 17,
+ 18, 19, 20, 160, 163, 21, 22, 14, 15, 164,
+ 17, 18, 19, 20, 91, 168, 21, 22, 53, 176,
+ 178, 182, 32, 183, 167, 184, 169, 170, 171, 189,
+ 187, 190, 191, 32, 177, 192, 179, 51, 121, 133,
+ 75, 162, 0, 0, 0, 185, 186
};
#define yypact_value_is_default(yystate) \
@@ -739,35 +751,35 @@ static const yytype_int16 yytable[] =
static const yytype_int16 yycheck[] =
{
1, 67, 68, 10, 93, 94, 76, 3, 76, 14,
- 28, 81, 13, 81, 15, 104, 34, 18, 3, 32,
+ 14, 81, 13, 81, 15, 104, 29, 18, 3, 32,
33, 23, 26, 27, 90, 91, 30, 32, 33, 31,
78, 35, 80, 0, 1, 31, 102, 4, 5, 6,
7, 8, 9, 10, 11, 12, 31, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 78, 26,
- 80, 26, 69, 133, 31, 133, 31, 156, 26, 27,
- 29, 0, 1, 32, 33, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 150, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 0, 26, 164, 100,
- 77, 78, 31, 80, 77, 78, 31, 80, 31, 32,
- 33, 0, 1, 31, 115, 4, 5, 6, 7, 8,
- 9, 10, 11, 26, 27, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 31, 26, 26, 31, 0,
- 1, 26, 31, 4, 5, 6, 7, 8, 9, 10,
- 11, 26, 31, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 1, 1, 26, 31, 32, 33, 31,
- 31, 0, 1, 31, 31, 4, 5, 6, 7, 8,
- 9, 10, 11, 31, 185, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 31, 1, 26, 31, 31,
- 5, 6, 31, 8, 9, 10, 11, 12, 31, 14,
- 15, 16, 17, 18, 19, 20, 31, 31, 31, 25,
- 1, 26, 26, 13, 1, 26, 31, 4, 5, 6,
- 7, 8, 9, 10, 11, 31, 14, 14, 15, 16,
- 4, 5, 6, 7, 8, 9, 10, 11, 33, 26,
- 14, 15, 5, 6, 31, 8, 9, 10, 11, 31,
- 31, 14, 15, 31, 31, 31, 31, 31, 31, 151,
- 31, 153, 154, 155, 34, 31, 7, 6, 31, 161,
- 37, 163, 76, -1, 79, 116, -1, -1, -1, -1,
- 172
+ 80, 0, 69, 133, 31, 133, 1, 156, 31, 4,
+ 5, 6, 7, 8, 9, 10, 11, 28, 31, 14,
+ 15, 16, 31, 34, 150, 26, 26, 27, 26, 155,
+ 30, 26, 26, 31, 31, 35, 31, 26, 164, 100,
+ 31, 0, 1, 26, 27, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 115, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 1, 26, 1, 0,
+ 1, 31, 31, 4, 5, 6, 7, 8, 9, 10,
+ 11, 26, 27, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 77, 78, 26, 80, 0, 1, 31,
+ 31, 4, 5, 6, 7, 8, 9, 10, 11, 32,
+ 33, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 77, 78, 26, 80, 31, 187, 31, 31, 0,
+ 1, 31, 31, 4, 5, 6, 7, 8, 9, 10,
+ 11, 31, 31, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 31, 1, 26, 31, 31, 5, 6,
+ 31, 8, 9, 10, 11, 12, 25, 14, 15, 16,
+ 17, 18, 19, 20, 31, 32, 33, 26, 1, 26,
+ 31, 32, 33, 13, 31, 4, 5, 6, 7, 8,
+ 9, 10, 11, 31, 26, 14, 15, 5, 6, 14,
+ 8, 9, 10, 11, 33, 31, 14, 15, 7, 31,
+ 31, 31, 31, 31, 151, 31, 153, 154, 155, 31,
+ 34, 31, 31, 31, 161, 31, 163, 6, 76, 79,
+ 37, 116, -1, -1, -1, 172, 173
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -791,9 +803,9 @@ static const yytype_uint8 yystos[] =
31, 42, 75, 29, 83, 83, 84, 84, 31, 31,
25, 79, 78, 79, 83, 26, 84, 50, 1, 13,
31, 79, 78, 26, 14, 82, 83, 82, 31, 82,
- 82, 82, 84, 26, 31, 31, 82, 31, 82, 83,
- 31, 31, 31, 31, 82, 34, 51, 31, 31, 31,
- 79
+ 82, 82, 83, 84, 26, 31, 31, 82, 31, 82,
+ 83, 31, 31, 31, 31, 82, 82, 34, 51, 31,
+ 31, 31, 31, 79
};
#define yyerrok (yyerrstatus = 0)
@@ -1331,6 +1343,8 @@ yydestruct (yymsg, yytype, yyvaluep)
{
case 53: /* "choice_entry" */
+/* Line 1391 of yacc.c */
+#line 90 "zconf.y"
{
fprintf(stderr, "%s:%d: missing end statement for this entry\n",
(yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
@@ -1338,9 +1352,13 @@ yydestruct (yymsg, yytype, yyvaluep)
menu_end_menu();
};
+/* Line 1391 of yacc.c */
+#line 1357 "zconf.tab.c"
break;
case 59: /* "if_entry" */
+/* Line 1391 of yacc.c */
+#line 90 "zconf.y"
{
fprintf(stderr, "%s:%d: missing end statement for this entry\n",
(yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
@@ -1348,9 +1366,13 @@ yydestruct (yymsg, yytype, yyvaluep)
menu_end_menu();
};
+/* Line 1391 of yacc.c */
+#line 1371 "zconf.tab.c"
break;
case 65: /* "menu_entry" */
+/* Line 1391 of yacc.c */
+#line 90 "zconf.y"
{
fprintf(stderr, "%s:%d: missing end statement for this entry\n",
(yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
@@ -1358,6 +1380,8 @@ yydestruct (yymsg, yytype, yyvaluep)
menu_end_menu();
};
+/* Line 1391 of yacc.c */
+#line 1385 "zconf.tab.c"
break;
default:
@@ -1659,16 +1683,22 @@ yyreduce:
{
case 10:
+/* Line 1806 of yacc.c */
+#line 112 "zconf.y"
{ zconf_error("unexpected end statement"); }
break;
case 11:
+/* Line 1806 of yacc.c */
+#line 113 "zconf.y"
{ zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); }
break;
case 12:
+/* Line 1806 of yacc.c */
+#line 115 "zconf.y"
{
zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name);
}
@@ -1676,21 +1706,29 @@ yyreduce:
case 13:
+/* Line 1806 of yacc.c */
+#line 118 "zconf.y"
{ zconf_error("invalid statement"); }
break;
case 28:
+/* Line 1806 of yacc.c */
+#line 135 "zconf.y"
{ zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); }
break;
case 29:
+/* Line 1806 of yacc.c */
+#line 136 "zconf.y"
{ zconf_error("invalid option"); }
break;
case 30:
+/* Line 1806 of yacc.c */
+#line 143 "zconf.y"
{
struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
sym->flags |= SYMBOL_OPTIONAL;
@@ -1701,6 +1739,8 @@ yyreduce:
case 31:
+/* Line 1806 of yacc.c */
+#line 151 "zconf.y"
{
menu_end_entry();
printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
@@ -1709,6 +1749,8 @@ yyreduce:
case 32:
+/* Line 1806 of yacc.c */
+#line 157 "zconf.y"
{
struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
sym->flags |= SYMBOL_OPTIONAL;
@@ -1719,6 +1761,8 @@ yyreduce:
case 33:
+/* Line 1806 of yacc.c */
+#line 165 "zconf.y"
{
if (current_entry->prompt)
current_entry->prompt->type = P_MENU;
@@ -1731,6 +1775,8 @@ yyreduce:
case 41:
+/* Line 1806 of yacc.c */
+#line 185 "zconf.y"
{
menu_set_type((yyvsp[(1) - (3)].id)->stype);
printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
@@ -1741,6 +1787,8 @@ yyreduce:
case 42:
+/* Line 1806 of yacc.c */
+#line 193 "zconf.y"
{
menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
@@ -1749,6 +1797,8 @@ yyreduce:
case 43:
+/* Line 1806 of yacc.c */
+#line 199 "zconf.y"
{
menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr));
if ((yyvsp[(1) - (4)].id)->stype != S_UNKNOWN)
@@ -1761,22 +1811,38 @@ yyreduce:
case 44:
+/* Line 1806 of yacc.c */
+#line 209 "zconf.y"
{
- menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
+ menu_add_select(sym_lookup((yyvsp[(2) - (4)].string), 0), NULL, (yyvsp[(3) - (4)].expr));
printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
}
break;
case 45:
+/* Line 1806 of yacc.c */
+#line 215 "zconf.y"
+ {
+ menu_add_select(sym_lookup((yyvsp[(2) - (5)].string), 0), (yyvsp[(3) - (5)].expr), (yyvsp[(4) - (5)].expr));
+ printd(DEBUG_PARSE, "%s:%d:select with value\n", zconf_curname(), zconf_lineno());
+}
+ break;
+
+ case 46:
+
+/* Line 1806 of yacc.c */
+#line 221 "zconf.y"
{
menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr));
printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
}
break;
- case 48:
+ case 49:
+/* Line 1806 of yacc.c */
+#line 232 "zconf.y"
{
const struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
if (id && id->flags & TF_OPTION)
@@ -1787,18 +1853,24 @@ yyreduce:
}
break;
- case 49:
+ case 50:
+/* Line 1806 of yacc.c */
+#line 242 "zconf.y"
{ (yyval.string) = NULL; }
break;
- case 50:
+ case 51:
+/* Line 1806 of yacc.c */
+#line 243 "zconf.y"
{ (yyval.string) = (yyvsp[(2) - (2)].string); }
break;
- case 51:
+ case 52:
+/* Line 1806 of yacc.c */
+#line 249 "zconf.y"
{
struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE);
sym->flags |= SYMBOL_AUTO;
@@ -1808,15 +1880,19 @@ yyreduce:
}
break;
- case 52:
+ case 53:
+/* Line 1806 of yacc.c */
+#line 258 "zconf.y"
{
(yyval.menu) = menu_add_menu();
}
break;
- case 53:
+ case 54:
+/* Line 1806 of yacc.c */
+#line 263 "zconf.y"
{
if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) {
menu_end_menu();
@@ -1825,16 +1901,20 @@ yyreduce:
}
break;
- case 61:
+ case 62:
+/* Line 1806 of yacc.c */
+#line 283 "zconf.y"
{
menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
}
break;
- case 62:
+ case 63:
+/* Line 1806 of yacc.c */
+#line 289 "zconf.y"
{
if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) {
menu_set_type((yyvsp[(1) - (3)].id)->stype);
@@ -1846,16 +1926,20 @@ yyreduce:
}
break;
- case 63:
+ case 64:
+/* Line 1806 of yacc.c */
+#line 300 "zconf.y"
{
current_entry->sym->flags |= SYMBOL_OPTIONAL;
printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
}
break;
- case 64:
+ case 65:
+/* Line 1806 of yacc.c */
+#line 306 "zconf.y"
{
if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) {
menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
@@ -1866,8 +1950,10 @@ yyreduce:
}
break;
- case 67:
+ case 68:
+/* Line 1806 of yacc.c */
+#line 323 "zconf.y"
{
printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
menu_add_entry(NULL);
@@ -1876,8 +1962,10 @@ yyreduce:
}
break;
- case 68:
+ case 69:
+/* Line 1806 of yacc.c */
+#line 331 "zconf.y"
{
if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) {
menu_end_menu();
@@ -1886,15 +1974,19 @@ yyreduce:
}
break;
- case 74:
+ case 75:
+/* Line 1806 of yacc.c */
+#line 351 "zconf.y"
{
menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
}
break;
- case 75:
+ case 76:
+/* Line 1806 of yacc.c */
+#line 358 "zconf.y"
{
menu_add_entry(NULL);
menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
@@ -1902,15 +1994,19 @@ yyreduce:
}
break;
- case 76:
+ case 77:
+/* Line 1806 of yacc.c */
+#line 365 "zconf.y"
{
(yyval.menu) = menu_add_menu();
}
break;
- case 77:
+ case 78:
+/* Line 1806 of yacc.c */
+#line 370 "zconf.y"
{
if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) {
menu_end_menu();
@@ -1919,16 +2015,20 @@ yyreduce:
}
break;
- case 83:
+ case 84:
+/* Line 1806 of yacc.c */
+#line 388 "zconf.y"
{
printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
zconf_nextfile((yyvsp[(2) - (3)].string));
}
break;
- case 84:
+ case 85:
+/* Line 1806 of yacc.c */
+#line 396 "zconf.y"
{
menu_add_entry(NULL);
menu_add_prompt(P_COMMENT, (yyvsp[(2) - (3)].string), NULL);
@@ -1936,127 +2036,171 @@ yyreduce:
}
break;
- case 85:
+ case 86:
+/* Line 1806 of yacc.c */
+#line 403 "zconf.y"
{
menu_end_entry();
}
break;
- case 86:
+ case 87:
+/* Line 1806 of yacc.c */
+#line 410 "zconf.y"
{
printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
zconf_starthelp();
}
break;
- case 87:
+ case 88:
+/* Line 1806 of yacc.c */
+#line 416 "zconf.y"
{
current_entry->help = (yyvsp[(2) - (2)].string);
}
break;
- case 92:
+ case 93:
+/* Line 1806 of yacc.c */
+#line 430 "zconf.y"
{
menu_add_dep((yyvsp[(3) - (4)].expr));
printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
}
break;
- case 96:
+ case 97:
+/* Line 1806 of yacc.c */
+#line 444 "zconf.y"
{
menu_add_visibility((yyvsp[(2) - (2)].expr));
}
break;
- case 98:
+ case 99:
+/* Line 1806 of yacc.c */
+#line 453 "zconf.y"
{
menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr));
}
break;
- case 101:
+ case 102:
+/* Line 1806 of yacc.c */
+#line 461 "zconf.y"
{ (yyval.id) = (yyvsp[(1) - (2)].id); }
break;
- case 102:
+ case 103:
+/* Line 1806 of yacc.c */
+#line 462 "zconf.y"
{ (yyval.id) = (yyvsp[(1) - (2)].id); }
break;
- case 103:
+ case 104:
+/* Line 1806 of yacc.c */
+#line 463 "zconf.y"
{ (yyval.id) = (yyvsp[(1) - (2)].id); }
break;
- case 106:
+ case 107:
+/* Line 1806 of yacc.c */
+#line 471 "zconf.y"
{ (yyval.expr) = NULL; }
break;
- case 107:
+ case 108:
+/* Line 1806 of yacc.c */
+#line 472 "zconf.y"
{ (yyval.expr) = (yyvsp[(2) - (2)].expr); }
break;
- case 108:
+ case 109:
+/* Line 1806 of yacc.c */
+#line 475 "zconf.y"
{ (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); }
break;
- case 109:
+ case 110:
+/* Line 1806 of yacc.c */
+#line 476 "zconf.y"
{ (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); }
break;
- case 110:
+ case 111:
+/* Line 1806 of yacc.c */
+#line 477 "zconf.y"
{ (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); }
break;
- case 111:
+ case 112:
+/* Line 1806 of yacc.c */
+#line 478 "zconf.y"
{ (yyval.expr) = (yyvsp[(2) - (3)].expr); }
break;
- case 112:
+ case 113:
+/* Line 1806 of yacc.c */
+#line 479 "zconf.y"
{ (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); }
break;
- case 113:
+ case 114:
+/* Line 1806 of yacc.c */
+#line 480 "zconf.y"
{ (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
- case 114:
+ case 115:
+/* Line 1806 of yacc.c */
+#line 481 "zconf.y"
{ (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
break;
- case 115:
+ case 116:
+/* Line 1806 of yacc.c */
+#line 484 "zconf.y"
{ (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); }
break;
- case 116:
+ case 117:
+/* Line 1806 of yacc.c */
+#line 485 "zconf.y"
{ (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); }
break;
- case 117:
+ case 118:
+/* Line 1806 of yacc.c */
+#line 488 "zconf.y"
{ (yyval.string) = NULL; }
break;
+/* Line 1806 of yacc.c */
+#line 2204 "zconf.tab.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2286,6 +2430,8 @@ yyreturn:
+/* Line 2067 of yacc.c */
+#line 491 "zconf.y"
void conf_parse(const char *name)
@@ -2457,6 +2603,15 @@ static void print_symbol(FILE *out, struct menu *menu)
case P_SELECT:
fputs( " select ", out);
expr_fprint(prop->expr, out);
+ if (prop->value) {
+ fputs(" (value=", out);
+ expr_fprint(prop->value, out);
+ fputc(')', out);
+ }
+ if (!expr_is_yes(prop->visible.expr)) {
+ fputs(" if ", out);
+ expr_fprint(prop->visible.expr, out);
+ }
fputc('\n', out);
break;
case P_RANGE:
diff --git a/adk/config/zconf.tab.h_shipped b/adk/config/zconf.tab.h_shipped
index 1b17df414..367ea34d4 100644
--- a/adk/config/zconf.tab.h_shipped
+++ b/adk/config/zconf.tab.h_shipped
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +26,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -59,75 +57,48 @@
T_DEFAULT = 275,
T_SELECT = 276,
T_RANGE = 277,
- T_OPTION = 278,
- T_ON = 279,
- T_WORD = 280,
- T_WORD_QUOTE = 281,
- T_UNEQUAL = 282,
- T_CLOSE_PAREN = 283,
- T_OPEN_PAREN = 284,
- T_EOL = 285,
- T_OR = 286,
- T_AND = 287,
- T_EQUAL = 288,
- T_NOT = 289
+ T_VISIBLE = 278,
+ T_OPTION = 279,
+ T_ON = 280,
+ T_WORD = 281,
+ T_WORD_QUOTE = 282,
+ T_UNEQUAL = 283,
+ T_CLOSE_PAREN = 284,
+ T_OPEN_PAREN = 285,
+ T_EOL = 286,
+ T_OR = 287,
+ T_AND = 288,
+ T_EQUAL = 289,
+ T_NOT = 290
};
#endif
-/* Tokens. */
-#define T_MAINMENU 258
-#define T_MENU 259
-#define T_ENDMENU 260
-#define T_SOURCE 261
-#define T_CHOICE 262
-#define T_ENDCHOICE 263
-#define T_COMMENT 264
-#define T_CONFIG 265
-#define T_MENUCONFIG 266
-#define T_HELP 267
-#define T_HELPTEXT 268
-#define T_IF 269
-#define T_ENDIF 270
-#define T_DEPENDS 271
-#define T_OPTIONAL 272
-#define T_PROMPT 273
-#define T_TYPE 274
-#define T_DEFAULT 275
-#define T_SELECT 276
-#define T_RANGE 277
-#define T_OPTION 278
-#define T_ON 279
-#define T_WORD 280
-#define T_WORD_QUOTE 281
-#define T_UNEQUAL 282
-#define T_CLOSE_PAREN 283
-#define T_OPEN_PAREN 284
-#define T_EOL 285
-#define T_OR 286
-#define T_AND 287
-#define T_EQUAL 288
-#define T_NOT 289
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 44 "zconf.y"
{
+
+/* Line 2068 of yacc.c */
+#line 37 "zconf.y"
+
char *string;
struct file *file;
struct symbol *symbol;
struct expr *expr;
struct menu *menu;
- struct kconf_id *id;
-}
-/* Line 1489 of yacc.c. */
-#line 126 "zconf.tab.h"
- YYSTYPE;
+ const struct kconf_id *id;
+
+
+
+/* Line 2068 of yacc.c */
+#line 96 "zconf.tab.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
extern YYSTYPE zconflval;
+
diff --git a/adk/config/zconf.y b/adk/config/zconf.y
index 0f683cfa5..fdc6fdce2 100644
--- a/adk/config/zconf.y
+++ b/adk/config/zconf.y
@@ -207,10 +207,16 @@ config_option: T_DEFAULT expr if_expr T_EOL
config_option: T_SELECT T_WORD if_expr T_EOL
{
- menu_add_symbol(P_SELECT, sym_lookup($2, 0), $3);
+ menu_add_select(sym_lookup($2, 0), NULL, $3);
printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
};
+config_option: T_SELECT T_WORD expr if_expr T_EOL
+{
+ menu_add_select(sym_lookup($2, 0), $3, $4);
+ printd(DEBUG_PARSE, "%s:%d:select with value\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);
@@ -653,6 +659,15 @@ static void print_symbol(FILE *out, struct menu *menu)
case P_SELECT:
fputs( " select ", out);
expr_fprint(prop->expr, out);
+ if (prop->value) {
+ fputs(" (value=", out);
+ expr_fprint(prop->value, out);
+ fputc(')', out);
+ }
+ if (!expr_is_yes(prop->visible.expr)) {
+ fputs(" if ", out);
+ expr_fprint(prop->visible.expr, out);
+ }
fputc('\n', out);
break;
case P_RANGE: