C:/Users/Dennis/src/lang/russell.orig/src/pass1/parser/yyerr.c

Go to the documentation of this file.
00001 # define MAXERRS 30
00002 # include <stdio.h>
00003 extern int yynerrs; /* number of calls to yyerror and yyperror so far */
00004 extern int yyline; /* input line number */
00005 extern int yycolno; /* input column number */
00006 extern unsigned yyinfnm; /* offset of input file name in string table */
00007 
00008 yyerror(msg)
00009 char * msg;
00010 {
00011     /* Ignore yacc generated error messages */
00012     if (yynerrs == 0) {
00013       yynerrs++;
00014     }
00015 }
00016 
00017 yyperror(msg)
00018 char *msg;
00019 {  
00020     yynerrs++;
00021     fprintf(stderr, "%s", msg);
00022     fprintf(stderr, " (file: %s, line: %d, column: %d)\n", getname(yyinfnm),
00023                                                            yyline, yycolno);
00024     if (yynerrs > MAXERRS) {
00025         exit(1);
00026     }
00027 }
00028 
00029 yywarn(msg)
00030 char *msg;
00031 {  
00032     fprintf(stderr, "Warning - %s", msg);
00033     fprintf(stderr, " (file %s, line %d, column %d)\n", getname(yyinfnm),
00034                                                        yyline, yycolno);
00035 }

Generated on Fri Jan 25 10:39:46 2008 for russell by  doxygen 1.5.4