public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Chris Moller <cmoller@redhat.com>,
	Sergio Durigan Junior <sergiodj@redhat.com>,
	Project Archer <archer@sourceware.org>
Subject: Re: Parser rewritting
Date: Sun, 04 Apr 2010 08:50:00 -0000	[thread overview]
Message-ID: <20100404084952.GK20524@redhat.com> (raw)
In-Reply-To: <m3d3ylv7id.fsf@fleche.redhat.com>

On Tue, Mar 30, 2010 at 03:12:26PM -0600, Tom Tromey wrote:

[...]

> Chris> There are a couple of antlr C++ parsers available:
> Chris> http://hg.netbeans.org/main/file/tip/cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/parser/cppparser.g
> 
> We can't generally reuse code like this due to copyright assignment
> requirements.

Would the copyright assignment requirements prevent us from trying to 
reuse, say, Clang? Maybe one could think about providing a C api on top 
of Clang and consider Clang as an external dependency? If not, then my 
point was to explicitely mention it and make sure we did consider the 
option and ruled it out based on sound reasons.

[...]

> My preferred route is to hand-write a recursive descent parser, 
> mimicing
> the structure of the existing code in g++.
> 
> I think directly sharing code is impractical due to impedance mismatch
> between gdb and g++ internals.  Also our goals are slightly different,
> in that in gdb we only need to parse expressions, we want a single
> parser for C and C++, and finally gdb must implement certain language
> extensions.

I understand that this minimal parser is meant to stay simple, e.g. no
preprocessing support, very minimal error reporting if any at all, no 
semantic analysis etc, but still, if we can't re-use Clang, then would 
it be possible to devise this new "minimal parser" as an independant,
reusable library with its own dejagnu-free testsuite?
Maybe other projects might be interested in using (and extending) 
something like that.

        Dodji

  reply	other threads:[~2010-04-04  8:50 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 [this message]
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
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=20100404084952.GK20524@redhat.com \
    --to=dodji@redhat.com \
    --cc=archer@sourceware.org \
    --cc=cmoller@redhat.com \
    --cc=sergiodj@redhat.com \
    --cc=tromey@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).