From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Remove la_error
Date: Mon, 18 Jun 2018 18:05:00 -0000 [thread overview]
Message-ID: <08d8a9491c935624ad776b34b70979a5@polymtl.ca> (raw)
In-Reply-To: <20180603222828.19224-1-tom@tromey.com>
On 2018-06-03 18:28, Tom Tromey wrote:
> While working on the parser code, I noticed that yyerror is exported
> from each parser. It is used by this code in parse.c:
>
> TRY
> {
> if (lang->la_parser (&ps))
> lang->la_error (NULL);
> }
>
> However, it seems to me that la_error will never be called here,
> because in every case, la_parser throws an exception on error -- each
> implementation of yyerror just calls error.
>
> So, this patch removes la_error and makes all the yyerror functions
> static. This is handy primarily because it makes it simpler to make
> the expression parsers pure.
>
> Tested by the buildbot.
LGTM, thanks.
Simon
prev parent reply other threads:[~2018-06-18 18:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-03 22:28 Tom Tromey
2018-06-18 14:48 ` Tom Tromey
2018-06-18 18:05 ` Simon Marchi [this message]
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=08d8a9491c935624ad776b34b70979a5@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).