mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
parser: fix incorrect condition to raise a syntax error
* src/parse-gram.y (symbol_def): Fix test.
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user