Coccinelle archive on lore.kernel.org
 help / Atom feed
* [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 --]

<div dir="ltr"><div dir="ltr">Hello.</div><div dir="ltr"><span style="color:rgb(69,69,69);font-family:&quot;Helvetica Neue&quot;;font-size:12px">I am a student of Kochi University of Technology in Japan.</span><div><span style="color:rgb(69,69,69);font-family:&quot;Helvetica Neue&quot;;font-size:12px">I have asked a question before.</span><span style="color:rgb(69,69,69);font-family:&quot;Helvetica Neue&quot;;font-size:12px"><br></span></div><div><span style="color:rgb(69,69,69);font-family:&quot;Helvetica Neue&quot;;font-size:12px">Thank you for all your help on that occasion.</span></div><div><span style="color:rgb(69,69,69);font-family:&quot;Helvetica Neue&quot;;font-size:12px">This time I have one questions about to create rule.</span></div><div><span style="color:rgb(69,69,69);font-family:&quot;Helvetica Neue&quot;;font-size:12px"><br></span></div><div><font color="#454545" face="Helvetica Neue"><span style="font-size:12px">I would like to apply rule2 only to routes that did not match rule1.</span></font></div><div><font color="#454545" face="Helvetica Neue"><span style="font-size:12px">What should I do?</span></font></div></div></div>

[-- 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, back to index

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

Coccinelle archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/cocci/0 cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ https://lore.kernel.org/cocci \
		cocci@systeme.lip6.fr cocci@archiver.kernel.org
	public-inbox-index cocci


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/fr.lip6.systeme.cocci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox