]> git.saurik.com Git - bison.git/commitdiff
* data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
authorJoel E. Denny <jdenny@ces.clemson.edu>
Fri, 6 Jan 2006 20:09:31 +0000 (20:09 +0000)
committerJoel E. Denny <jdenny@ces.clemson.edu>
Fri, 6 Jan 2006 20:09:31 +0000 (20:09 +0000)
!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.

ChangeLog
data/c.m4
data/glr.c

index 6617ca089f26bfbce03c0190818b4db792ea4097..dfdb35291ee88e547bcfa3b98fef4e4e145f8323 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-01-06  Joel E. Denny  <jdenny@ces.clemson.edu>
+
+       * 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.
+
 2006-01-06  Joel E. Denny  <jdenny@ces.clemson.edu>
 
        * tests/glr-regression.at: For consistency with my newer test cases,
 2006-01-06  Joel E. Denny  <jdenny@ces.clemson.edu>
 
        * tests/glr-regression.at: For consistency with my newer test cases,
index c494255596bd903e448df631a3834f1555981474..630fdebd118aba45b158e9a2b265da7f01963cc3 100644 (file)
--- a/data/c.m4
+++ b/data/c.m4
@@ -464,7 +464,8 @@ m4_define_default([b4_yy_symbol_print_generate],
 b4_location_if([, [[const YYLTYPE * const yylocationp], [yylocationp]]])[]dnl
 m4_ifset([b4_parse_param], [, b4_parse_param]))[
 {
 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
 ]b4_location_if([  YYUSE (yylocationp);
 ])dnl
 b4_parse_param_use[]dnl
index 975ec578cbe53a3094693cefdb2c3f4e22bc1f29..e488f7c9605e633d61e8edf243ee497c11281b9d 100644 (file)
@@ -973,7 +973,7 @@ yydestroyGLRState (char const *yymsg, yyGLRState *yys]b4_user_formals[)
        {
          YYFPRINTF (stderr, "%s unresolved ", yymsg);
          yy_symbol_print (stderr, yystos[yys->yylrState],
        {
          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
          YYFPRINTF (stderr, "\n");
        }
 #endif