From a428a9fa6c9701cf65932fef68eeeccf683ac945 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 12 Oct 2019 11:39:38 +0200 Subject: [PATCH] yacc: style changes * data/skeletons/yacc.c: Move call to lac discard to clarify the shifting of the token. Like in lalr1.cc. --- data/skeletons/yacc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/data/skeletons/yacc.c b/data/skeletons/yacc.c index f4393ffe..dbd069aa 100644 --- a/data/skeletons/yacc.c +++ b/data/skeletons/yacc.c @@ -1634,16 +1634,15 @@ yyread_pushed_token:]])[ /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY;]b4_lac_if([[ - YY_LAC_DISCARD ("shift");]])[ - yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END]b4_locations_if([ *++yylsp = yylloc;])[ + + /* Discard the shifted token. */ + yychar = YYEMPTY;]b4_lac_if([[ + YY_LAC_DISCARD ("shift");]])[ goto yynewstate;