* tests/calc.at: Formatting changes.
+2010-04-13 Akim Demaille <demaille@gostai.com>
+
+ formatting changes.
+ * tests/calc.at: Formatting changes.
+
2010-04-13 Akim Demaille <demaille@gostai.com>
lalr1.cc: remove useless forward declaration.
2010-04-13 Akim Demaille <demaille@gostai.com>
lalr1.cc: remove useless forward declaration.
- AT_LOC.first_column = AT_LOC.last_column;
+ AT_LOC.first_column = AT_LOC.last_column;
AT_LOC.first_line = AT_LOC.last_line;
])[
AT_LOC.first_line = AT_LOC.last_line;
])[
]$4
AT_SKEL_CC_IF(
[%define global_tokens_and_yystype])[
]$4
AT_SKEL_CC_IF(
[%define global_tokens_and_yystype])[
/* Exercise pre-prologue dependency to %union. */
typedef int semantic_value;
}
/* Exercise pre-prologue dependency to %union. */
typedef int semantic_value;
}
#include <stdio.h>
/* The input. */
extern FILE *input;]AT_SKEL_CC_IF([[
#include <stdio.h>
/* The input. */
extern FILE *input;]AT_SKEL_CC_IF([[
#define last_column end.column]])[
}
#define last_column end.column]])[
}
#include <stdlib.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <stdlib.h>
#include <string.h>
#if HAVE_UNISTD_H
std::cerr << AT_LOCATION_IF([l << ": " << ])m << std::endl;
}
std::cerr << AT_LOCATION_IF([l << ": " << ])m << std::endl;
}
+/* A C++ yyparse that simulates the C signature. */
int
yyparse (AT_PARAM_IF([semantic_value *result, int *count]))
{
int
yyparse (AT_PARAM_IF([semantic_value *result, int *count]))
{
return parser.parse ();
}
],
return parser.parse ();
}
],
+[/* A C error reporting function. */
+static void
yyerror (AT_YYERROR_ARG_LOC_IF([YYLTYPE *llocp, ])
AT_PARAM_IF([semantic_value *result, int *count, ])
const char *s)
yyerror (AT_YYERROR_ARG_LOC_IF([YYLTYPE *llocp, ])
AT_PARAM_IF([semantic_value *result, int *count, ])
const char *s)
+/* A C main function. */
int
main (int argc, const char **argv)
{
int
main (int argc, const char **argv)
{