Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 86875e5f16bea6b454c492e84ceda4db > files > 102

coccinelle-examples-0.2.3-0.rc6.3.fc14.x86_64.rpm

@initialize:ocaml@
let a = ref 0
let _ = Printf.printf "starting ocaml\n"

@r@
expression x,a;
@@

f(x,a)

@script:ocaml@
y << r.x;
yy << r.a;
@@

a := !a + 1;
Printf.printf "%s and %s\n" y yy

@script:ocaml@
y << r.a;
zz << r.x;
@@

a := !a + 1;
Printf.printf "%s again and %s again \n" zz y

@finalize:ocaml@
Printf.printf "ending ocaml %d\n" !a