public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Remove la_error
Date: Mon, 18 Jun 2018 14:48:00 -0000	[thread overview]
Message-ID: <87a7rsjgmz.fsf@tromey.com> (raw)
In-Reply-To: <20180603222828.19224-1-tom@tromey.com> (Tom Tromey's message of	"Sun, 3 Jun 2018 16:28:28 -0600")

>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> While working on the parser code, I noticed that yyerror is exported
Tom> from each parser.  It is used by this code in parse.c:

Tom>    TRY
Tom>      {
Tom>        if (lang->la_parser (&ps))
Tom>          lang-> la_error (NULL);
Tom>      }

Tom> However, it seems to me that la_error will never be called here,
Tom> because in every case, la_parser throws an exception on error -- each
Tom> implementation of yyerror just calls error.

Tom> So, this patch removes la_error and makes all the yyerror functions
Tom> static.  This is handy primarily because it makes it simpler to make
Tom> the expression parsers pure.

Tom> Tested by the buildbot.

Ping.

Tom

  reply	other threads:[~2018-06-18 14:48 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 [this message]
2018-06-18 18:05 ` Simon Marchi

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=87a7rsjgmz.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /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).