On Wed, 7 Jul 2010, Lucas De Marchi wrote:
> On Wed, Jul 7, 2010 at 6:45 PM, Julia Lawall <[email protected]> wrote:
> > The only solution I have is quite hackish... Match a function prototype
> > declaration and put a position variable on the ) and another one on the ;.
> > Use python to find cases where they are not adjacent. Assume that those
> > are the ones that contain the annotation.
>
> It could work if it was possible to match a regexp on the string
> between ")" and ";". This is because in general we use several
> attributes (nonnull, format etc). So just being adjacent means almost
> nothing and would generate a lot of false positives.
>
> Is it possible to "grep" the string between to position variables?
No. There is no access to it at any level.
The only solution would be to write a script at the shell level in python.
You know the file name, the line numbers and the column numbers, so it is
undoubtedly possible to do something.
julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)