mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
argument, an informative message. Call YY_SYMBOL_PRINT. Adjust all callers: integrate the associated YY_SYMBOL_PRINT. * data/lalr1.cc (destruct_): Likewise. In addition, no longer depend on b4_yysymprint_generate and b4_yydestruct_generate to generate these functions, do it "by hand".
This commit is contained in:
@@ -352,6 +352,7 @@ m4_define([b4_yydestruct_generate],
|
||||
|
||||
]$1([yydestruct],
|
||||
[static void],
|
||||
[[const char *yymsg], [yymsg]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE *yyvaluep], [yyvaluep]]b4_location_if([,
|
||||
[[YYLTYPE *yylocationp], [yylocationp]]]))[
|
||||
@@ -360,6 +361,10 @@ m4_define([b4_yydestruct_generate],
|
||||
(void) yyvaluep;
|
||||
]b4_location_if([ (void) yylocationp;
|
||||
])[
|
||||
if (!yymsg)
|
||||
yymsg = "Deleting";
|
||||
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
||||
|
||||
switch (yytype)
|
||||
{
|
||||
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[
|
||||
|
||||
Reference in New Issue
Block a user