bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

style: reduce scopes in glr.c


From: Akim Demaille
Subject: style: reduce scopes in glr.c
Date: Thu, 20 Jun 2019 07:03:26 +0200

commit c23fa0fc9783e224b78df80121de80f925190e71
Author: Akim Demaille <address@hidden>
Date:   Sat Jun 15 14:55:53 2019 +0200

    style: reduce scopes in glr.c
    
    * data/skeletons/glr.c: here.

diff --git a/data/skeletons/glr.c b/data/skeletons/glr.c
index 5d4121b8..55cf3830 100644
--- a/data/skeletons/glr.c
+++ b/data/skeletons/glr.c
@@ -1385,11 +1385,10 @@ yydoAction (yyGLRStack* yystackp, size_t yyk, yyRuleNum 
yyrule,
     }
   else
     {
-      int yyi;
-      yyGLRState* yys;
       yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1];
-      yys = yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred
-        = yystackp->yytops.yystates[yyk];]b4_locations_if([[
+      yyGLRState* yys = yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred
+        = yystackp->yytops.yystates[yyk];
+      int yyi;]b4_locations_if([[
       if (yynrhs == 0)
         /* Set default location.  */
         yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yys->yyloc;]])[




reply via email to

[Prev in Thread] Current Thread [Next in Thread]