Hello all,
we've tried to create a source-to-source compiler to be used for
code transformation issues, based on the current CDT parser (org.eclipse.cdt.core.dom.ast.gnu.c.GCCLanguage ,
current SVN trunk).
For the AST writer, we started with the ASTWriterVisitor
and modified it step-by-step to print out the full GNU-C language
set.
So far, so good - this worked. But then we found out that the GNU-C
keyword "__attribute__" is parsed, but not stored into the CDT AST.
Hence, we are not able to rewrite __attribute__ to our C output
stream. Reading the source code of the CDT parser "GCCLanguage" ,
class AbstractGNUSourceCodeParser (method: attribute__()), it
becomes clear that this keyword is is consumed, but not processed.
Because we need __attribute__ in our C code, this is a blocker for
us.
Is there someone who knows an extension or an alternative for the
CDT-parser "GCCLanguage" to solve this? Or is it planned to extend
the AST by the keyword "__attribute__" ?
Thank you in advance & best regards
Gerrit.
|