commit 401afe5cc25563174cb568c0546ce9e6707f2a03
Author: Akim Demaille <[email protected]>
Date:   Thu Dec 6 17:50:54 2018 +0100

    parser: fix incorrect condition to raise a syntax error
    
    * src/parse-gram.y (symbol_def): Fix test.

diff --git a/src/parse-gram.c b/src/parse-gram.c
index 6599619f..a120cf53 100644
--- a/src/parse-gram.c
+++ b/src/parse-gram.c
@@ -2571,7 +2571,7 @@ yyreduce:
           else
             symbol_make_alias ((yyvsp[-2].id), (yyvsp[0].yytype_94), 
(yylsp[0]));
         }
-      if (current_class != token_sym && (0 <= (yyvsp[-1].yytype_79) || 
!(yyvsp[0].yytype_94)))
+      if (current_class != token_sym && (0 <= (yyvsp[-1].yytype_79) || 
(yyvsp[0].yytype_94)))
         YYERROR;
     }
 #line 2578 "src/parse-gram.c" /* yacc.c:1649  */
diff --git a/src/parse-gram.y b/src/parse-gram.y
index 246ced74..bfb0f351 100644
--- a/src/parse-gram.y
+++ b/src/parse-gram.y
@@ -522,7 +522,7 @@ symbol_def:
           else
             symbol_make_alias ($id, $alias, @alias);
         }
-      if (current_class != token_sym && (0 <= $num || !$alias))
+      if (current_class != token_sym && (0 <= $num || $alias))
         YYERROR;
     }
 ;


Reply via email to