cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Michael Stefaniuc <mstefani@mykolab.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Capturing all array initializers?
Date: Wed, 27 Mar 2019 11:20:09 +0100	[thread overview]
Message-ID: <b4e082410353f7abda6a777cde0583ad@mykolab.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1903270826060.2461@hadrien>

On 2019-03-27 08:26, Julia Lawall wrote:
> On Wed, 27 Mar 2019, Michael Stefaniuc wrote:
> 
>> Hello,
>> 
>> I'm trying to do this transformation,
>> from:
>>     const WCHAR wstr[] = {'u','t','f','1','6','
>> ','s','t','r','i','n','g','\0'};
>> to:
>>     const WCHAR wstr[] = u"utf16 string";
>> 
>> I had hoped to be able to use an expression list for the array
>> initializer, but that produces a parse error. I know that technically 
>> an
>> array initializer is not an expression list, but it looks like one.
>> Is there another metavariable that I can use instead?
> 
> I think that there is initializer list?
Indeed there is, thanks!

But 'initializer' is totally missing from 
http://coccinelle.lip6.fr/docs/main_grammar002.html , there's where I 
have looked for it.

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

  reply	other threads:[~2019-03-27 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 23:46 [Cocci] Capturing all array initializers? Michael Stefaniuc
2019-03-27  7:26 ` Julia Lawall
2019-03-27 10:20   ` Michael Stefaniuc [this message]
2019-03-27 10:30     ` Julia Lawall
2019-03-27  7:28 ` 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=b4e082410353f7abda6a777cde0583ad@mykolab.com \
    --to=mstefani@mykolab.com \
    --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).