HCoop
/
bpt
/
coccinelle.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
permit multiline comments and strings in macros
[bpt/coccinelle.git]
/
demos
/
ocaml1.cocci
1
@initialize:ocaml@
2
let a = ref 0
3
let _ = Printf.printf "starting ocaml\n"
4
5
@r@
6
expression x,a;
7
@@
8
9
f(x,a)
10
11
@script:ocaml@
12
y << r.x;
13
yy << r.a;
14
@@
15
16
a := !a + 1;
17
Printf.printf "%s and %s\n" y yy
18
19
@script:ocaml@
20
y << r.a;
21
zz << r.x;
22
@@
23
24
a := !a + 1;
25
Printf.printf "%s again and %s again \n" zz y
26
27
@finalize:ocaml@
28
Printf.printf "ending ocaml %d\n" !a