From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 9C29DBC69 for ; Tue, 26 Jun 2007 22:12:34 +0200 (CEST) Received: from pd2mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5QKCXZ5025737 for ; Tue, 26 Jun 2007 22:12:34 +0200 Received: from pd3mr4so.prod.shaw.ca (pd3mr4so-qfe3.prod.shaw.ca [10.0.141.180]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JK90027TESEA480@l-daemon> for caml-list@yquem.inria.fr; Tue, 26 Jun 2007 14:12:14 -0600 (MDT) Received: from pn2ml7so.prod.shaw.ca ([10.0.121.151]) by pd3mr4so.prod.shaw.ca (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JK9008UTES6V450@pd3mr4so.prod.shaw.ca> for caml-list@yquem.inria.fr; Tue, 26 Jun 2007 14:12:07 -0600 (MDT) Received: from glek.net ([24.108.194.183]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JK9000C5EQVYSL1@l-daemon> for caml-list@yquem.inria.fr; Tue, 26 Jun 2007 14:11:19 -0600 (MDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by glek.net (Postfix) with ESMTP id A59C947BEE; Tue, 26 Jun 2007 13:10:30 -0700 (PDT) Date: Tue, 26 Jun 2007 13:11:17 -0700 From: Taras Glek Subject: Re: [Caml-list] Dypgen C++ grammar In-reply-to: <1182839924.13033.93.camel@rosella.wigram> To: skaller Cc: Taras Glek , dypgen@ml.free.fr, caml Message-id: <468172E5.3020706@shaw.ca> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: <1182522980.6334.4.camel@rosella.wigram> <46803305.1000309@shaw.ca> <1182839924.13033.93.camel@rosella.wigram> User-Agent: Thunderbird 2.0.0.0 (X11/20070326) X-Miltered: at concorde with ID 46817331.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; parser:01 ocaml:01 tews:01 parser:01 ocaml:01 compiler:01 parsers:01 ocamlyacc:01 compiler:01 elsa:98 elsa:98 interchange:98 parsing:01 parsing:01 wrote:01 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