Skip to contentSkip to conversation

Checking function signatures with SmPL

Cocci Markus Elfring 2 participants 2 messages Oct 18, 2019

lore
Share & tools
lore
#0 lore raw

Hello,

I have tried another small script out for the semantic patch language. The following variant with two SmPL rules gets accepted by the Coccinelle software.

@display1@
identifier pointing;
type T;
@@
*T* pointing(...);

@display2@
identifier pointing;
type T;
@@
*T* pointing(...)
{ ... }

Unfortunately, a parse error is reported if I merge these search patterns into a SmPL disjunction.
Can such a SmPL rule eventually work, too?

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

#1 lore raw
Quoted 20 lines · Markus Elfring

Hello,

I have tried another small script out for the semantic patch language. The following variant with two SmPL rules gets accepted by the Coccinelle software.

@display1@
identifier pointing;
type T;
@@
*T* pointing(...);

@display2@
identifier pointing;
type T;
@@
*T* pointing(...)
{ ... }

Quoted 3 lines

Unfortunately, a parse error is reported if I merge these search patterns into a SmPL disjunction.
Can such a SmPL rule eventually work, too?

No, nothing is planned for supporting that.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci