On Sat, 12 Feb 2011, Jesper Louis Andersen wrote:
> On Sat, Feb 12, 2011 at 00:19, Håkon Løvdal <[email protected]> wrote:
> >
> > What I was trying to do was to add some pre-processor
> > macro that eventually could expand to "__attribute__((nothrow))".
> > This is a gcc extention and I understand that it will not fit into
> > coccinelle's C grammar.
> >
>
> I suspected as much. To the best of my knowledge (after staring at the
> menhir parser files for about 10 minutes), there is no way the lexer
> can generate a Tattr which seem to be needed in order to parse the
> __attribute__((X)) stuff in GNU extensions. What is somewhat
> perplexing though is that there *is* a reference to Tattr in
> parser_cocci_menhir.mly and it is looking deceptively like the thing
> we are hunting for here. I am looking at Coccinelle release 0.2.5-rc3
> by the way. Some git searches with a bit of pickaxing doesn't really
> turn any stones over either.
At one point I tried to allow matching on attributes, but for some reason
that I don't remember it turned out to be a complete mess. I guess some
of the support for it got left over. Putting it in + code should be no
problem.
julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)