* tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
void, not int.
* tests/glr-regression.at (Badly Collapsed GLR States):
Likewise.
(Improper handling of embedded actions and dollar(-N) in GLR parsers):
yylex should return 0 at EOF rather than aborting.
2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
+ Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
+ * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
+ void, not int.
+ * tests/glr-regression.at (Badly Collapsed GLR States):
+ Likewise.
+ (Improper handling of embedded actions and dollar(-N) in GLR parsers):
+ yylex should return 0 at EOF rather than aborting.
+
Improve tests for stack overflow in GLR parser.
Problem reported by twlevo@xs4all.nl.
* data/glr.c (struct yyGLRStack): Remove yyerrflag member.
Improve tests for stack overflow in GLR parser.
Problem reported by twlevo@xs4all.nl.
* data/glr.c (struct yyGLRStack): Remove yyerrflag member.
# define ERROR_PARAMETERS char const *s
#endif
int yylex (LEX_PARAMETERS);
# define ERROR_PARAMETERS char const *s
#endif
int yylex (LEX_PARAMETERS);
- int yyerror (ERROR_PARAMETERS);
+ void yyerror (ERROR_PARAMETERS);
yyerror (ERROR_PARAMETERS)
{
#if YYPURE && YYLSP_NEEDED
yyerror (ERROR_PARAMETERS)
{
#if YYPURE && YYLSP_NEEDED
#define YYSTYPE int
static YYSTYPE exprMerge (YYSTYPE x0, YYSTYPE x1);
int yylex (void);
#define YYSTYPE int
static YYSTYPE exprMerge (YYSTYPE x0, YYSTYPE x1);
int yylex (void);
-int yyerror (char const *msg);
+void yyerror (char const *msg);
yyerror (char const *msg)
{
fprintf (stderr, "%s\n", msg);
yyerror (char const *msg)
{
fprintf (stderr, "%s\n", msg);
break;
}
if (fscanf (yyin, "%49s", buf) != 1)
break;
}
if (fscanf (yyin, "%49s", buf) != 1)
if (sizeof buf - 1 <= strlen (buf))
abort ();
s = (char *) malloc (strlen (buf) + 1);
if (sizeof buf - 1 <= strlen (buf))
abort ();
s = (char *) malloc (strlen (buf) + 1);