cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Checking the parsing for a specific SmPL disjunction
Date: Thu, 25 Jun 2020 17:11:15 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2006251708200.6463@hadrien> (raw)
In-Reply-To: <f49e80bf-5758-6762-3310-86fa3727a66f@web.de>

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]



On Thu, 25 Jun 2020, Markus Elfring wrote:

> Hello,
>
> I know that the following SmPL script example gets accepted
> by the Coccinelle software.
>
> @display@
> expression x, y;
> @@
> *y = ... *(x) ...

This is probably not what you think.  It is an assignment of y to a
multiplication followed by some other code (the second ...).

julia

>
>
> I have tried another tiny script variant out for the semantic patch language
> (according to the software combination “Coccinelle 1.0.8-00131-g675b9670”).
>
> @display@
> expression action, x, y;
> @@
> (
> *y = ... *(x) ...
> |
> *action(..., x, ...)
> )
>
>
> elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci show_pointer_dereferences3.cocci
> init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h
> minus: parse error:
>   File "show_pointer_dereferences3.cocci", line 5, column 14, charpos = 54
>   around = '...',
>   whole content = *y = ... *(x) ...
>
>
> Should such SmPL disjunctions work in the future?
>
> Regards,
> Markus
> _______________________________________________
> Cocci mailing list
> Cocci@systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
>

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

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

  reply	other threads:[~2020-06-25 15:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 15:00 [Cocci] Checking the parsing for a specific SmPL disjunction Markus Elfring
2020-06-25 15:11 ` Julia Lawall [this message]
     [not found]   ` <79cbff87-a004-aa34-1b1c-6229c645389d@web.de>
2020-06-25 18:00     ` 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=alpine.DEB.2.22.394.2006251708200.6463@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=Markus.Elfring@web.de \
    --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 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).