cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Clarification for SmPL functionality around position variables
Date: Sun, 14 Apr 2019 10:02:32 +0200	[thread overview]
Message-ID: <a47c2d88-9f8c-d644-ca34-351fe1636f35@web.de> (raw)
In-Reply-To: <alpine.DEB.2.21.1904140946570.2615@hadrien>

>> elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci show_same_statements7.cocci
>> …
>> Variable find.p2 in duplicated_code cannot be used as both a position and a constraint
>
> I think that you have to declare find.p1 and find.p2 on a subsequent line.

I have observed the same error message then.


I have adjusted the SmPL code also in the following way.

@duplicated_code@
identifier work;
position find.p1, find.p2;
position pos != find.p2;
statement s1, s2;
type T;
@@
…


elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci show_same_statements7x.cocci
…
meta: parse error:
  File "show_same_statements7x.cocci", line 29, column 21, charpos = 315
  around = 'p2',
  whole content = position pos != find.p2;


How will the software situation evolve further?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2019-04-14  8:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 15:23 [Cocci] Searching for duplicate statements in if branches (with SmPL)? Markus Elfring
     [not found] ` <alpine.DEB.2.20.1904111728380.3143@hadrien>
2019-04-11 15:43   ` Markus Elfring
     [not found]     ` <alpine.DEB.2.20.1904111749350.3143@hadrien>
2019-04-11 16:00       ` Markus Elfring
2019-04-12  7:09       ` Markus Elfring
     [not found]         ` <alpine.DEB.2.21.1904120912270.2733@hadrien>
2019-04-12  7:43           ` Markus Elfring
2019-04-13 15:36   ` [Cocci] Checking influence of loops? Markus Elfring
     [not found]     ` <alpine.DEB.2.21.1904131737540.2536@hadrien>
2019-04-13 15:42       ` Markus Elfring
     [not found]         ` <alpine.DEB.2.21.1904131743330.2536@hadrien>
2019-04-13 15:53           ` Markus Elfring
2019-04-13 16:03             ` Julia Lawall
2019-04-13 16:11               ` Markus Elfring
2019-04-13 16:16                 ` Julia Lawall
2019-04-13 16:28                   ` Markus Elfring
     [not found]                     ` <alpine.DEB.2.21.1904131834510.2536@hadrien>
2019-04-13 16:46                       ` Markus Elfring
     [not found]                         ` <alpine.DEB.2.21.1904131905320.2536@hadrien>
2019-04-13 17:29                           ` [Cocci] Clarification for SmPL ellipsis functionality Markus Elfring
2019-04-14  7:42                           ` [Cocci] Clarification for SmPL functionality around position variables Markus Elfring
2019-04-14  7:47                             ` Julia Lawall
2019-04-14  8:02                               ` Markus Elfring [this message]
     [not found]                                 ` <alpine.DEB.2.21.1904141006320.2615@hadrien>
2019-04-14  8:21                                   ` Markus Elfring
     [not found]                                     ` <alpine.DEB.2.21.1904141023450.2615@hadrien>
2019-04-14  8:27                                       ` 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=a47c2d88-9f8c-d644-ca34-351fe1636f35@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=julia.lawall@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 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 NNTP newsgroup(s).