* [cocci] Wider applications of SmPL conjunctions?
@ 2024-02-15 10:15 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2024-02-15 10:15 UTC (permalink / raw)
To: cocci
Hello,
Special “conjunctions” are supported also by the semantic patch language.
https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/cc7ff34b307724845875be57d5fe9a5fadb36844/docs/manual/cocci_syntax.tex#L1041
I accordingly got some impressions from applications of this software functionality.
Some source code search patterns can be combined then by the SmPL operator “&”.
It seems that an ordering of involved items would be more reasonable
for such a combination than others.
* An identifier can be searched.
It can be determined then also to which expression it would belong.
* A specific compound statement can be searched
(together with included metavariables as needed).
If you would like to avoid the repetition of the same specification
for a subsequent search, it can be a corresponding metavariable defined
based on the type “statement”.
* Would statement lists match the next bigger item in the abstraction hierarchy?
* Will development interests grow for further topics?
Example:
Add a metavariable for the handling of source code
2018-05-23
https://github.com/coccinelle/coccinelle/issues/140
Regards,
Markus
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-15 10:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 10:15 [cocci] Wider applications of SmPL conjunctions? Markus Elfring
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).