diff options
author | Pierre Muller <muller@ics.u-strasbg.fr> | 2002-05-03 08:23:12 +0000 |
---|---|---|
committer | Pierre Muller <muller@ics.u-strasbg.fr> | 2002-05-03 08:23:12 +0000 |
commit | f71efe0fa5d3293d699aef6bc953326f409f3d60 (patch) | |
tree | 9ca9d7b3c7e34e6c337fcf06096820cb92d18fda /gdb/jv-exp.y | |
parent | fd4695e41be1032ad5fd7bb5576f7e0bd7288ac0 (diff) | |
download | gdb-f71efe0fa5d3293d699aef6bc953326f409f3d60.tar.gz |
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/jv-exp.y')
-rw-r--r-- | gdb/jv-exp.y | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y index 1b80ab45827..495bf3e0537 100644 --- a/gdb/jv-exp.y +++ b/gdb/jv-exp.y @@ -862,6 +862,8 @@ yylex () retry: + prev_lexptr = lexptr; + tokstart = lexptr; /* See if it is a special token of length 3. */ for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++) @@ -1207,6 +1209,9 @@ void yyerror (msg) char *msg; { + if (prev_lexptr) + lexptr = prev_lexptr; + error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); } |