mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
instead of muscle_insert for %define values so that M4-special characters are replaced with digraphs. * tests/input.at (%define errors): Extend to check weird values.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
|
* src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
|
||||||
|
instead of muscle_insert for %define values so that M4-special
|
||||||
|
characters are replaced with digraphs.
|
||||||
|
* tests/input.at (%define errors): Extend to check weird values.
|
||||||
|
|
||||||
2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
|
2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
Instead of having skeletons declare all valid %define variables and
|
Instead of having skeletons declare all valid %define variables and
|
||||||
|
|||||||
@@ -1910,7 +1910,7 @@ yyreduce:
|
|||||||
strcpy (name + sizeof name_prefix - 1, (yyvsp[(2) - (3)].chars));
|
strcpy (name + sizeof name_prefix - 1, (yyvsp[(2) - (3)].chars));
|
||||||
if (muscle_find_const (name))
|
if (muscle_find_const (name))
|
||||||
warn_at ((yylsp[(2) - (3)]), _("%s `%s' redefined"), "%define variable", (yyvsp[(2) - (3)].chars));
|
warn_at ((yylsp[(2) - (3)]), _("%s `%s' redefined"), "%define variable", (yyvsp[(2) - (3)].chars));
|
||||||
muscle_insert (uniqstr_new (name), (yyvsp[(3) - (3)].chars));
|
MUSCLE_INSERT_STRING (uniqstr_new (name), (yyvsp[(3) - (3)].chars));
|
||||||
free (name);
|
free (name);
|
||||||
muscle_grow_user_name_list ("user_percent_define_variables", (yyvsp[(2) - (3)].chars), (yylsp[(2) - (3)]));
|
muscle_grow_user_name_list ("user_percent_define_variables", (yyvsp[(2) - (3)].chars), (yylsp[(2) - (3)]));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ prologue_declaration:
|
|||||||
strcpy (name + sizeof name_prefix - 1, $2);
|
strcpy (name + sizeof name_prefix - 1, $2);
|
||||||
if (muscle_find_const (name))
|
if (muscle_find_const (name))
|
||||||
warn_at (@2, _("%s `%s' redefined"), "%define variable", $2);
|
warn_at (@2, _("%s `%s' redefined"), "%define variable", $2);
|
||||||
muscle_insert (uniqstr_new (name), $3);
|
MUSCLE_INSERT_STRING (uniqstr_new (name), $3);
|
||||||
free (name);
|
free (name);
|
||||||
muscle_grow_user_name_list ("user_percent_define_variables", $2, @2);
|
muscle_grow_user_name_list ("user_percent_define_variables", $2, @2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -800,6 +800,8 @@ AT_DATA([input.y],
|
|||||||
[[%define "var" "value1"
|
[[%define "var" "value1"
|
||||||
%define "var" "value1"
|
%define "var" "value1"
|
||||||
%define "var" "value2"
|
%define "var" "value2"
|
||||||
|
%define "special1" "@:>@"
|
||||||
|
%define "special2" "@<:@"
|
||||||
%%
|
%%
|
||||||
start: ;
|
start: ;
|
||||||
]])
|
]])
|
||||||
@@ -810,6 +812,8 @@ input.y:3.10-14: warning: %define variable `var' redefined
|
|||||||
input.y:1.9-13: warning: %define variable `var' is not used
|
input.y:1.9-13: warning: %define variable `var' is not used
|
||||||
input.y:2.9-13: warning: %define variable `var' is not used
|
input.y:2.9-13: warning: %define variable `var' is not used
|
||||||
input.y:3.10-14: warning: %define variable `var' is not used
|
input.y:3.10-14: warning: %define variable `var' is not used
|
||||||
|
input.y:4.9-18: warning: %define variable `special1' is not used
|
||||||
|
input.y:5.9-18: warning: %define variable `special2' is not used
|
||||||
]])
|
]])
|
||||||
|
|
||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
|
|||||||
Reference in New Issue
Block a user