kconfig: split the lexer out of zconf.y
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 21 Dec 2018 08:33:05 +0000 (17:33 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 21:54:39 +0000 (22:54 +0100)
Compile zconf.lex.c independently of the other files.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/lkc.h
config/zconf.l
config/zconf.y

index 160a9312e11a7dd9ee7d6bfa9f7b167e00aed06e..531ff7c57d92dce95e933fee200e6fc0ed3f13b4 100644 (file)
@@ -90,6 +90,9 @@ void *xrealloc(void *p, size_t size);
 char *xstrdup(const char *s);
 char *xstrndup(const char *s, size_t n);
 
+/* zconf.l */
+int yylex(void);
+
 struct gstr {
        size_t len;
        char  *s;
index 5e109e82693bb2b7453c2e56f3c19ce1ef69c1c5..c52cce8b3751bb4d034e0a68ac13aa46188647aa 100644 (file)
@@ -15,6 +15,7 @@
 #include <unistd.h>
 
 #include "lkc.h"
+#include "zconf.tab.h"
 
 #define YY_DECL                static int yylex1(void)
 
index a990f46f38257702c30311adbca516514c178567..69409abc7dc29c9b4ea1e75fb24d4a89f14f2e65 100644 (file)
@@ -20,7 +20,6 @@
 
 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, ...);
@@ -729,6 +728,5 @@ void zconfdump(FILE *out)
        }
 }
 
-#include "zconf.lex.c"
 #include "util.c"
 #include "menu.c"