On Fri, May 27, 2011 at 09:26, Julia Lawall <[email protected]> wrote: > On Fri, 27 May 2011, Francis Galiegue wrote: > >> Hello, >> >> Normally, to (un)match identifiers/expressions against values, you >> have to use regular expressions and the ~= or ~! operators. >> >> However, you can also write: >> >> expression E != NULL; >> >> Whereas the = and != operators are normally meant to (un)match against >> other tokens. >> >> Are there other reserved keywords like this one? > > You can use any identifier (an explicit one, not a metavariable) or a > constant after the !=. NULL is not a reserved keyword for Coccinelle. >
Hmm, and it is only valid with !=, not with =? For instance, I have tried: ---- @@ identifier f = execl; expression E != NULL; @@ f(..., E + , NULL ) ---- That doesn't work. But "f != execl" does. Which means Coccinelle will always try to find a previous reference for the '=' operator but not for '!='? -- Francis Galiegue, [email protected] "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
