make syntax errors a little easier to understand

This commit is contained in:
Bill Currie 2003-02-25 07:48:12 +00:00
parent c9fbb334f1
commit 05fb5fe08b
1 changed files with 5 additions and 0 deletions

View File

@ -63,13 +63,18 @@ static __attribute__ ((unused)) const char rcsid[] =
#define YYDEBUG 1 #define YYDEBUG 1
#define YYERROR_VERBOSE 1 #define YYERROR_VERBOSE 1
#undef YYERROR_VERBOSE
extern char *yytext; extern char *yytext;
static void static void
yyerror (const char *s) yyerror (const char *s)
{ {
#ifdef YYERROR_VERBOSE
error (0, "%s %s\n", yytext, s); error (0, "%s %s\n", yytext, s);
#else
error (0, "%s before %s", s, yytext);
#endif
} }
static void static void