From: Michael Snyder <msnyder@redhat.com>
To: Pierre Muller <muller@cerbere.u-strasbg.fr>
Cc: Andrew Cagney <ac131313@cygnus.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA]Use prev_lexptr in *-exp.y
Date: Thu, 25 Apr 2002 11:51:00 -0000 [thread overview]
Message-ID: <3CC84D3A.283E0A83@redhat.com> (raw)
In-Reply-To: <4.2.0.58.20020425183926.020b6350@ics.u-strasbg.fr>
Pierre Muller wrote:
>
> At 17:30 25/04/2002 , Andrew Cagney a écrit:
> >>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.
> >
> >Nice. Can I suggest creating bug report so we know that the others should be done.
>
> This is more work than fixing them directly!
ROTFL! You rock, Pierre! <g>
>
> So what about that:
>
> ChangeLog entry:
>
> 2002-04-25 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.
>
> Index: f-exp.y
> ===================================================================
> RCS file: /cvs/src/src/gdb/f-exp.y,v
> retrieving revision 1.5
> diff -u -p -r1.5 f-exp.y
> --- f-exp.y 6 Mar 2001 08:21:07 -0000 1.5
> +++ f-exp.y 25 Apr 2002 16:45:29 -0000
> @@ -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);
> }
> Index: jv-exp.y
> ===================================================================
> RCS file: /cvs/src/src/gdb/jv-exp.y,v
> retrieving revision 1.5
> diff -u -p -r1.5 jv-exp.y
> --- jv-exp.y 21 Feb 2002 02:54:46 -0000 1.5
> +++ jv-exp.y 25 Apr 2002 16:45:29 -0000
> @@ -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);
> }
>
> Index: m2-exp.y
> ===================================================================
> RCS file: /cvs/src/src/gdb/m2-exp.y,v
> retrieving revision 1.3
> diff -u -p -r1.3 m2-exp.y
> --- m2-exp.y 6 Mar 2001 08:21:09 -0000 1.3
> +++ m2-exp.y 25 Apr 2002 16:45:29 -0000
> @@ -821,6 +821,8 @@ yylex ()
>
> retry:
>
> + prev_lexptr = lexptr;
> +
> tokstart = lexptr;
>
>
> @@ -1090,5 +1092,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 prev parent reply other threads:[~2002-04-25 18:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
2002-05-03 6:52 Michael Elizabeth Chastain
2002-05-03 10:43 ` Michael Snyder
2002-05-03 14:59 Michael Elizabeth Chastain
2002-05-03 16:23 ` Michael Snyder
2002-05-07 7:45 ` Petr Sorfa
2002-05-07 8:08 Michael Elizabeth Chastain
2002-05-07 8:59 ` Petr Sorfa
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=3CC84D3A.283E0A83@redhat.com \
--to=msnyder@redhat.com \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=muller@cerbere.u-strasbg.fr \
/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