Re: [cocci] Adding a string literal after a string literal with SmPL?

Julia Lawall <[email protected]> Sun, 7 Jun 2026 13:25:41 +0200 (CEST)
Newsgroups fr.inria.cocci
Message-ID <[email protected]>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323329-1297926780-1780831541=:39302
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8BIT



On Sun, 7 Jun 2026, Markus Elfring wrote:

> > Under which circumstances will the following data processing approach become supported?
> >
> > Another SmPL script variant:
>
> @addition@
> identifier action;
> @@
>  action("My test"
> +       " case!\n"
>        )


There is no plan to support this.

julia

>
>
> Questionable test result (in combination with the software “Coccinelle 1.3.1”):
> Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci add_literal_after_literal.cocci
> …
> plus: parse error:
>   File "add_literal_after_literal.cocci", line 5, column 17, charpos = 68
>   around = '"',
>   whole content = +       " case!\n"
>
>
> Would any more software users like to achieve that such a simple source code transformation
> can work also with this evolving development tool?
> https://en.cppreference.com/c/language/string_literal#Explanation
>
> Regards,
> Markus
>
--8323329-1297926780-1780831541=:39302--