cleanup; moved extern's from .c to .h files for double check
[fw/sdcc] / src / SDCC.lex
index 94ca769f380c7838d9a3e052d855d82c82605394..a39f0c4fef4b5030a5967efa26c7dc6c9d93e65b 100644 (file)
@@ -521,3 +521,17 @@ int isTargetKeyword(char *s)
     
     return 0;
 }
+
+extern int fatalError;
+
+int yyerror(char *s)
+{
+   fflush(stdout);
+
+   if (yylineno && filename)
+       fprintf(stdout,"\n%s(%d) %s: token -> '%s' ; column %d\n",
+               filename,yylineno,
+               s,yytext,column);
+   fatalError++;
+   return 0;
+}