]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
genksyms: factor out APP for the ST_NORMAL state
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 5 Feb 2025 17:45:28 +0000 (02:45 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 15 Mar 2025 12:16:21 +0000 (21:16 +0900)
For the ST_NORMAL state, APP is called regardless of the token type.
Factor it out.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/genksyms/lex.l

index 22aeb57649d9ce90dce7634e600d2845d9b6bdb3..f81033af1528ed531638cf72495225104e651fce 100644 (file)
@@ -176,10 +176,10 @@ repeat:
   switch (lexstate)
     {
     case ST_NORMAL:
+      APP;
       switch (token)
        {
        case IDENT:
-         APP;
          {
            int r = is_reserved_word(yytext, yyleng);
            if (r >= 0)
@@ -224,13 +224,11 @@ repeat:
          break;
 
        case '[':
-         APP;
          lexstate = ST_BRACKET;
          count = 1;
          goto repeat;
 
        case '{':
-         APP;
          if (dont_want_brace_phrase)
            break;
          lexstate = ST_BRACE;
@@ -238,12 +236,10 @@ repeat:
          goto repeat;
 
        case '=': case ':':
-         APP;
          lexstate = ST_EXPRESSION;
          break;
 
        default:
-         APP;
          break;
        }
       break;