From: Taras Glek <taras.judge@shaw.ca>
To: skaller <skaller@users.sourceforge.net>
Cc: Taras Glek <tglek@shaw.ca>,
dypgen@ml.free.fr, caml <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Dypgen C++ grammar
Date: Tue, 26 Jun 2007 13:11:17 -0700 [thread overview]
Message-ID: <468172E5.3020706@shaw.ca> (raw)
In-Reply-To: <1182839924.13033.93.camel@rosella.wigram>
skaller wrote:
> On Mon, 2007-06-25 at 14:26 -0700, Taras Glek wrote:
>
>> Hi Scott,
>> Why write yet another incomplete C++ parser? You can already get a very
>> nice OCaml representation of a C++ program through olmar(
>> http://www.cs.ru.nl/~tews/olmar/ ).
>>
>
> Because last I looked, olmar doesn't work, and that's
> because Elkhound and Elsa, on which they're based, don't work.
> By that I mean, there are bugs.
>
Right, and you expect to write a C++ parser without bugs that will
compile everybody's weird C++?
If something is complicated and has bugs, it's typically much easier to
fix bugs than to write a competing library.
Elsa has an some interesting design decisions, but it's a well-written
library, I don't expect to see another C++ parser parser of this quality
anytime soon.
>
>> If that doesn't suit your needs, why not point out the problems and
>> maybe work together to solve them?
>>
>
> Elkhound and Elsa are both C++ programs, which creates
> portability issues, and the team maintaining them refused
> to cooperate with my requirements.
>
I don't see why anyone would cooperate with "requirements". I think
between me, the olmar maintainer and the oink maintainers we can reach a
solution that benefits everybody.
> My system Felix consists of an Ocaml based compiler,
> which generates C++ sources.
>
> I actually have a *fork* of Elkhound built in to the
> compile and run time system for generating parsers,
> but this doesn't apply to parsing Felix sources:
> I'm currently switching from Ocamlyacc to Dypgen as a
> parser.
>
> Frankly .. I want an embeddable Ocaml code: binding
> to a C++ built executable is tricky (you'd need to
> use some crud like XML as an interchange format),
> and it isn't extensible.
>
Yes, XML stuff is elsa is a deadead, but the olmar approach is a good one.
> Using Frontc/Cil, which is *also* part of Felix,
> is much better -- I have already embedded part of
> the C parsing capabilities directly into the Felix compiler.
>
There is a big step from C to C++. I think you are underestimating the
difficulty of it. I don't mean to imply that you don't know C++ as even
Stroustroup mentioned you by name in his recent report on C++. I'm just
saying that it's a lot of work.
> The bottom line is that I want code written in Ocaml
> because I'm sooooo sick of portability hassles.. :)
>
>
Wouldn't we all like that :)
Taras
next prev parent reply other threads:[~2007-06-26 20:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-22 14:36 skaller
2007-06-22 17:33 ` [Caml-list] " Christopher L Conway
2007-06-22 19:29 ` David Hall
2007-06-23 10:11 ` Lukasz Dobrek
2007-06-25 21:26 ` Taras Glek
2007-06-26 6:38 ` skaller
2007-06-26 6:45 ` Jon Harrop
2007-06-26 20:11 ` Taras Glek [this message]
2007-06-27 13:48 ` Jon Harrop
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=468172E5.3020706@shaw.ca \
--to=taras.judge@shaw.ca \
--cc=caml-list@yquem.inria.fr \
--cc=dypgen@ml.free.fr \
--cc=skaller@users.sourceforge.net \
--cc=tglek@shaw.ca \
/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).