public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Chris Moller <cmoller@redhat.com>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>,
	Project Archer <archer@sourceware.org>
Subject: Re: Parser rewritting
Date: Thu, 08 Apr 2010 19:21:00 -0000	[thread overview]
Message-ID: <m3d3y9rbrr.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4BB54D69.1000009@redhat.com> (Chris Moller's message of "Thu, 01 Apr 2010 21:50:33 -0400")

Chris> A lot of years ago I wrote a fairly elaborate parser using
Chris> antlr--definitely a cool tool and I recommend you consider it.

One thing to ensure is that the antlr output is GPL-compatible.
If not, we can't use it.

Chris> Just as an example, I've attached a rudimentary antlr grammar that
Chris> parses a subset of C/C++ decls

We only need expressions.

Chris> Anyway, it's probably worth considering.

While I still think it makes the most sense to mimic g++, I am open to
other solutions that are powerful enough.

Another thing worth considering is bison's GLR mode.  This has the
advantage that we wouldn't actually need to rewrite the whole parser, we
could just start by tweaking it.

Using tools that generate code is problematic in GDB, because people
complain about every new dependency.  Even requiring bison will probably
generate complaints, because AFAIK some people still do their builds
with byacc.  Maybe we could check in the generated code, though.

Tom

  reply	other threads:[~2010-04-08 19:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 18:46 Sergio Durigan Junior
2010-03-30 19:05 ` Chris Moller
2010-03-30 21:12   ` Tom Tromey
2010-04-04  8:50     ` Dodji Seketeli
2010-04-08 19:28       ` Tom Tromey
2010-04-10 22:05         ` Jim Blandy
2010-04-10 22:11           ` Jim Blandy
2010-03-30 21:18 ` Tom Tromey
2010-03-30 22:20   ` Keith Seitz
2010-03-30 22:59     ` Tom Tromey
2010-03-31  2:01       ` Matt Rice
2010-04-02  1:50 ` Chris Moller
2010-04-08 19:21   ` Tom Tromey [this message]
2010-04-08 20:21     ` Chris Moller

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=m3d3y9rbrr.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    --cc=cmoller@redhat.com \
    --cc=sergiodj@redhat.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).