English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
C++ parser
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-01-17 (19:16)
From: Yoann Padioleau <padator@w...>
Subject: Re: [Caml-list] C++ parser

On Jan 17, 2010, at 8:16 AM, Guillaume Yziquel wrote:

> Kihong Heo a écrit :
>> Dear all.
>> Is there anybody knowing about existing C++ parser that is not so big?
>> I've already know EDG and ELSA.
>> But they are so big and hard to see. I don't want a perfect C++ parser.
>> If it can parse common and simple C++, that's OK.
> The perfect C++ parser: GCC XML.

From the FAQ they say:
"Why are C++ function bodies not dumped in XML?
The original sponsors of the project had no need for function bodies. So far the authors have not had time or funding to implement the support. Contact the mailing list if you are interested in contributing this support or providing funding to have it implemented. "

is it still true ? 

Also do they maintain comments, space, positions, cpp directives ?
If you need to do source-to-source transformation, e.g. refactoring,
you need those things.
> I thing that there is an OCaml binding to it.
is it this one?:

> Otherwise, depending on what you want to do, there is Swig. It parses only C++ declarations.
>> I need your advice.
> For a new project, I'd use GCC XML.
>> Thank you.
>> --
>> Kihong Heo.
> All the best,
> -- 
>     Guillaume Yziquel
> http://yziquel.homelinux.org/
> _______________________________________________
> 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