From: Masahiro Yamada Date: Fri, 21 Dec 2018 08:33:05 +0000 (+0900) Subject: kconfig: split the lexer out of zconf.y X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=e017a914b2679d669e201cc76f812b641aa7eea3;p=carl9170fw.git 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 --- 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"