mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
Let symbols have a location.
* src/symtab.h, src/symtab.c (symbol_t): Location is a new member. (getsym): Adjust. Adjust all callers. * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at): Use location_t, not int. * src/symtab.c (symbol_check_defined): Take advantage of the location. * tests/regression.at (Invalid inputs): Adjust.
This commit is contained in:
@@ -1489,7 +1489,7 @@ yyreduce:
|
||||
|
||||
case 64:
|
||||
#line 339 "parse-gram.y"
|
||||
{ yyval.symbol = getsym (yyvsp[0].string); }
|
||||
{ yyval.symbol = getsym (yyvsp[0].string, yylsp[0]); }
|
||||
break;
|
||||
|
||||
case 65:
|
||||
@@ -1500,7 +1500,7 @@ yyreduce:
|
||||
case 66:
|
||||
#line 350 "parse-gram.y"
|
||||
{
|
||||
yyval.symbol = getsym (yyvsp[0].string);
|
||||
yyval.symbol = getsym (yyvsp[0].string, yylsp[0]);
|
||||
symbol_class_set (yyval.symbol, token_sym);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user