> > OK.  I don't know if it will match, though. The matching process may look 
> > at the actual string.
> It just works(TM). Brilliant as it is a very trivial solution.

OK, it seems that the matching process only looks at the struct or union 
tag.

> I know (*), that's why I have shot for the lexer patch as that is the
> time when macro transformation should happen. Using an example like this
> command line switch "-C_define interface=struct" would have probably
> been a better idea but it doesn't shows that I really want to do the
> macro substitution and have that in the resulting diff.

It's a successful solution to the immediate problem, but I don't see how 
it generalizes.

julia

> (*) Disclaimer: I don't know anything about compilers nor do I have a CS
> background, I just follow and use coccinelle for two years now.
> Sometimes my regexp loving alter ego wishes that coccinelle would know
> less C and just do the "trivial" search and replace. And I blissfully
> ignored the fact that the parser doesn't do transformation and the SmPL
> rules don't affect the parser.
> 
> bye
>       michael
> 
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to