Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH]Use prev_lexptr in p-exp.y
@ 2002-04-25  8:06 Pierre Muller
  2002-04-25  8:30 ` Andrew Cagney
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre Muller @ 2002-04-25  8:06 UTC (permalink / raw)
  To: gdb-patches

This basically just adds the same functionality
than in the c language parser.
See
http://sources.redhat.com/ml/gdb-patches/2002-04/msg00467.html


ChangeLog entry:

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.

Index: p-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/p-exp.y,v
retrieving revision 1.9
diff -u -p -r1.9 p-exp.y
--- p-exp.y     18 Apr 2002 15:22:18 -0000      1.9
+++ p-exp.y     25 Apr 2002 08:38:29 -0000
@@ -947,6 +947,8 @@ yylex ()

   retry:

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



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-05-03 17:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-25  8:06 [PATCH]Use prev_lexptr in p-exp.y Pierre Muller
2002-04-25  8:30 ` Andrew Cagney
2002-04-25  9:49   ` [RFA]Use prev_lexptr in *-exp.y Pierre Muller
2002-04-25 11:51     ` Michael Snyder
2002-05-02  6:33       ` Pierre Muller
2002-05-02 11:02         ` Michael Snyder
2002-05-03  1:38           ` Pierre Muller
2002-05-03 10:41             ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox