%debug
%code requires
{
-# include <stdio.h>
-
typedef struct sem_type
{
int ival;
# 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
}
]])[
-// %initial-action
-// {
-// $<ival>$ = 42;
-// $<fval>$ = 4.2;
-// }
+%initial-action
+{
+ $<ival>$ = 42;
+ $<fval>$ = 4.2;
+}
%%
float: UNTYPED INT