2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 * Author: Ceriel J.H. Jacobs
8 /* S Y N T A X E R R O R R E P O R T I N G */
10 /* stripped down version from the one in the Modula-2 compiler */
12 /* $Id: LLmessage.c,v 1.3 1994/06/24 12:44:38 ceriel Exp $ */
14 /* Defines the LLmessage routine. LLgen-generated parsers require the
15 existence of a routine of that name.
16 The routine must do syntax-error reporting and must be able to
17 insert tokens in the token stream.
24 extern char *symbol2str();
25 extern struct idf *gen_anon_idf();
31 /* if (tk > 0), it represents the token to be inserted.
33 error("%s missing before %s", symbol2str(tk), symbol2str(dot.tk_symb));
40 /* The operands need some body */
42 dot.TOK_IDF = gen_anon_idf();
47 error("garbage at end of program");
49 else error("%s deleted", symbol2str(dot.tk_symb));