Skip to content

Commit 7e7a430

Browse files
committed
yacc: style changes
* data/skeletons/yacc.c: Move call to lac discard to clarify the shifting of the token. Like in lalr1.cc.
1 parent 8631f35 commit 7e7a430

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

data/skeletons/yacc.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,16 +1634,15 @@ yyread_pushed_token:]])[
16341634

16351635
/* Shift the lookahead token. */
16361636
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1637-
1638-
/* Discard the shifted token. */
1639-
yychar = YYEMPTY;]b4_lac_if([[
1640-
YY_LAC_DISCARD ("shift");]])[
1641-
16421637
yystate = yyn;
16431638
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
16441639
*++yyvsp = yylval;
16451640
YY_IGNORE_MAYBE_UNINITIALIZED_END]b4_locations_if([
16461641
*++yylsp = yylloc;])[
1642+
1643+
/* Discard the shifted token. */
1644+
yychar = YYEMPTY;]b4_lac_if([[
1645+
YY_LAC_DISCARD ("shift");]])[
16471646
goto yynewstate;
16481647

16491648

0 commit comments

Comments
 (0)