[GCC-XML] feature request: preprocessor output
Peter Hackett
peter at icmanage.com
Thu Mar 27 13:04:17 EDT 2008
RE: parse it yourself: My experience (with Perl) was that it's
not too bad to get all # stuff and play around with it. (Unlike C++
which is the nightmare that requires gccxml :-)
Francesco Montorsi wrote:
> Brad King ha scritto:
>> Francesco Montorsi wrote:
>>> Is it difficult to add this feature?
>>> Is someone working on it?
>>> Would you accept a patch which adds a new option to gccxml to add in
>>> the
>>> XML output such internal "table"? If so, where should I start to
>>> look to
>>> implement such feature?
>>
>> It is not possible to add this feature. The xml dump is implemented
>> inside a patched GCC parser. All preprocessing is long since over
>> before the parser even sees it. There is no record left of how the code
>> was produced from the preprocessor.
> ach
>
>> The feature is fairly ill-defined anyway. Consider
>>
>> #define DECL(x,y) \
>> void x(const char* whatsup = y);
>> DECL(utility, "something");
>>
>> Until the preprocessor is done this makes no sense.
> yes, but I'd be interested to know that there is a DECL() macro in the
> sources and that it expands to "void x(const char* whatsup = y);".
>
> I know that the code using the #defined macros/values can have no
> sense until preprocessing is done, but I'd be interested in the
> macros/values themselves and not to the code they produce...
>
> Specifically, for what I'm developing I need to know only #defined
> values, not #defined macros. So I guess I'll grep the sources for
> "#define" and then parse the results...
>
> Francesco
>
> _______________________________________________
> gccxml mailing list
> gccxml at gccxml.org
> http://www.gccxml.org/mailman/listinfo/gccxml
More information about the gccxml
mailing list