author | kergoth <kergoth> | 2003-06-17 17:03:49 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-06-17 17:03:49 (UTC) |
commit | 16e53b2a2e94742f3b55ee73700bb264e36638d4 (patch) (unidiff) | |
tree | 4f2b65a635d25c1ce0cfeea7953623c2bf7d9534 /scripts/kconfig/zconf.l | |
parent | 384b7f1a42f9f2f101dc8fe11c3625055d96f672 (diff) | |
download | opie-16e53b2a2e94742f3b55ee73700bb264e36638d4.zip opie-16e53b2a2e94742f3b55ee73700bb264e36638d4.tar.gz opie-16e53b2a2e94742f3b55ee73700bb264e36638d4.tar.bz2 |
Update LinuxKernelConf version to 1.4.
-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 | |||
@@ -96,6 +96,7 @@ n [A-Za-z0-9_] | |||
96 | "endchoice" BEGIN(PARAM); return T_ENDCHOICE; | 96 | "endchoice" BEGIN(PARAM); return T_ENDCHOICE; |
97 | "comment" BEGIN(PARAM); return T_COMMENT; | 97 | "comment" BEGIN(PARAM); return T_COMMENT; |
98 | "config" BEGIN(PARAM); return T_CONFIG; | 98 | "config" BEGIN(PARAM); return T_CONFIG; |
99 | "menuconfig" BEGIN(PARAM); return T_MENUCONFIG; | ||
99 | "help" BEGIN(PARAM); return T_HELP; | 100 | "help" BEGIN(PARAM); return T_HELP; |
100 | "if" BEGIN(PARAM); return T_IF; | 101 | "if" BEGIN(PARAM); return T_IF; |
101 | "endif" BEGIN(PARAM); return T_ENDIF; | 102 | "endif" BEGIN(PARAM); return T_ENDIF; |
@@ -105,11 +106,17 @@ n [A-Za-z0-9_] | |||
105 | "default" BEGIN(PARAM); return T_DEFAULT; | 106 | "default" BEGIN(PARAM); return T_DEFAULT; |
106 | "prompt" BEGIN(PARAM); return T_PROMPT; | 107 | "prompt" BEGIN(PARAM); return T_PROMPT; |
107 | "tristate" BEGIN(PARAM); return T_TRISTATE; | 108 | "tristate" BEGIN(PARAM); return T_TRISTATE; |
109 | "def_tristate" BEGIN(PARAM); return T_DEF_TRISTATE; | ||
108 | "bool" BEGIN(PARAM); return T_BOOLEAN; | 110 | "bool" BEGIN(PARAM); return T_BOOLEAN; |
109 | "boolean" BEGIN(PARAM); return T_BOOLEAN; | 111 | "boolean" BEGIN(PARAM); return T_BOOLEAN; |
112 | "def_bool" BEGIN(PARAM); return T_DEF_BOOLEAN; | ||
113 | "def_boolean" BEGIN(PARAM); return T_DEF_BOOLEAN; | ||
110 | "int" BEGIN(PARAM); return T_INT; | 114 | "int" BEGIN(PARAM); return T_INT; |
111 | "hex" BEGIN(PARAM); return T_HEX; | 115 | "hex" BEGIN(PARAM); return T_HEX; |
112 | "string" BEGIN(PARAM); return T_STRING; | 116 | "string" BEGIN(PARAM); return T_STRING; |
117 | "select" BEGIN(PARAM); return T_SELECT; | ||
118 | "enable" BEGIN(PARAM); return T_SELECT; | ||
119 | "range" BEGIN(PARAM); return T_RANGE; | ||
113 | {n}+{ | 120 | {n}+{ |
114 | alloc_string(yytext, yyleng); | 121 | alloc_string(yytext, yyleng); |
115 | zconflval.string = text; | 122 | zconflval.string = text; |
@@ -141,6 +148,7 @@ n [A-Za-z0-9_] | |||
141 | zconflval.string = text; | 148 | zconflval.string = text; |
142 | return T_WORD; | 149 | return T_WORD; |
143 | } | 150 | } |
151 | #.*/* comment */ | ||
144 | \\\ncurrent_file->lineno++; | 152 | \\\ncurrent_file->lineno++; |
145 | . | 153 | . |
146 | <<EOF>> { | 154 | <<EOF>> { |
@@ -152,7 +160,7 @@ n [A-Za-z0-9_] | |||
152 | [^'"\\\n]+/\n{ | 160 | [^'"\\\n]+/\n{ |
153 | append_string(yytext, yyleng); | 161 | append_string(yytext, yyleng); |
154 | zconflval.string = text; | 162 | zconflval.string = text; |
155 | return T_STRING; | 163 | return T_WORD_QUOTE; |
156 | } | 164 | } |
157 | [^'"\\\n]+{ | 165 | [^'"\\\n]+{ |
158 | append_string(yytext, yyleng); | 166 | append_string(yytext, yyleng); |
@@ -160,7 +168,7 @@ n [A-Za-z0-9_] | |||
160 | \\.?/\n{ | 168 | \\.?/\n{ |
161 | append_string(yytext + 1, yyleng - 1); | 169 | append_string(yytext + 1, yyleng - 1); |
162 | zconflval.string = text; | 170 | zconflval.string = text; |
163 | return T_STRING; | 171 | return T_WORD_QUOTE; |
164 | } | 172 | } |
165 | \\.?{ | 173 | \\.?{ |
166 | append_string(yytext + 1, yyleng - 1); | 174 | append_string(yytext + 1, yyleng - 1); |
@@ -169,7 +177,7 @@ n [A-Za-z0-9_] | |||
169 | if (str == yytext[0]) { | 177 | if (str == yytext[0]) { |
170 | BEGIN(PARAM); | 178 | BEGIN(PARAM); |
171 | zconflval.string = text; | 179 | zconflval.string = text; |
172 | return T_STRING; | 180 | return T_WORD_QUOTE; |
173 | } else | 181 | } else |
174 | append_string(yytext, 1); | 182 | append_string(yytext, 1); |
175 | } | 183 | } |
@@ -206,9 +214,8 @@ n [A-Za-z0-9_] | |||
206 | } | 214 | } |
207 | append_string(" ", ts); | 215 | append_string(" ", ts); |
208 | } | 216 | } |
209 | |||
210 | } | 217 | } |
211 | \n/[^ \t\n] { | 218 | [ \t]*\n/[^ \t\n] { |
212 | current_file->lineno++; | 219 | current_file->lineno++; |
213 | zconf_endhelp(); | 220 | zconf_endhelp(); |
214 | return T_HELPTEXT; | 221 | return T_HELPTEXT; |
@@ -248,11 +255,11 @@ void zconf_starthelp(void) | |||
248 | static void zconf_endhelp(void) | 255 | static void zconf_endhelp(void) |
249 | { | 256 | { |
250 | zconflval.string = text; | 257 | zconflval.string = text; |
251 | BEGIN(INITIAL); | 258 | BEGIN(INITIAL); |
252 | } | 259 | } |
253 | 260 | ||
254 | 261 | ||
255 | /* | 262 | /* |
256 | * Try to open specified file with following names: | 263 | * Try to open specified file with following names: |
257 | * ./name | 264 | * ./name |
258 | * $(srctree)/name | 265 | * $(srctree)/name |
@@ -345,7 +352,7 @@ static struct buffer *zconf_endfile(void) | |||
345 | int zconf_lineno(void) | 352 | int zconf_lineno(void) |
346 | { | 353 | { |
347 | if (current_buf) | 354 | if (current_buf) |
348 | return current_file->lineno; | 355 | return current_file->lineno - 1; |
349 | else | 356 | else |
350 | return 0; | 357 | return 0; |
351 | } | 358 | } |