> You get a list of strings, with one comment per string.

It seems that this metavariable provides structured information
which can be split according to your OCaml code in the SmPL script.

“…
let (c1b,c1m,c1a) = List.hd c1 in
…”


Can this programming approach result in undesirable data duplication?


I have tried it out after I replaced a placeholder “%s” by the
code “\"${OPAM_SWITCH_PREFIX}/ocaml\"” in the function “load_file”.
https://github.com/coccinelle/coccinelle/blob/b5c8841872ddd04815e9499863c8f9e6fda56fab/ocaml/yes_prepare_ocamlcocci.ml#L572

elfring@Sonne:~/Projekte/Coccinelle/20160205> COCCINELLE_HOME=$(pwd) 
/usr/local/bin/opam config exec --switch 4.07.1 ./spatch.opt 
demos/comments.cocci demos/comments.c
…
c1b: /* before the function …  */
…


* Now I wonder why this display is presented in three variations.

* Which texts would you expect for your variables “…m”?

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to