Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
[pandora-kernel.git] / scripts / kconfig / zconf.y
index 29c391f..864da07 100644 (file)
@@ -24,16 +24,12 @@ extern int zconflex(void);
 static void zconfprint(const char *err, ...);
 static void zconf_error(const char *err, ...);
 static void zconferror(const char *err);
-static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
+static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
 
 struct symbol *symbol_hash[SYMBOL_HASHSIZE];
 
 static struct menu *current_menu, *current_entry;
 
-#define YYDEBUG 0
-#if YYDEBUG
-#define YYERROR_VERBOSE
-#endif
 %}
 %expect 30
 
@@ -44,7 +40,7 @@ static struct menu *current_menu, *current_entry;
        struct symbol *symbol;
        struct expr *expr;
        struct menu *menu;
-       struct kconf_id *id;
+       const struct kconf_id *id;
 }
 
 %token <id>T_MAINMENU
@@ -228,7 +224,7 @@ symbol_option_list:
          /* empty */
        | symbol_option_list T_WORD symbol_option_arg
 {
-       struct kconf_id *id = kconf_id_lookup($2, strlen($2));
+       const struct kconf_id *id = kconf_id_lookup($2, strlen($2));
        if (id && id->flags & TF_OPTION)
                menu_add_option(id->token, $3);
        else
@@ -502,10 +498,8 @@ void conf_parse(const char *name)
        modules_sym->flags |= SYMBOL_AUTO;
        rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
 
-#if YYDEBUG
        if (getenv("ZCONF_DEBUG"))
                zconfdebug = 1;
-#endif
        zconfparse();
        if (zconfnerrs)
                exit(1);
@@ -544,7 +538,7 @@ static const char *zconf_tokenname(int token)
        return "<token>";
 }
 
-static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
+static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken)
 {
        if (id->token != endtoken) {
                zconf_error("unexpected '%s' within %s block",
@@ -589,9 +583,7 @@ static void zconf_error(const char *err, ...)
 
 static void zconferror(const char *err)
 {
-#if YYDEBUG
        fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
-#endif
 }
 
 static void print_quoted_string(FILE *out, const char *str)
@@ -740,7 +732,7 @@ void zconfdump(FILE *out)
        }
 }
 
-#include "lex.zconf.c"
+#include "zconf.lex.c"
 #include "util.c"
 #include "confdata.c"
 #include "expr.c"