]> git.saurik.com Git - bison.git/blobdiff - tests/actions.at
regen
[bison.git] / tests / actions.at
index dd909b00d7496534390b078c5afd739a63094136..1ec8ef9ae408401e4a23ed05bf617c2329bb7f21 100644 (file)
@@ -1257,8 +1257,6 @@ AT_DATA_GRAMMAR([[input.y]],
 %debug
 %code requires
 {
-# include <stdio.h>
-
   typedef struct sem_type
   {
     int ival;
@@ -1267,20 +1265,21 @@ AT_DATA_GRAMMAR([[input.y]],
 
 # define YYSTYPE sem_type
 
-#ifdef __cplusplus
+]AT_SKEL_CC_IF([[
 # include <iostream>
   static void
   report (std::ostream& yyo, int ival, float fval)
   {
     yyo << "ival: " << ival << ", fval: " <<  fval;
   }
-#else
+]], [[
+# include <stdio.h>
   static void
   report (FILE* yyo, int ival, float fval)
   {
     fprintf (yyo, "ival: %d, fval: %1.1f", ival, fval);
   }
-#endif
+]])[
 }
 
 %code
@@ -1307,11 +1306,11 @@ AT_DATA_GRAMMAR([[input.y]],
 }
 ]])[
 
-// %initial-action
-// {
-//   $<ival>$ = 42;
-//   $<fval>$ = 4.2;
-// }
+%initial-action
+{
+  $<ival>$ = 42;
+  $<fval>$ = 4.2;
+}
 
 %%
 float: UNTYPED INT