Release coccinelle-0.2.0rc1
[bpt/coccinelle.git] / popl09 / popl.ml
CommitLineData
951c7801
C
1type cocci_predicate = Lib_engine.predicate * Ast_cocci.meta_name Ast_ctl.modif
2type formula =
3 (cocci_predicate,Ast_cocci.meta_name, Wrapper_ctl.info) Ast_ctl.generic_ctl
4
5let poplz (name,_,ast) =
6 match ast with
7 [ast] ->
8 let ast = Asttopopl.top ast in
9 let qt = Insert_quantifiers.insert_quantifiers ast in
10 [Popltoctl.toctl qt]
11 | _ -> failwith "only one rule allowed"
12
13let popl r =
14 match r with
15 Ast_cocci.CocciRule(a,b,c,_,Ast_cocci.Normal) -> poplz (a,b,c)
16 | _ -> []