mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
diagnostics: improve accuracy for deprecated %define variables
* src/parse-gram.y: Use the location of the whole definition to record the location of a %define variable, instead of just the name of the variable. Adjust tests.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 3.2.90. */
|
||||
/* A Bison parser, made by GNU Bison 3.2.90.11-ccb3-dirty. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "3.2.90"
|
||||
#define YYBISON_VERSION "3.2.90.11-ccb3-dirty"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@@ -2292,7 +2292,7 @@ yyreduce:
|
||||
case 8:
|
||||
#line 293 "src/parse-gram.y" /* yacc.c:1649 */
|
||||
{
|
||||
muscle_percent_define_insert ((yyvsp[-1].variable), (yylsp[-1]), (yyvsp[0].value).kind, (yyvsp[0].value).chars,
|
||||
muscle_percent_define_insert ((yyvsp[-1].variable), (yyloc), (yyvsp[0].value).kind, (yyvsp[0].value).chars,
|
||||
MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE);
|
||||
}
|
||||
#line 2299 "src/parse-gram.c" /* yacc.c:1649 */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 3.2.90. */
|
||||
/* A Bison parser, made by GNU Bison 3.2.90.11-ccb3-dirty. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ prologue_declaration:
|
||||
}
|
||||
| "%define" variable value
|
||||
{
|
||||
muscle_percent_define_insert ($2, @2, $3.kind, $3.chars,
|
||||
muscle_percent_define_insert ($2, @$, $3.kind, $3.chars,
|
||||
MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE);
|
||||
}
|
||||
| "%defines" { defines_flag = true; }
|
||||
|
||||
Reference in New Issue
Block a user