From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Easy search for elements besides binary operators with SmPL
Date: Fri, 12 May 2017 17:02:52 +0200 [thread overview]
Message-ID: <877850e1-87cd-8495-15bd-5afa82ea4913@users.sourceforge.net> (raw)
In-Reply-To: <alpine.DEB.2.20.1705122248340.3416@hadrien>
>>> Maybe put parentheses around the second argument. An isomorphism will
>>> drop them and you will avoid whatever parsing issue is being encountered.
>>
>> I do not observe a desired improvement after such a SmPL code adjustment.
>
> Your change is not what I suggested either. The second argument starts to
> the right of one comma and ends to the left of the next one.
I interpreted the ?second one? as belonging to the ellipsis in the binary
operator specification (for a moment).
Now I observe that the following SmPL script variants work as desired
in principle.
@find_last_option@
expression target;
identifier action;
@@
target = action(...,
( ...
* | __GFP_NOFAIL
)
);
@find_flag@
expression target;
identifier action;
@@
target = action(...,
( ...
* | __GFP_NOFAIL
| ...
),
...);
I find it just strange that extra parentheses are needed in such an use case
at the moment.
Regards,
Markus
next prev parent reply other threads:[~2017-05-12 15:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 13:09 [Cocci] Easy search for elements besides binary operators with SmPL SF Markus Elfring
[not found] ` <alpine.DEB.2.20.1705122137090.3416@hadrien>
2017-05-12 14:42 ` SF Markus Elfring
2017-05-12 14:49 ` Julia Lawall
2017-05-12 15:02 ` SF Markus Elfring [this message]
2017-05-12 15:15 ` Julia Lawall
2017-05-12 15:38 ` SF Markus Elfring
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=877850e1-87cd-8495-15bd-5afa82ea4913@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=cocci@systeme.lip6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.