AT_DATA_GRAMMAR([[input.y]],
[[%skeleton "$1"
-%defines // FIXME: Mandated by lalr1.cc in Bison 2.6.
+%defines // FIXME: Mandated by glr.cc.
%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