From: Alessandro Di Federico via <qemu-devel@nongnu.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Alessandro Di Federico <ale.qemu@rev.ng>,
qemu-devel@nongnu.org, tsimpson@quicinc.com, bcain@quicinc.com,
babush@rev.ng, nizzo@rev.ng, philmd@redhat.com
Subject: Re: [PATCH v2 08/10] target/hexagon: import parser for idef-parser
Date: Mon, 1 Mar 2021 15:50:52 +0100 [thread overview]
Message-ID: <20210301155052.2e70eaf1@orange> (raw)
In-Reply-To: <d4290039-5604-62d3-c8b2-f960d5717059@linaro.org>
On Thu, 25 Feb 2021 19:30:14 -0800
Richard Henderson <richard.henderson@linaro.org> wrote:
> > + }
> > +}
> > +code
> > +{
> > + if (c->inst.error_count != 0) {
> > + fprintf(stderr,
> > + "Parsing of instruction %s generated %d errors!\n",
> > + c->inst.name,
> > + c->inst.error_count);
> > + EMIT(c, "assert(false && \"This instruction is not
> > implemented!\");");
>
> What's the point of assert(false) above abort()?
>
> Is there any point in emitting anything at all, since I assume the
> idef-parser program itself will exit with error, stopping the build
> process?
This is a leftover, that string will never be written to disk (`commit`
is not invoked).
> > +| pre ASSIGN rvalue
> > +{
> > + @1.last_column = @3.last_column;
>
> Do you really find any value in this column manipulation, given that
> the input is not the original file, but the output of cpp?
The output of `cpp` is quite readable. We use it a lot for debugging
and it's very helpful.
> IMO this is another reason to *not* preprocess with macros.inc, nor
> sed the output as a workaround for your parsing troubles.
Yes, `sed` is a workaround I really don't like too. But preprocessing
with `cpp` saves us from having to handle a larger, redundant language.
After all, the input language is designed to be expanded through the
preprocessor, although with a different set of macros. I'd keep that
part.
--
Alessandro Di Federico
rev.ng
next prev parent reply other threads:[~2021-03-01 14:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 15:18 [PATCH v2 00/10] target/hexagon: introduce idef-parser Alessandro Di Federico via
2021-02-25 15:18 ` [PATCH v2 01/10] target/hexagon: update MAINTAINERS for idef-parser Alessandro Di Federico via
2021-02-25 20:46 ` Richard Henderson
2021-02-25 15:18 ` [PATCH v2 02/10] target/hexagon: import README " Alessandro Di Federico via
2021-02-25 20:20 ` Richard Henderson
2021-03-01 14:50 ` Alessandro Di Federico via
2021-03-10 15:48 ` Taylor Simpson
2021-03-18 17:26 ` Alessandro Di Federico via
2021-04-05 21:26 ` Taylor Simpson
2021-02-25 15:18 ` [PATCH v2 03/10] target/hexagon: make helper functions non-static Alessandro Di Federico via
2021-02-25 20:47 ` Richard Henderson
2021-02-25 15:18 ` [PATCH v2 04/10] target/hexagon: introduce new helper functions Alessandro Di Federico via
2021-02-25 20:45 ` Richard Henderson
2021-02-25 15:18 ` [PATCH v2 05/10] target/hexagon: expose next PC in DisasContext Alessandro Di Federico via
2021-02-25 20:48 ` Richard Henderson
2021-02-25 15:18 ` [PATCH v2 06/10] target/hexagon: prepare input for the idef-parser Alessandro Di Federico via
2021-02-25 21:34 ` Richard Henderson
2021-03-01 16:26 ` Paolo Montesel via
2021-02-25 15:18 ` [PATCH v2 07/10] target/hexagon: import lexer for idef-parser Alessandro Di Federico via
2021-02-25 22:24 ` Richard Henderson
2021-02-25 15:18 ` [PATCH v2 08/10] target/hexagon: import parser " Alessandro Di Federico via
2021-02-26 3:30 ` Richard Henderson
2021-03-01 14:50 ` Alessandro Di Federico via [this message]
2021-03-23 16:52 ` Paolo Montesel via
2021-02-25 15:18 ` [PATCH v2 09/10] target/hexagon: call idef-parser functions Alessandro Di Federico via
2021-02-26 3:47 ` Richard Henderson
2021-03-01 14:49 ` Alessandro Di Federico via
2021-02-25 15:18 ` [PATCH v2 10/10] target/hexagon: import additional tests Alessandro Di Federico via
2021-02-26 3:52 ` Richard Henderson
2021-02-25 16:03 ` [PATCH v2 00/10] target/hexagon: introduce idef-parser no-reply
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=20210301155052.2e70eaf1@orange \
--to=qemu-devel@nongnu.org \
--cc=ale.qemu@rev.ng \
--cc=ale@rev.ng \
--cc=babush@rev.ng \
--cc=bcain@quicinc.com \
--cc=nizzo@rev.ng \
--cc=philmd@redhat.com \
--cc=richard.henderson@linaro.org \
--cc=tsimpson@quicinc.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 NNTP newsgroup(s).