mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 18:23:03 +00:00
* data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
Parenthesize rhs to avoid obscure problems with mistakes like "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all. * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location, b4_rhs_location): Likewise. * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location, b4_rhs_location): Likewise.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
* data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
|
||||||
|
Parenthesize rhs to avoid obscure problems with mistakes like
|
||||||
|
"foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
|
||||||
|
* data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
|
||||||
|
b4_rhs_location): Likewise.
|
||||||
|
* data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
|
||||||
|
b4_rhs_location): Likewise.
|
||||||
|
|
||||||
2004-12-16 Akim Demaille <akim@epita.fr>
|
2004-12-16 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
|
* data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ m4_define([b4_lpure_formals],
|
|||||||
# --------------------
|
# --------------------
|
||||||
# Expansion of $<TYPE>$.
|
# Expansion of $<TYPE>$.
|
||||||
m4_define([b4_lhs_value],
|
m4_define([b4_lhs_value],
|
||||||
[(*yyvalp)[]m4_ifval([$1], [.$1])])
|
[((*yyvalp)[]m4_ifval([$1], [.$1]))])
|
||||||
|
|
||||||
|
|
||||||
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
|
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
|
||||||
@@ -111,7 +111,7 @@ m4_define([b4_lhs_value],
|
|||||||
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
|
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
|
||||||
# symbols on RHS.
|
# symbols on RHS.
|
||||||
m4_define([b4_rhs_value],
|
m4_define([b4_rhs_value],
|
||||||
[((yyGLRStackItem const *)yyvsp)@{YYFILL (m4_eval([$2 - $1]))@}.yystate.yysemantics.yysval[]m4_ifval([$3], [.$3])])
|
[(((yyGLRStackItem const *)yyvsp)@{YYFILL (m4_eval([$2 - $1]))@}.yystate.yysemantics.yysval[]m4_ifval([$3], [.$3]))])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ m4_define([b4_lhs_location],
|
|||||||
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
|
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
|
||||||
# on RHS.
|
# on RHS.
|
||||||
m4_define([b4_rhs_location],
|
m4_define([b4_rhs_location],
|
||||||
[((yyGLRStackItem const *)yyvsp)@{YYFILL (m4_eval([$2 - $1]))@}.yystate.yyloc])
|
[(((yyGLRStackItem const *)yyvsp)@{YYFILL (m4_eval([$2 - $1]))@}.yystate.yyloc)])
|
||||||
|
|
||||||
# We do want M4 expansion after # for CPP macros.
|
# We do want M4 expansion after # for CPP macros.
|
||||||
m4_changecom()
|
m4_changecom()
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ m4_define_default([b4_parser_class_name], [Parser])
|
|||||||
# --------------------
|
# --------------------
|
||||||
# Expansion of $<TYPE>$.
|
# Expansion of $<TYPE>$.
|
||||||
m4_define([b4_lhs_value],
|
m4_define([b4_lhs_value],
|
||||||
[yyval[]m4_ifval([$1], [.$1])])
|
[(yyval[]m4_ifval([$1], [.$1]))])
|
||||||
|
|
||||||
|
|
||||||
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
|
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
|
||||||
@@ -43,7 +43,7 @@ m4_define([b4_lhs_value],
|
|||||||
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
|
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
|
||||||
# symbols on RHS.
|
# symbols on RHS.
|
||||||
m4_define([b4_rhs_value],
|
m4_define([b4_rhs_value],
|
||||||
[yysemantic_stack_@{m4_eval([$1 - $2])@}m4_ifval([$3], [.$3])])
|
[(yysemantic_stack_@{m4_eval([$1 - $2])@}m4_ifval([$3], [.$3]))])
|
||||||
|
|
||||||
m4_define_default([b4_location_type], [Location])
|
m4_define_default([b4_location_type], [Location])
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ m4_define_default([b4_location_type], [Location])
|
|||||||
# -----------------
|
# -----------------
|
||||||
# Expansion of @$.
|
# Expansion of @$.
|
||||||
m4_define([b4_lhs_location],
|
m4_define([b4_lhs_location],
|
||||||
[yyloc])
|
[(yyloc)])
|
||||||
|
|
||||||
|
|
||||||
# b4_rhs_location(RULE-LENGTH, NUM)
|
# b4_rhs_location(RULE-LENGTH, NUM)
|
||||||
@@ -59,7 +59,7 @@ m4_define([b4_lhs_location],
|
|||||||
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
|
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
|
||||||
# on RHS.
|
# on RHS.
|
||||||
m4_define([b4_rhs_location],
|
m4_define([b4_rhs_location],
|
||||||
[yylocation_stack_@{m4_eval([$1 - $2])@}])
|
[(yylocation_stack_@{m4_eval([$1 - $2])@})])
|
||||||
|
|
||||||
|
|
||||||
# b4_parse_param_decl
|
# b4_parse_param_decl
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ m4_define([b4_int_type],
|
|||||||
# --------------------
|
# --------------------
|
||||||
# Expansion of $<TYPE>$.
|
# Expansion of $<TYPE>$.
|
||||||
m4_define([b4_lhs_value],
|
m4_define([b4_lhs_value],
|
||||||
[yyval[]m4_ifval([$1], [.$1])])
|
[(yyval[]m4_ifval([$1], [.$1]))])
|
||||||
|
|
||||||
|
|
||||||
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
|
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
|
||||||
@@ -101,7 +101,7 @@ m4_define([b4_lhs_value],
|
|||||||
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
|
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
|
||||||
# symbols on RHS.
|
# symbols on RHS.
|
||||||
m4_define([b4_rhs_value],
|
m4_define([b4_rhs_value],
|
||||||
[yyvsp@{m4_eval([$2 - $1])@}m4_ifval([$3], [.$3])])
|
[(yyvsp@{m4_eval([$2 - $1])@}m4_ifval([$3], [.$3]))])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ m4_define([b4_rhs_value],
|
|||||||
# -----------------
|
# -----------------
|
||||||
# Expansion of @$.
|
# Expansion of @$.
|
||||||
m4_define([b4_lhs_location],
|
m4_define([b4_lhs_location],
|
||||||
[yyloc])
|
[(yyloc)])
|
||||||
|
|
||||||
|
|
||||||
# b4_rhs_location(RULE-LENGTH, NUM)
|
# b4_rhs_location(RULE-LENGTH, NUM)
|
||||||
@@ -121,7 +121,7 @@ m4_define([b4_lhs_location],
|
|||||||
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
|
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
|
||||||
# on RHS.
|
# on RHS.
|
||||||
m4_define([b4_rhs_location],
|
m4_define([b4_rhs_location],
|
||||||
[yylsp@{m4_eval([$2 - $1])@}])
|
[(yylsp@{m4_eval([$2 - $1])@})])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user