home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
prgramer
/
yacc
/
yerror.1c
< prev
next >
Wrap
Text File
|
1989-09-29
|
1KB
|
43 lines
/*
HEADER: CUG nnn.nn;
TITLE: YACC - Yet Another Compilier-Compilier
VERSION: 1.0 for IBM-PC
DATE: JAN 28, 1985
DESCRIPTION: LALR(1) Parser Generator. From UNIX
KEYWORDS: Parser Generator Compilier-Compilier YACC
SYSTEM: IBM-PC and Compatiables
FILENAME: YERROR.1C
WARNINGS: This program is not for the casual user. It will
be useful primarily to expert developers.
CRC: N/A
SEE-ALSO: LEX and PREP
AUTHORS: Scott Guthery 11100 leafwood lane Austin, TX 78750
COMPILERS: DESMET-C
REFERENCES: UNIX Systems Manuals
*/
# include <stdio.h>
# include <stdarg.h>
# include "y1.h"
/*
* 12-Apr-83 (RBD) Add symbolic exit status
*/
/* VARARGS1 */
void error( char *s )
{
va_list a1;
/* write out error comment */
++nerrors;
fprintf( stderr, "\n fatal error: ");
va_start( a1, s );
vfprintf( stderr, s, a1 );
va_end( a1 );
fprintf( stderr, ", line %d\n", lineno );
if( !fatfl ) return;
summary();
exit(EX_ERR);
}