From 05fb5fe08b8737f697ed68ee4330380f6fa76deb Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 25 Feb 2003 07:48:12 +0000 Subject: [PATCH] make syntax errors a little easier to understand --- tools/qfcc/source/qc-parse.y | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index fe0a34512..4cbc957c0 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -63,13 +63,18 @@ static __attribute__ ((unused)) const char rcsid[] = #define YYDEBUG 1 #define YYERROR_VERBOSE 1 +#undef YYERROR_VERBOSE extern char *yytext; static void yyerror (const char *s) { +#ifdef YYERROR_VERBOSE error (0, "%s %s\n", yytext, s); +#else + error (0, "%s before %s", s, yytext); +#endif } static void