2002-04-25 Pierre Muller <muller@ics.u-strasbg.fr>

* p-exp.y: Also use new prev_lexptr variable
	to improve error reporting. Based on Michael Snyder
	2002-04-24 dated patch to c-exp.y.
This commit is contained in:
Pierre Muller 2002-04-25 14:51:29 +00:00
parent 6c95717af0
commit 24467a8686
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2002-04-25 Pierre Muller <muller@ics.u-strasbg.fr>
* p-exp.y: Also use new prev_lexptr variable
to improve error reporting. Based on Michael Snyder
2002-04-24 dated patch to c-exp.y.
2002-04-25 Jason Thorpe <thorpej@wasabisystems.com> 2002-04-25 Jason Thorpe <thorpej@wasabisystems.com>
* alpha-tdep.c (alpha_breakpoint_from_pc): New function. * alpha-tdep.c (alpha_breakpoint_from_pc): New function.

View file

@ -947,6 +947,8 @@ yylex ()
retry: retry:
prev_lexptr = lexptr;
tokstart = lexptr; tokstart = lexptr;
explen = strlen (lexptr); explen = strlen (lexptr);
/* See if it is a special token of length 3. */ /* See if it is a special token of length 3. */
@ -1481,5 +1483,8 @@ void
yyerror (msg) yyerror (msg)
char *msg; char *msg;
{ {
if (prev_lexptr)
lexptr = prev_lexptr;
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
} }