kconfig: split the lexer out of zconf.y
[carl9170fw.git] / config / zconf.y
index 95f66f71118d18a916104eefca0ce046aaf0b9b5..69409abc7dc29c9b4ea1e75fb24d4a89f14f2e65 100644 (file)
@@ -1,8 +1,8 @@
-%{
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
 /*
  * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
- * Released under the terms of the GNU GPL v2.0.
  */
  */
+%{
 
 #include <ctype.h>
 #include <stdarg.h>
 
 #include <ctype.h>
 #include <stdarg.h>
@@ -20,7 +20,6 @@
 
 int cdebug = PRINTD;
 
 
 int cdebug = PRINTD;
 
-int yylex(void);
 static void yyerror(const char *err);
 static void zconfprint(const char *err, ...);
 static void zconf_error(const char *err, ...);
 static void yyerror(const char *err);
 static void zconfprint(const char *err, ...);
 static void zconf_error(const char *err, ...);
@@ -110,11 +109,6 @@ static struct menu *current_menu, *current_entry;
                menu_end_menu();
 } if_entry menu_entry choice_entry
 
                menu_end_menu();
 } if_entry menu_entry choice_entry
 
-%{
-/* Include kconf_id.c here so it can see the token constants. */
-#include "kconf_id.c"
-%}
-
 %%
 input: mainmenu_stmt stmt_list | stmt_list;
 
 %%
 input: mainmenu_stmt stmt_list | stmt_list;
 
@@ -502,7 +496,6 @@ void conf_parse(const char *name)
        zconf_initscan(name);
 
        _menu_init();
        zconf_initscan(name);
 
        _menu_init();
-       rootmenu.prompt = menu_add_prompt(P_MENU, "CARL9170 Firmware Configuration", NULL);
 
        if (getenv("ZCONF_DEBUG"))
                yydebug = 1;
 
        if (getenv("ZCONF_DEBUG"))
                yydebug = 1;
@@ -735,10 +728,5 @@ void zconfdump(FILE *out)
        }
 }
 
        }
 }
 
-#include "zconf.lex.c"
 #include "util.c"
 #include "util.c"
-#include "confdata.c"
-#include "expr.c"
-#include "symbol.c"
 #include "menu.c"
 #include "menu.c"
-#include "preprocess.c"