* [Cocci] Questions about coccinelle
@ 2019-01-22 19:47 藤本太希
2019-01-22 19:53 ` Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: 藤本太希 @ 2019-01-22 19:47 UTC (permalink / raw)
To: cocci
[-- Attachment #1.1: Type: text/plain, Size: 285 bytes --]
Hello.
I am a student of Kochi University of Technology in Japan.
I have asked a question before.
Thank you for all your help on that occasion.
This time I have one questions about to create rule.
I would like to apply rule2 only to routes that did not match rule1.
What should I do?
[-- Attachment #1.2: Type: text/html, Size: 1160 bytes --]
[-- Attachment #2: Type: text/plain, Size: 136 bytes --]
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Cocci] Questions about coccinelle
2019-01-22 19:47 [Cocci] Questions about coccinelle 藤本太希
@ 2019-01-22 19:53 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2019-01-22 19:53 UTC (permalink / raw)
To: 藤本太希; +Cc: cocci
[-- Attachment #1: Type: text/plain, Size: 724 bytes --]
On Wed, 23 Jan 2019, 藤本太希 wrote:
> Hello.
> I am a student of Kochi University of Technology in Japan.I have asked a question before.
> Thank you for all your help on that occasion.
> This time I have one questions about to create rule.
>
> I would like to apply rule2 only to routes that did not match rule1.
> What should I do?
I could probably better answer the question if you could send the actual
code.
Perhaps you can put a position variable in rule1, and then declare another
position variable in rule2, and be sure that the position in rule2 is
different than the position in rule1. For example:
@r@
position p;
@@
f@p(0);
@@
position p != r.p;
expression e;
@@
f@p(e); // won't match f(0)
julia
[-- Attachment #2: Type: text/plain, Size: 136 bytes --]
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-22 19:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 19:47 [Cocci] Questions about coccinelle 藤本太希
2019-01-22 19:53 ` Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).