Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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?:
http://qt-caml.crapulion.org/trac/browser/trunk/src/gccxml/lib


> 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
>