From: oleg@redhat.com (Oleg Nesterov)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Q: question on disjunction of sub-expression patterns
Date: Sun, 23 Apr 2017 17:08:16 +0200 [thread overview]
Message-ID: <20170423150816.GA24670@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1704221844060.2351@hadrien>
On 04/22, Julia Lawall wrote:
>
> On Sat, 22 Apr 2017, Oleg Nesterov wrote:
>
> > It looks as if only one pattern from disjunction can match in the same statement.
> > IOW, (PAT1 | PAT2) actually means (PAT1* | PAT2*), not (PAT1 | PAT2)*. Say,
> >
> The idea with a disjunction is that if the first rule matches, then that
> one wins. Actually, ( A | B ) is encoded as A v (not A & B).
OK, thanks a lot Julia!
Does this mean that I have to write 2 separate rules if I want to track the member
dereferences? One for "->" and another for ".", because I can't use the "operator"
metadecl in this case.
Oleg.
next prev parent reply other threads:[~2017-04-23 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-22 16:02 [Cocci] Q: question on disjunction of sub-expression patterns Oleg Nesterov
2017-04-22 16:45 ` Julia Lawall
2017-04-23 15:08 ` Oleg Nesterov [this message]
2017-04-23 16:03 ` Julia Lawall
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=20170423150816.GA24670@redhat.com \
--to=oleg@redhat.com \
--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.