Re: [cocci] Question regarding Coccinelle
Pierrick Philippe <[email protected]> Tue, 26 May 2026 11:06:54 +0200
| Newsgroups | fr.inria.cocci |
|---|---|
| Message-ID | <[email protected]> |
On 5/26/26 11:00, Julia Lawall wrote: > On Tue, 26 May 2026, Pierrick Philippe wrote: >> I think I understand, also I do have a question regarding the `declaration` keyword of the grammar. >> Is there any way to access inner information of the declaration? Such as the type or the presence of an initializer or not? >> For example in a python or a ocaml script? > > Not sure what you mean. There is a metavariable of type declaration taht > will take the whole declaration at once. If you also want the pieces you > can write: > > ( > d > & > T x = ...; // matches the case with and without an initializer > ) This is exactly what I meant, thank you. Though it confuses me why the `...` operator works here but not in the `memcmp` call statement. Pierrick