diff options
Diffstat (limited to 'scripts/kconfig/zconf.l')
-rw-r--r-- | scripts/kconfig/zconf.l | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 9a147977dc3f..dd08f7a38ccd 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -1,12 +1,13 @@ %option nostdinit noyywrap never-interactive full ecs %option 8bit nodefault yylineno -%x COMMAND HELP STRING PARAM +%x COMMAND HELP STRING PARAM ASSIGN_VAL %{ /* * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> * Released under the terms of the GNU GPL v2.0. */ +#include <assert.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> @@ -111,8 +112,10 @@ n [A-Za-z0-9_-] } alloc_string(yytext, yyleng); yylval.string = text; - return T_WORD; + return T_VARIABLE; } + "=" { BEGIN(ASSIGN_VAL); return T_ASSIGN; } + [[:blank:]]+ . warn_ignored_character(*yytext); \n { BEGIN(INITIAL); @@ -120,6 +123,16 @@ n [A-Za-z0-9_-] } } +<ASSIGN_VAL>{ + [^[:blank:]\n]+.* { + alloc_string(yytext, yyleng); + yylval.string = text; + return T_ASSIGN_VAL; + } + \n { BEGIN(INITIAL); return T_EOL; } + . +} + <PARAM>{ "&&" return T_AND; "||" return T_OR; |