From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>, cocci@inria.fr
Subject: Re: [cocci] Searching for selected identifiers in code parts (with SmPL)?
Date: Sun, 3 Nov 2024 08:21:21 +0100 [thread overview]
Message-ID: <dc91ad35-d571-4d0d-b0a6-1c3fe468b9f8@web.de> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2411021921580.15958@hadrien>
>> Can the following SmPL script variant become similarly usable to find
>> remaining update candidates?
>>
>>
>> @display@
>> identifier i;
>> @@
>> while (
>> * --i > 0
>> )
>> <+... i ...+>;
>
> Use (<+... i ...+>);.
Thanks for this adjustment idea.
> Of course it looks nonsensical,
Interesting view, isn't it?
> but it will get it through the parser and an isomorphism will drop the ().
Further insights might follow.
> To avoid parser conflicts, the parser needs to be able to decide
> immediately when it sees a <+... what kind of <+... it is.
Will such information influence the evolution of any corresponding software documentation?
> The choice is that it is the start of a statement in this case,
Variables (which refer to macro/function calls) are usually not decremented.
> but that turns out to be wrong.
It seems to be nice to find parameter applications in such a succinct way.
Would we like to take further case distinctions better into account
(with the help of additional SmPL disjunctions)?
Regards,
Markus
prev parent reply other threads:[~2024-11-03 7:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-02 12:10 [cocci] Searching for selected identifiers in code parts (with SmPL)? Markus Elfring
2024-11-02 18:23 ` Julia Lawall
2024-11-03 7:21 ` Markus Elfring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dc91ad35-d571-4d0d-b0a6-1c3fe468b9f8@web.de \
--to=markus.elfring@web.de \
--cc=cocci@inria.fr \
--cc=julia.lawall@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).