8c0460085c1f9f4795fe0ad44d2c1a021abeab61
[bpt/coccinelle.git] / ocaml / coccilib.ml
1 (* Function table management *)
2
3 type pos = { current_element : string;
4 file :string ;
5 line : int;
6 col : int;
7 line_end : int;
8 col_end : int; }
9
10 type param_type =
11 Pos of pos list
12 | Str of string
13 | Type of Ast_c.fullType
14 | Init of Ast_c.initialiser
15 | Int of int
16 | Param of Ast_c.parameterType
17 | ParamList of Ast_c.parameterType Ast_c.wrap2 list
18 | Expr of Ast_c.expression
19 | ExprList of Ast_c.argument Ast_c.wrap2 list
20 | Stmt of Ast_c.statement
21
22 let fcts : (string, param_type list -> unit) Hashtbl.t =
23 Hashtbl.create 11 (* Use prime number *)
24
25 (* ---------------------------------------------------------------------- *)
26 (* Match management *)
27
28 let inc_match = ref true
29 let include_match x = inc_match := x
30 let dir () = !Flag.dir