From e017a914b2679d669e201cc76f812b641aa7eea3 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 21 Dec 2018 17:33:05 +0900 Subject: [PATCH] kconfig: split the lexer out of zconf.y Compile zconf.lex.c independently of the other files. Signed-off-by: Masahiro Yamada Signed-off-by: Christian Lamparter --- config/lkc.h | 3 +++ config/zconf.l | 1 + config/zconf.y | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/lkc.h b/config/lkc.h index 160a931..531ff7c 100644 --- a/config/lkc.h +++ b/config/lkc.h @@ -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; diff --git a/config/zconf.l b/config/zconf.l index 5e109e8..c52cce8 100644 --- a/config/zconf.l +++ b/config/zconf.l @@ -15,6 +15,7 @@ #include #include "lkc.h" +#include "zconf.tab.h" #define YY_DECL static int yylex1(void) diff --git a/config/zconf.y b/config/zconf.y index a990f46..69409ab 100644 --- a/config/zconf.y +++ b/config/zconf.y @@ -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" -- 2.31.1