Wed May 11 20:11:51 1994 Stan Shebs (shebs@andros.cygnus.com)

* c-exp.y (yyerror): Display a more informative error message.
	* ch-exp.y (yyerror): Ditto, don't use global yychar.
	* m2-exp.y (yyerror): Ditto.
This commit is contained in:
Stan Shebs 1994-05-12 03:21:48 +00:00
parent 7e16be786a
commit 8db1a92291
4 changed files with 12 additions and 19 deletions

View file

@ -1,3 +1,9 @@
Wed May 11 20:11:51 1994 Stan Shebs (shebs@andros.cygnus.com)
* c-exp.y (yyerror): Display a more informative error message.
* ch-exp.y (yyerror): Ditto, don't use global yychar.
* m2-exp.y (yyerror): Ditto.
Tue May 10 11:57:53 1994 Stan Shebs (shebs@andros.cygnus.com) Tue May 10 11:57:53 1994 Stan Shebs (shebs@andros.cygnus.com)
* inflow.c (job_control): Move definition to front of file. * inflow.c (job_control): Move definition to front of file.

View file

@ -1637,5 +1637,5 @@ void
yyerror (msg) yyerror (msg)
char *msg; char *msg;
{ {
error (msg ? msg : "Invalid syntax in expression."); error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
} }

View file

@ -1989,15 +1989,7 @@ yylex ()
void void
yyerror (msg) yyerror (msg)
char *msg; /* unused */ char *msg;
{ {
printf_unfiltered ("Parsing: %s\n", lexptr); error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
if (yychar < 256)
{
error ("Invalid syntax in expression near character '%c'.", yychar);
}
else
{
error ("Invalid syntax in expression");
}
} }

View file

@ -1152,13 +1152,8 @@ make_qualname(mod,ident)
#endif /* 0 */ #endif /* 0 */
void void
yyerror(msg) yyerror (msg)
char *msg; /* unused */ char *msg;
{ {
printf_unfiltered("Parsing: %s\n",lexptr); error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
if (yychar < 256)
error("Invalid syntax in expression near character '%c'.",yychar);
else
error("Invalid syntax in expression");
} }