* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)yyerror.c 5.2 (Berkeley) 5/6/86";
#include "tree_ty.h" /* must be included for yy.h */
* message and then returns
* NIL for the tree if needed.
* The error is flagged on the
* current line which is printed
* if the listing is turned off.
* As is obvious from the fooling around
* with fout below, the Pascal system should
* be changed to use the new library "lS".
yerror(s
, a1
, a2
, a3
, a4
, a5
)
char *a1
, *a2
, *a3
, *a4
, *a5
;
if (errpfx
== 'w' && opt('w') != 0) {
/* no continuations allowed here */
for (i
= 3; i
< yyecol
; i
++)
printf(s
, a1
, a2
, a3
, a4
, a5
);
if (yySerrs
>= MAXSYNERR
) {
yerror("Too many syntax errors - QUIT");
* A bracketing error message
error("End matched %s on line %d", what
, (char *) where
);
yerror("Inserted keyword end matching %s on line %d", what
, (char *) where
);