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=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id D3E43BC6B for ; Fri, 22 Jun 2007 19:33:21 +0200 (CEST) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.181]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5MHXKqY018466 for ; Fri, 22 Jun 2007 19:33:21 +0200 Received: by ik-out-1112.google.com with SMTP id c21so891407ika for ; Fri, 22 Jun 2007 10:33:20 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=rQ7uL4widyz0tH2EKvqqaLhFy3VOQvYSMNXkzuvkuSl2G0MhRAMmyK3Vzh4uI28n1K7HIYPt8CNVIOPImjNTUXszWLMDSqh+EZfbNhsQU9L4jcXhVQ5NX/PLk6ei8jzccBvx9SAU/KTgeWSSPVU6ZNodbtEMjq4MHpz6sPNoQ28= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=YOrz3oCxhTDpyKercSCE1E1YlqvD1aFDmRUr7IRLusxaGIKRM5Mb/dQXhy4cNtQxlnKWXSQQOd3TD9sI9IhAldmYXi27NtJZgjfB+tz0i0gW0WOK6Hn5S6f/lx1p/XUEtXeYG4c6YMATJ2/BoYu98RGrAk1Tj6aO3NiNdp8lyfE= Received: by 10.78.56.19 with SMTP id e19mr1687896hua.1182533600101; Fri, 22 Jun 2007 10:33:20 -0700 (PDT) Received: by 10.78.156.10 with HTTP; Fri, 22 Jun 2007 10:33:20 -0700 (PDT) Message-ID: <4a051d930706221033l55f89460k1695c3dc88c3fd12@mail.gmail.com> Date: Fri, 22 Jun 2007 13:33:20 -0400 From: "Christopher L Conway" Sender: christopherleeconway@gmail.com To: skaller Subject: Re: [Caml-list] Dypgen C++ grammar Cc: dypgen@ml.free.fr, caml In-Reply-To: <1182522980.6334.4.camel@rosella.wigram> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1182522980.6334.4.camel@rosella.wigram> X-Google-Sender-Auth: 44438b8238273978 X-Miltered: at discorde with ID 467C07E0.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; parser:01 ocaml:01 variants:01 compiler:01 gcc:01 gcc:01 parser:01 ocamlyacc:01 lalr:01 beginner's:01 ocaml:01 bug:01 sourceforge:01 beginners:01 wrote:01 I would be extremely interested in a C++ parser for OCaml, especially if it was largely compatible with CIL. The conventional wisdom is that this is a lost cause, it's just too much work. E.g., in order to handle real code, you'd need to support almost 30 years' worth of language variants and historical compiler bugs that have become de facto "features", etc. Another approach would be to modify GCC so that it's intermediate representation can be fed to outside tools. As a bonus, this would provide support for Java, Fortran, and all the other languages front-endsd in the GCC suite. Unfortunately, unless the GCC maintainers have changed their position, this would require forking the front end, though I suspect the changes required to implement this are fairly minor. (See, e.g., this old discussion from the GCC list: http://gcc.gnu.org/ml/gcc/2000-10/msg00103.html) Chris On 6/22/07, 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. > > -- > John Skaller > Felix, successor to C++: http://felix.sf.net > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > >