All of lore.kernel.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Searching for constants between shift operators with SmPL
Date: Sun, 17 Jun 2018 19:09:11 +0200	[thread overview]
Message-ID: <5e128120-0168-397f-e2fb-9ffd59ec3683@users.sourceforge.net> (raw)

Hello,

The following script for the semantic patch language can mark a bit of source
code also in a corresponding example.


@display@
constant C;
expression A, B;
identifier X;
type T;
@@
 T X = A
 <<
*C
 <<
 B;


int main(void)
{
unsigned int a = 2, b = 4;
unsigned long c = a << 2 << b;
}


1. I get the error message ?minus: parse error? after the addition of
   a SmPL ellipsis behind the metavariable ?B?.

2. I have observed that no source code is found if I omit the metavariables ?T?
   and ?X? (omission of the assignment target) in a SmPL script variant.


How do you think about to clarify these software situations any more?

Regards,
Markus

             reply	other threads:[~2018-06-17 17:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-17 17:09 SF Markus Elfring [this message]
2018-06-17 17:51 ` [Cocci] Searching for constants between shift operators with SmPL Julia Lawall
     [not found]   ` <ae26a5be-ba96-cf08-c3cb-cced3c04f44d@users.sourceforge.net>
2018-06-17 18:40     ` Julia Lawall
     [not found]       ` <4179275b-eafb-7622-2f92-06a4b0b1b39e@users.sourceforge.net>
2018-06-17 19:10         ` Julia Lawall
     [not found]           ` <a2f0f632-d84d-379c-8386-0acbace4eae0@users.sourceforge.net>
2018-06-17 19:24             ` Julia Lawall
     [not found]               ` <7d9d3e4f-c789-538e-f4eb-beb1462d8ba0@users.sourceforge.net>
2018-06-17 19:53                 ` Julia Lawall
     [not found]                   ` <fb10378d-dccb-73ed-ddf0-e62d1c181794@users.sourceforge.net>
2018-06-17 20:25                     ` 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=5e128120-0168-397f-e2fb-9ffd59ec3683@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.