All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Searching for constants between shift operators with SmPL
@ 2018-06-17 17:09 SF Markus Elfring
  2018-06-17 17:51 ` Julia Lawall
  0 siblings, 1 reply; 7+ messages in thread
From: SF Markus Elfring @ 2018-06-17 17:09 UTC (permalink / raw)
  To: cocci

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-06-17 20:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-17 17:09 [Cocci] Searching for constants between shift operators with SmPL SF Markus Elfring
2018-06-17 17:51 ` 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

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.