From: Pierre Muller <muller@cerbere.u-strasbg.fr>
To: gdb-patches@sources.redhat.com
Subject: [PATCH]Use prev_lexptr in p-exp.y
Date: Thu, 25 Apr 2002 08:06:00 -0000 [thread overview]
Message-ID: <4.2.0.58.20020425103344.024be7a8@ics.u-strasbg.fr> (raw)
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
next reply other threads:[~2002-04-25 15:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-25 8:06 Pierre Muller [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4.2.0.58.20020425103344.024be7a8@ics.u-strasbg.fr \
--to=muller@cerbere.u-strasbg.fr \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox