-rw-r--r-- | scripts/kconfig/zconf.l | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 1471630..55517b2 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -98,2 +98,3 @@ n [A-Za-z0-9_] "config" BEGIN(PARAM); return T_CONFIG; + "menuconfig" BEGIN(PARAM); return T_MENUCONFIG; "help" BEGIN(PARAM); return T_HELP; @@ -107,4 +108,7 @@ n [A-Za-z0-9_] "tristate" BEGIN(PARAM); return T_TRISTATE; + "def_tristate" BEGIN(PARAM); return T_DEF_TRISTATE; "bool" BEGIN(PARAM); return T_BOOLEAN; "boolean" BEGIN(PARAM); return T_BOOLEAN; + "def_bool" BEGIN(PARAM); return T_DEF_BOOLEAN; + "def_boolean" BEGIN(PARAM); return T_DEF_BOOLEAN; "int" BEGIN(PARAM); return T_INT; @@ -112,2 +116,5 @@ n [A-Za-z0-9_] "string" BEGIN(PARAM); return T_STRING; + "select" BEGIN(PARAM); return T_SELECT; + "enable" BEGIN(PARAM); return T_SELECT; + "range" BEGIN(PARAM); return T_RANGE; {n}+ { @@ -143,2 +150,3 @@ n [A-Za-z0-9_] } + #.* /* comment */ \\\n current_file->lineno++; @@ -154,3 +162,3 @@ n [A-Za-z0-9_] zconflval.string = text; - return T_STRING; + return T_WORD_QUOTE; } @@ -162,3 +170,3 @@ n [A-Za-z0-9_] zconflval.string = text; - return T_STRING; + return T_WORD_QUOTE; } @@ -171,3 +179,3 @@ n [A-Za-z0-9_] zconflval.string = text; - return T_STRING; + return T_WORD_QUOTE; } else @@ -208,5 +216,4 @@ n [A-Za-z0-9_] } - } - \n/[^ \t\n] { + [ \t]*\n/[^ \t\n] { current_file->lineno++; @@ -250,3 +257,3 @@ static void zconf_endhelp(void) zconflval.string = text; - BEGIN(INITIAL); + BEGIN(INITIAL); } @@ -254,3 +261,3 @@ static void zconf_endhelp(void) -/* +/* * Try to open specified file with following names: @@ -347,3 +354,3 @@ int zconf_lineno(void) if (current_buf) - return current_file->lineno; + return current_file->lineno - 1; else |