From: harsh g. <mer...@li...> - 2011-05-21 11:32:00
|
hi Greg, I dont need to parse the headers, i just need to parse the programs written in c plus plus. My application just requires a parse tree of the c plus plus file. Is it possible to build a wrapper for the parser in openc++? Please share some pointers. Harsh Gupta Date: Sat, 21 May 2011 13:24:50 +0200 Subject: Re: [Opencxx-users] compiling on linux. From: ja...@ac... To: mer...@li... CC: ope...@li... Hi Harsh, OpenC++ maitenance ceased around gcc version 3.x (perhaps 3.3 as Pascal points out). OpenC++ does not handle certain template constructs that are present in the standard headers of the library distributed with gcc beyond that version -- most likely this is where your problem comes from. Going back to earlier gcc seems like the only quick solution. BR Greg On Sat, May 21, 2011 at 12:28 PM, harsh gupta <mer...@li...> wrote: I needed to use the openc++ parser for an application that i was developing. The platform for use is Ubuntu Linux 10.04. Basically what i need is a c++ parser and openc++ seemed to be a worthy candidate. however on running the wrapper example i get the following error, /usr/include/wchar.h:220: parse error before `"wcschr"' /usr/include/stdlib.h:525: parse error before `"at_quick_exit"' /usr/include/c++/4.4/bits/cpp_type_traits.h:99: parse error before `>' /usr/include/c++/4.4/bits/cpp_type_traits.h:104: parse error before `template' /usr/include/c++/4.4/ext/type_traits.h:37: parse error before `__gnu_cxx' /usr/include/c++/4.4/ext/type_traits.h:174: parse error before `+' /usr/include/c++/4.4/ext/type_traits.h:186: parse error before `+' /usr/include/c++/4.4/ext/type_traits.h:199: parse error before `+' /usr/include/c++/4.4/ext/numeric_traits.h:37: parse error before `__gnu_cxx' /usr/include/c++/4.4/ext/numeric_traits.h:63: parse error before `template' occ: too many errors Please suggest what i can do to correct this error. Alternatively if you could suggest some other way of developing a wrapper for openc++, where i could get the parse tree of a cpp file programmatically then it would be a great help. I tried printing out the parse tree using the -s arguement and by supressing preprocessing then it works fine (on the terminal). Harsh Gupta ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Opencxx-users mailing list Ope...@li... https://lists.sourceforge.net/lists/listinfo/opencxx-users |