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=0.0 required=5.0 tests=AWL,HTML_MESSAGE autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 88021BBC1 for ; Fri, 7 Mar 2008 15:28:44 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.25,463,1199660400"; d="scan'208,217";a="8122583" Received: from smtpoutm.mac.com ([17.148.16.71]) by mail2-smtp-roc.national.inria.fr with ESMTP; 07 Mar 2008 15:28:43 +0100 Received: from mac.com (asmtp003-s [10.150.69.66]) by smtpoutm.mac.com (Xserve/smtpout008/MantshX 4.0) with ESMTP id m27ESgk4010131 for ; Fri, 7 Mar 2008 06:28:42 -0800 (PST) Received: from [192.168.8.152] (c-24-218-151-219.hsd1.ma.comcast.net [24.218.151.219]) (authenticated bits=0) by mac.com (Xserve/asmtp003/MantshX 4.0) with ESMTP id m27ESS0u018110 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 7 Mar 2008 06:28:29 -0800 (PST) Message-Id: <56AB9891-775F-497C-800D-8798EEDAD7BD@mac.com> From: Gordon Henriksen To: caml-list@yquem.inria.fr In-Reply-To: <4a051d930803070554q43bdfbc9s4887ad5577a17ba1@mail.gmail.com> Content-Type: multipart/alternative; boundary=Apple-Mail-1--1040359546 Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: [Caml-list] Looking for full-fledged C++ Parser with OCAML interface Date: Fri, 7 Mar 2008 09:28:27 -0500 References: <47D0F155.4080909@ropas.snu.ac.kr> <4a051d930803070554q43bdfbc9s4887ad5577a17ba1@mail.gmail.com> X-Mailer: Apple Mail (2.919.2) X-Spam: no; 0.00; full-fledged:01 parser:01 ocaml:01 full-fledged:01 parser:01 ocaml:01 bindings:01 bindings:01 gcc:01 gcc:01 compiler:01 rewriting:01 compiler:01 rewriting:01 authoring:98 --Apple-Mail-1--1040359546 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable On 2008-03-07, at 08:54, Christopher L Conway wrote: > On Fri, Mar 7, 2008 at 2:40 AM, Soonho Kong =20 > wrote: > >> Hello everyone. I'm a graduate student majoring in program =20 >> analysis. I'm looking for a full-fledged C++ parser with OCAML =20 >> interface. Is there a better candidate than Olmar? Please recommend =20= >> one if anyone knows about it. > > Have you looked at LLVM? It does have OCaml bindings, although they =20= > were only partial when last I looked. LLVM's OCaml bindings are aimed at authoring front-ends (i.e., IR =20 generation), and are reasonably complete from that perspective. > I don't know "how fledged" their C++ parser is. The LLVM project includes two C front-ends (separate projects). llvm-gcc is a gcc branch maintained by the LLVM project. It is stable =20= and complete, having successfully been used to compile very a large =20 volume of C, C++ and Objective-C code. Unfortunately, GCC does not =20 have a library-based design, so attaching to its parser would be very =20= difficult. clang is an entirely new compiler under development in the LLVM =20 project. It only yet compiles C. Objective C is also parsed. clang has =20= a library-based design that should make it very attractive for tools =20 building. It is being designed to support such clients as refactoring =20= and IDEs. It supports serializing the AST to disk, source rewriting, =20 and incremental reparsing. Full C++ support has been estimated at 2 =20 years out. So, looking for a C++ parser now for a research project, you probably =20= won't find anything of value from the LLVM project. In the longer =20 term, clang may be significantly interesting, not only because it has =20= a library-based design, but also because it will be used in a first-=20 class capacity (compiler, IDE) by a large vendor (Apple). =97 Gordon --Apple-Mail-1--1040359546 Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable
On 2008-03-07, at = 08:54, Christopher L Conway wrote:

On= Fri, Mar 7, 2008 at 2:40 AM, Soonho Kong <soon@ropas.snu.ac.kr> = wrote:

Hello everyone. I'm a graduate = student majoring in program analysis. I'm = looking for a full-fledged C++ parser with OCAML interface. Is = there a better candidate than Olmar? Please recommend one if anyone = knows about it.

Have you = looked at LLVM? It does have OCaml bindings, although they were = only partial when last I looked.

LLVM's OCaml bindings are = aimed at authoring front-ends (i.e., IR generation), and are reasonably = complete from that perspective.

I = don't know "how fledged" their C++ parser = is.

The LLVM project includes = two C front-ends (separate projects).

  • llvm-gcc is a gcc = branch maintained by the LLVM project. It is stable and complete, having = successfully been used to compile very a large volume of C, C++ and = Objective-C code. Unfortunately, GCC does not have a library-based = design, so attaching to its parser would be very = difficult.
  • clang is an entirely = new compiler under development in the LLVM project. It only yet compiles = C. Objective C is also parsed. clang has a library-based design that = should make it very attractive for tools building. It is being = designed to support such clients as refactoring and IDEs. It = supports serializing the AST to disk, source rewriting, and incremental = reparsing. Full C++ support has been estimated at 2 years = out.

So, looking for a C++ parser now = for a research project, you probably won't find anything of value from = the LLVM project. In the longer term, clang may be significantly = interesting, not only because it has a library-based design, but also = because it will be used in a first-class capacity (compiler, IDE) by a = large vendor (Apple).

=97 Gordon

= --Apple-Mail-1--1040359546--