[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
yydestroyGLRState prints unresolved semantic value
From: |
Joel E. Denny |
Subject: |
yydestroyGLRState prints unresolved semantic value |
Date: |
Thu, 5 Jan 2006 18:38:51 -0500 (EST) |
Since this patch touches more than GLR-related code, I thought it would be
best to ask for approval before committing. Is this ok?
Joel
2006-01-05 Joel E. Denny <address@hidden>
* data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
!yyvaluep as signal that no semantic value is available to print.
* data/glr.c (yydestroyGLRState): If state is not resolved, don't try
to print a semantic value.
Index: data/c.m4
===================================================================
RCS file: /sources/bison/bison/data/c.m4,v
retrieving revision 1.50
diff -p -u -r1.50 c.m4
--- data/c.m4 4 Jan 2006 23:42:53 -0000 1.50
+++ data/c.m4 5 Jan 2006 23:30:20 -0000
@@ -464,7 +464,8 @@ m4_define_default([b4_yy_symbol_print_ge
b4_location_if([, [[const YYLTYPE * const yylocationp], [yylocationp]]])[]dnl
m4_ifset([b4_parse_param], [, b4_parse_param]))[
{
- YYUSE (yyvaluep);
+ if (!yyvaluep)
+ return;
]b4_location_if([ YYUSE (yylocationp);
])dnl
b4_parse_param_use[]dnl
Index: data/glr.c
===================================================================
RCS file: /sources/bison/bison/data/glr.c,v
retrieving revision 1.154
diff -p -u -r1.154 glr.c
--- data/glr.c 5 Jan 2006 21:07:54 -0000 1.154
+++ data/glr.c 5 Jan 2006 23:30:20 -0000
@@ -973,7 +973,7 @@ yydestroyGLRState (char const *yymsg, yy
{
YYFPRINTF (stderr, "%s unresolved ", yymsg);
yy_symbol_print (stderr, yystos[yys->yylrState],
- &yys->yysemantics.yysval]b4_location_if([,
&yys->yyloc])[]b4_user_args[);
+ NULL]b4_location_if([, &yys->yyloc])[]b4_user_args[);
YYFPRINTF (stderr, "\n");
}
#endif
- yydestroyGLRState prints unresolved semantic value,
Joel E. Denny <=