Coccinelle archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Stefan Winter <sw@stefan-winter.net>, cocci@inria.fr
Subject: Re: [cocci] Support for unary operator matching
Date: Wed, 2 Apr 2025 14:25:46 +0200	[thread overview]
Message-ID: <60dd718b-b828-4562-926a-a756f1666ce3@web.de> (raw)
In-Reply-To: <87r02an6w0.fsf@debiant14>

> But it seems Coccinelle is choking on "unary":

I wonder also why a SmPL script variant (like the following) does not get accepted
by the software combination “Coccinelle 1.3-00083-g4093aad2d” so far.

@deletion@
expression x;
unary operator uo = { - };
@@
-uo
 x


Questionable test result:
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> spatch --parse-cocci suggestion_for_Stefan_Winter-20250402.cocci
…
meta: parse error:
  File "suggestion_for_Stefan_Winter-20250402.cocci", line 3, column 0, charpos = 25
  around = 'unary',
  whole content = unary operator uo = { - };


Regards,
Markus

      reply	other threads:[~2025-04-02 12:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 11:23 [cocci] Support for unary operator matching Stefan Winter
2025-04-02 12:25 ` Markus Elfring [this message]

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=60dd718b-b828-4562-926a-a756f1666ce3@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=sw@stefan-winter.net \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).