diff options
Diffstat (limited to 'gdb/f-exp.y')
-rw-r--r-- | gdb/f-exp.y | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/f-exp.y b/gdb/f-exp.y index 7cbfd5ac8f2..e11687726ef 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -924,7 +924,9 @@ yylex () char *tokstart; retry: - + + prev_lexptr = lexptr; + tokstart = lexptr; /* First of all, let us make sure we are not dealing with the @@ -1171,5 +1173,8 @@ void yyerror (msg) char *msg; { + if (prev_lexptr) + lexptr = prev_lexptr; + error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); } |