#define MUST1BEBOOL(e) int exp1=e.expr_index;tstbool(e)
#define MUST2BEBOOL(e1,e2) int exp1=e1.expr_index,exp2=e2.expr_index;tstbool(e1);tstbool(e2)
-extern ident_p ilookup();
-extern list2 lookstruct();
-extern string scopy();
-extern unsigned hash();
+ident_p ilookup(string name, int enterf);
+list2 lookstruct(list2 ll);
+string scopy(string s);
+unsigned hash(string name);
+int argtyp(int mn);
+int findstructel(int number, string name, int *t);
+int eqregclass(int r1, int r2);
+void inbetween();
+int strlookup(string s);
+void tabovf(string tablename);
+int max(int a, int b);
+int structsize(list2 s);
+void setfields(token_p tp, string format);
+void tstint(expr_t e);
+void outbyte(int n);
+void out(int n);
+void patbyte(int n);
+void patshort(int n);
+void pat(int n);
+int mlookup(char *name);
+ident_p ilookup(string name, int enterf);
+int exprlookup(set_t sett);
+void tstbool(expr_t e);
+int stringno(string s);
+int lookup(int comm, int operator, int lnode, int rnode);
+void chkregexp(int number);
+int commontype(expr_t e1, expr_t e2);
+int instno(inst_t inst);
+
+void yyerror(char *, ...);
+int yyparse(void);
+int yylex(void);
\ No newline at end of file
%{
-
-#ifndef NORCSID
-static char rcsid2[]="$Id$";
-#endif
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
#define MAXBACKUP 50
#include <stdio.h>
+#include <stdarg.h>
#include <assert.h>
#include <em_spec.h>
#include <em_flag.h>
#include "booth.h"
#include "y.tab.h"
-void yyerror(string s);
-
int lineno = 1;
extern char *iname;
-extern char *scopy();
%}
%p 2000
. return(yytext[0]);
%%
-void yyerror(string s)
+void yyerror(string s, ...)
{
+ va_list va;
+ va_start(va, s);
fprintf(stderr,"\"%s\", line %d:",iname ? iname : "",lineno);
+ vfprintf(stderr, s, va);
+ va_end(va);
fprintf(stderr,"\n");
nerrors++;
}