On 07.08.19 23:40, Julia Lawall wrote:
> If you pull Coccinelle from github, you will be able to write the
> following. The code on line 2 probably has to be an ocaml script at the
> moment, because I didn't do anything to support python. You can use the
> code that is shown in the example directly. It checks that the list of
> comments between the ) and the { is not empty. The second scriptcan use
> ocaml or python as you like.
>
> @ find_kmap_tagged_function @
> comments tag : script:ocaml () { let (c1b,c1m,c1a) = List.hd tag in not
> (c1a = []) };
> identifier fn;
> @@
> fn(...)@tag {
> ...
> }
>
> @ script:ocaml parse_kmap_tag @
> fn << find_kmap_tagged_function.fn;
> @@
> Printf.printf "have comment in %s\n" fn
>
> --------
>
> julia
>
Great, thanks a lot for implementing this so quickly!
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci