Release coccinelle-0.2.4rc2
[bpt/coccinelle.git] / cocci.mli
CommitLineData
34e49164
C
1open Common
2
3(* full_engine takes (coccifile, isofile) and cfiles in parameters and
4 * returns a list associating to the input cfiles, and maybe header
5 * files that was also required to be modified, the files containing the
6 * result (in general files in /tmp).
b1b2de81
C
7 * pre_engine does the compilation of the SmPL code and runs any initially
8 * scripts
9 * post_engine runs any finally scripts
ae4735db
C
10 *
11 * This function uses memoisation internally, which is useful when
b1b2de81 12 * using -dir to not redo twice the same work. So take care!
34e49164 13 *)
b1b2de81
C
14type cocci_info
15val pre_engine : (filename * filename) -> cocci_info
16val full_engine :
17 cocci_info -> filename list -> (filename * filename option) list
18val post_engine : cocci_info -> unit
34e49164 19
ae4735db 20(* because of the #include "toto.c" and also because we may associate the
34e49164 21 * same C file to multiple drivers because they share code, we can
ae4735db
C
22 * modify multiple times the same file when use -dir. This check
23 * remove duplicates and check that the modification are consistent
34e49164
C
24 * among the different drivers.
25 *)
ae4735db 26val check_duplicate_modif :
34e49164
C
27 (filename * filename option) list -> (filename * filename option) list
28
29(* provides memoization *)
30val sp_of_file :
31 filename (* coccifile *) -> filename option (* isofile *) ->
faf9a90c
C
32 Ast_cocci.metavar list list * Ast_cocci.rule list *
33 Ast_cocci.meta_name list list list *
34e49164 34 Ast_cocci.meta_name list list list *
978fd7e5
C
35 (Ast_cocci.meta_name list list list (*used after list*) *
36 (*fresh used after list*)
37 Ast_cocci.meta_name list list list *
38 (*fresh used after list seeds*)
39 Ast_cocci.meta_name list list list) *
40 Ast_cocci.meta_name list list list *
90aeb998
C
41 string list option (*grep tokens*) *
42 string list option (*glimpse tokens*)
34e49164 43
c3e37e97 44val normalize_path : string -> string