On 06/29/2011 07:11 PM, Ajay Panyala wrote: > That's not an expression but an identifier. > > Sorry for not being clear. By 'knownPart' I meant > the portion of the expression that is known to me. But isn't the portion you know again an expression? Or multiple expressions with operators between them. You can match that just fine without the need of regexps.
> I will check out the regexps in wiki and the example > from demos. > On Wed, Jun 29, 2011 at 11:59 AM, Michael Stefaniuc > <[email protected]>wrote: > >> Ajay Panyala wrote: >>> Is it also possible to match partial expressions? >>> >>> For example I know only a part of an expression >>> that I want to match. >>> >>> xxx_knownPart_xxx >>> >>> Can a patch be written to match the above example? >> That's not an expression but an identifier. coccinelle supports regexps >> for identifiers, it is in the documentation and on the wiki. >> For other metavariables you'd have to loop them through a python or >> ocaml rule, a python example is on the wiki too afair. >> bye michael _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
