[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
yacc: style changes
From: |
Akim Demaille |
Subject: |
yacc: style changes |
Date: |
Sun, 13 Oct 2019 16:22:10 +0200 |
commit 7e7a4305486a7aef2bc8c96911b9f8b29f8fc48a
Author: Akim Demaille <address@hidden>
Date: Sat Oct 12 11:39:38 2019 +0200
yacc: style changes
* data/skeletons/yacc.c: Move call to lac discard to clarify the
shifting of the token.
Like in lalr1.cc.
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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- yacc: style changes,
Akim Demaille <=