[Cocci] trouble matching a struct

Julia Lawall julia.lawall at lip6.fr
Thu Mar 8 21:27:33 CET 2012


On Thu, 8 Mar 2012, ron minnich wrote:

> I have a struct like this:
>
> static const intel_limit_t intel_limits_i8xx_lvds = {
>        .dot = { .min = 25000, .max = 350000 },
>        .vco = { .min = 930000, .max = 1400000 },
>        .n = { .min = 3, .max = 16 },
>        .m = { .min = 96, .max = 140 },
>        .m1 = { .min = 18, .max = 26 },
>        .m2 = { .min = 6, .max = 16 },
>        .p = { .min = 4, .max = 128 },
>        .p1 = { .min = 1, .max = 6 },
> 	.p2 = { .dot_limit = 165000,
> 		.p2_slow = 14, .p2_fast = 7 },
> 	.find_pll = intel_find_best_PLL,
> };
>
> I've tried:
> @@
> identifier d;
> @@
> - intel_limit_t d = {...};

Works for me.  Maybe in your real file there is something just before this 
that throws the parser off?

julia

>
> does not match.
>
> and
> - static const etc.
> and
> - const etc.
>
> I can't get a match which works, any hints?
>
> ron
> _______________________________________________
> Cocci mailing list
> Cocci at diku.dk
> http://lists.diku.dk/mailman/listinfo/cocci
> (Web access from inside DIKUs LAN only)
>


More information about the Cocci mailing list