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.9 required=5.0 tests=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 5E560BC69 for ; Mon, 25 Jun 2007 23:26:33 +0200 (CEST) Received: from dm-mail01.mozilla.org (dm-mail01.mozilla.org [63.245.208.150]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5PLQWF0007503 for ; Mon, 25 Jun 2007 23:26:33 +0200 Received: from [172.16.83.128] (c-24-20-33-118.hsd1.mn.comcast.net [24.20.33.118]) (Authenticated sender: tglek@mozilla.com) by dm-mail01.mozilla.org (Postfix) with ESMTP id 8E7686A8134; Mon, 25 Jun 2007 14:26:29 -0700 (PDT) Message-ID: <46803305.1000309@shaw.ca> Date: Mon, 25 Jun 2007 14:26:29 -0700 From: Taras Glek User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: skaller Cc: dypgen@ml.free.fr, caml Subject: Re: [Caml-list] Dypgen C++ grammar References: <1182522980.6334.4.camel@rosella.wigram> In-Reply-To: <1182522980.6334.4.camel@rosella.wigram> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 46803308.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 ocamlyacc:01 lalr:01 elsa:98 elsa:98 liberal:98 parsing:01 wrote:01 compilers:01 caml-list:01 api:01 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/ ). If that doesn't suit your needs, why not point out the problems and maybe work together to solve them? Parsing C++ is hard enough that there isn't a single complete open source C++ parser other than g++. Olmar/elsa represent the second best C++ parser and everybody else isn't even close. Unlike g++, elsa is designed to support more than just compilers (ie has a much nicer API) and has a more liberal license. My understanding is that there are Cil people interested in making elsa work better with OCaml. If the above doesn't suit you, your best bet would be to convert the elsa grammar into OCaml (elkhound already has some ml support), but that will mean redoing a serious amount of type resolution work. Taras skaller wrote: > Is anyone interested in developing a C++ parser, possibly using > FrontC and/or CIL as the starting point, but using Dypgen > as the parser engine? > > I have made some modification to FrontC/Cil to support > some C++ constructions, but Ocamlyacc (LALR1) just can't cope > with C++. > > OTOH, Scott McPeak has a C++ grammar for Elkhound which is > a C++ based GLR engine, with BSD licence, so it may be possible > to adapt that. > >