%%
]AT_YYERROR_DEFINE[
-]AT_YYLEX_DEFINE([a])[
+]AT_YYLEX_DEFINE(["a"])[
int
main (void)
;
%%
-]AT_YYLEX_DEFINE(a)[
+]AT_YYLEX_DEFINE(["a"])[
]AT_YYERROR_DEFINE[
int
main (void)
%%
]AT_YYERROR_DEFINE[
-]AT_YYLEX_DEFINE(a)[
+]AT_YYLEX_DEFINE(["a"])[
int
main (void)
{
%%
]AT_YYERROR_DEFINE[
-]AT_YYLEX_DEFINE()[
+]AT_YYLEX_DEFINE[
int
main (void)
%%
]AT_YYERROR_DEFINE[
-]AT_YYLEX_DEFINE([a])[
+]AT_YYLEX_DEFINE(["a"])[
int
main (void)
%%
]AT_YYERROR_DEFINE[
-]AT_YYLEX_DEFINE()[
+]AT_YYLEX_DEFINE[
int
main (void)
AT_SETUP([Uninitialized location when reporting ambiguity])
-AT_BISON_OPTION_PUSHDEFS
+AT_BISON_OPTION_PUSHDEFS([%glr-parser %locations %define api.pure])
+
AT_DATA_GRAMMAR([glr-regr17.y],
[[
%glr-parser
%union { int dummy; }
%{
- static void yyerror (YYLTYPE *, char const *);
- static int yylex (YYSTYPE *, YYLTYPE *);
+ ]AT_YYERROR_DECLARE[
+ ]AT_YYLEX_DECLARE[
%}
%initial-action {
%%
# include <assert.h>
-static void
-yyerror (YYLTYPE *locp, char const *msg)
-{
- fprintf (stderr, "%d.%d-%d.%d: %s.\n", locp->first_line,
- locp->first_column, locp->last_line, locp->last_column, msg);
-}
-
+]AT_YYERROR_DEFINE[
static int
yylex (YYSTYPE *lvalp, YYLTYPE *llocp)
{
AT_COMPILE([glr-regr17])
AT_PARSER_CHECK([[./glr-regr17]], 0, [],
-[1.1-2.3: syntax is ambiguous.
+[1.1-2.2: syntax is ambiguous
])
AT_CLEANUP
%%
]AT_YYERROR_DEFINE[
-]AT_YYLEX_DEFINE()[
+]AT_YYLEX_DEFINE[
int
main (void)
{
b: 'b';
d: /* nada. */;
%%
-]AT_YYLEX_DEFINE([abc])[
+]AT_YYLEX_DEFINE(["abc"])[
]AT_YYERROR_DEFINE[
int
main (void)