Skip to content

Commit e66e13a

Browse files
committed
genksyms: remove dead code for ST_TABLE_*
No one sets lexstate to ST_TABLE_*. It is is very old code, and I do not know what was the plan at that time. Let's remove the dead code. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent ab37d5a commit e66e13a

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

scripts/genksyms/lex.l

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ yylex(void)
119119
static enum {
120120
ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_TYPEOF, ST_TYPEOF_1,
121121
ST_BRACKET, ST_BRACE, ST_EXPRESSION, ST_STATIC_ASSERT,
122-
ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4,
123-
ST_TABLE_5, ST_TABLE_6
124122
} lexstate = ST_NOTSTARTED;
125123
126124
static int suppress_type_lookup, dont_want_brace_phrase;
@@ -427,58 +425,6 @@ repeat:
427425
}
428426
break;
429427
430-
case ST_TABLE_1:
431-
goto repeat;
432-
433-
case ST_TABLE_2:
434-
if (token == IDENT && yyleng == 1 && yytext[0] == 'X')
435-
{
436-
token = EXPORT_SYMBOL_KEYW;
437-
lexstate = ST_TABLE_5;
438-
APP;
439-
break;
440-
}
441-
lexstate = ST_TABLE_6;
442-
/* FALLTHRU */
443-
444-
case ST_TABLE_6:
445-
switch (token)
446-
{
447-
case '{': case '[': case '(':
448-
++count;
449-
break;
450-
case '}': case ']': case ')':
451-
--count;
452-
break;
453-
case ',':
454-
if (count == 0)
455-
lexstate = ST_TABLE_2;
456-
break;
457-
};
458-
goto repeat;
459-
460-
case ST_TABLE_3:
461-
goto repeat;
462-
463-
case ST_TABLE_4:
464-
if (token == ';')
465-
lexstate = ST_NORMAL;
466-
goto repeat;
467-
468-
case ST_TABLE_5:
469-
switch (token)
470-
{
471-
case ',':
472-
token = ';';
473-
lexstate = ST_TABLE_2;
474-
APP;
475-
break;
476-
default:
477-
APP;
478-
break;
479-
}
480-
break;
481-
482428
default:
483429
exit(1);
484430
}

0 commit comments

Comments
 (0)