/* YACC grammar for Modula-2 expressions, for GDB.
- Copyright (C) 1986, 1989, 1990, 1991 Free Software Foundation, Inc.
+ Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994
+ Free Software Foundation, Inc.
Generated from expread.y (now c-exp.y) and contributed by the Department
of Computer Science at the State University of New York at Buffalo, 1991.
%{
#include "defs.h"
+#include <string.h>
#include "expression.h"
#include "language.h"
#include "value.h"
#endif /* 0 */
void
-yyerror(msg)
- char *msg; /* unused */
+yyerror (msg)
+ char *msg;
{
- printf_unfiltered("Parsing: %s\n",lexptr);
- if (yychar < 256)
- error("Invalid syntax in expression near character '%c'.",yychar);
- else
- error("Invalid syntax in expression");
+ error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
}
-