aboutsummaryrefslogtreecommitdiff
path: root/gdb/m2-exp.y
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2002-05-03 08:23:12 +0000
committerPierre Muller <muller@sourceware.org>2002-05-03 08:23:12 +0000
commit065432a84e9b80968838004a1d784708fff3f295 (patch)
treece1a287b5d081f8a67a9f14e33f91cdc52a27eb5 /gdb/m2-exp.y
parentd1a6c2428d38a8a36727df7f693d784854172701 (diff)
downloadgdb-065432a84e9b80968838004a1d784708fff3f295.zip
gdb-065432a84e9b80968838004a1d784708fff3f295.tar.gz
gdb-065432a84e9b80968838004a1d784708fff3f295.tar.bz2
2002-05-03 Pierre Muller <muller@ics.u-strasbg.fr>
* f-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. * jv-exp.y: Likewise. * m2-exp.y: Likewise.
Diffstat (limited to 'gdb/m2-exp.y')
-rw-r--r--gdb/m2-exp.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index eaaad5a..772c6b7 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -821,6 +821,8 @@ yylex ()
retry:
+ prev_lexptr = lexptr;
+
tokstart = lexptr;
@@ -1090,5 +1092,8 @@ void
yyerror (msg)
char *msg;
{
+ if (prev_lexptr)
+ lexptr = prev_lexptr;
+
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
}