* 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.
+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.
+
2002-05-02 Elena Zannoni <ezannoni@redhat.com>
* valops.c (value_arg_coerce): Don't coerce arrays to pointers if
char *tokstart;
retry:
-
+
+ prev_lexptr = lexptr;
+
tokstart = lexptr;
/* First of all, let us make sure we are not dealing with the
yyerror (msg)
char *msg;
{
+ if (prev_lexptr)
+ lexptr = prev_lexptr;
+
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
}
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++)
yyerror (msg)
char *msg;
{
+ if (prev_lexptr)
+ lexptr = prev_lexptr;
+
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
}
retry:
+ prev_lexptr = lexptr;
+
tokstart = lexptr;
yyerror (msg)
char *msg;
{
+ if (prev_lexptr)
+ lexptr = prev_lexptr;
+
error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
}