public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steven Bosscher <stevenb.gcc@gmail.com>
To: Diego Novillo <dnovillo@google.com>
Cc: Michael Matz <matz@suse.de>,
	Sandeep Soni <soni.sandeepb@gmail.com>,
	GCC LIST <gcc@gcc.gnu.org>
Subject: Re: Design Considerations of GIMPLE Front End
Date: Tue, 18 May 2010 14:18:00 -0000	[thread overview]
Message-ID: <AANLkTilvAyywgvgxr3nnQEeAHUVtSmtW8OaozaJMFxSX@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikfsHaqGc8XYc4_6fzR7yvIPJGX4hHRPB4MtwL5@mail.gmail.com>

On Tue, May 18, 2010 at 4:09 PM, Diego Novillo <dnovillo@google.com> wrote:
> On Tue, May 18, 2010 at 09:59, Michael Matz <matz@suse.de> wrote:
>
>> I don't see how that is much easier to parse compared to
>>  i_1 = k_1 + m_1
>>  j_1 = func (arg1, arg2)
>
> Well, it would make the parser almost trivial to implement.  But you
> have a point, the only structurally complex objects we need to parse
> are type declarations.  Everything else should have very uniform
> syntax.
>
>> The nice thing with tuples is that there's always only one operator, and
>> hence no ambiguity in precedence that needs to be resolved or explicitely
>> encoded via a list structure.
>
> That's true.
>
>> Or is the format also intended to be able to represent GENERIC, i.e.
>> deeply nested structures?
>
> No, just gimple.

IMHO, ideally we would have a syntax that is human readable and human
writable. S-expressions are not as easy to read for me as something
that resembles C.

Related subject: Is it possible to have a formal grammar of some kind
for, say, bison? It would be nice if we can generate different tools
from one grammar, e.g. a GIMPLE front end, a syntax checker, maybe
static analyzers, etc. If you make a reader that already constructs
the gimple data structures, it will be harder to construct multiple
tools on top of it that are independent of libbackend.

Ciao!
Steven

  reply	other threads:[~2010-05-18 14:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-17 20:21 Sandeep Soni
2010-05-17 21:04 ` Andrew Haley
2010-05-18  3:25   ` Sandeep Soni
2010-05-18  8:39     ` Andrew Haley
2010-05-18 13:18 ` Diego Novillo
2010-05-18 14:00   ` Michael Matz
2010-05-18 14:09     ` Diego Novillo
2010-05-18 14:18       ` Steven Bosscher [this message]
2010-05-18 14:46         ` Dave Korn
2010-05-18 14:52           ` Andrew Haley
     [not found]             ` <AANLkTilQWdLDrQypzwqbzTKsUYKyPKMvHMKVClFvZJWH@mail.gmail.com>
2010-05-18 15:04               ` Diego Novillo
2010-05-18 15:24                 ` Sandeep Soni
2010-05-18 14:30     ` Basile Starynkevitch
2010-05-18 14:32       ` Richard Guenther
2010-05-18 14:47       ` Steven Bosscher
2010-06-04  8:24 ` Sebastian Pop

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=AANLkTilvAyywgvgxr3nnQEeAHUVtSmtW8OaozaJMFxSX@mail.gmail.com \
    --to=stevenb.gcc@gmail.com \
    --cc=dnovillo@google.com \
    --cc=gcc@gcc.gnu.org \
    --cc=matz@suse.de \
    --cc=soni.sandeepb@gmail.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).