Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Functions preceded by _Pragma
Functions preceded by _Pragma [message #212420] Sat, 22 March 2008 20:08 Go to next message
Eclipse UserFriend
Hello,

I have a problem parsing a c file. I have created a IASTTranslationUnit
using CodeReader. I am not able to get function declarations preceded by
_PRAGMA directive.

Eg : __PRAGMA_COMMENT

sint16 function_name( sint16 param1).

How do I get these functions from the IASTTranslationUnit.

Thanks in advace,
Wishwas.
Re: Functions preceded by _Pragma [message #212603 is a reply to message #212420] Tue, 25 March 2008 11:28 Go to previous messageGo to next message
Eclipse UserFriend
Wishwas wrote:
> Hello,
>
> I have a problem parsing a c file. I have created a IASTTranslationUnit
> using CodeReader. I am not able to get function declarations preceded by
> _PRAGMA directive.
>
> Eg : __PRAGMA_COMMENT
>
> sint16 function_name( sint16 param1).
>
> How do I get these functions from the IASTTranslationUnit.
>
> Thanks in advace,
> Wishwas.
>

The preprocessor/parser isn't recognizing your directive. You either
need to create a new preprocessor/parser that recognizes this construct,
or hack around it by telling CDT's preprocessor that such directives
evaluate to nothing. See GNUScannerExtensionConfiguration for an example.

--
Chris Recoskie
Team Lead, IBM CDT Team
IBM Toronto
http://www.eclipse.org/cdt
Re: Functions preceded by _Pragma [message #213354 is a reply to message #212603] Thu, 03 April 2008 14:25 Go to previous message
Eclipse UserFriend
Hello Chris,

Thanks for the reply. I am pretty new to CDT and was not able to
comprehend your reply completely. I would be glad if you could elaborate
more.
For your reference, The parser code that I have looks something like the
one here : http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg10285.html
Previous Topic:New debugger type: mspgcc gdb debugger
Next Topic:Stray include paths
Goto Forum:
  


Current Time: Sun Jun 08 16:46:26 EDT 2025

Powered by FUDForum. Page generated in 0.02848 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top