Coccinelle release 1.0.0-rc4
[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 | InitList of Ast_c.initialiser Ast_c.wrap2 list
16 | Int of int
17 | Param of Ast_c.parameterType
18 | ParamList of Ast_c.parameterType Ast_c.wrap2 list
19 | Expr of Ast_c.expression
20 | ExprList of Ast_c.argument Ast_c.wrap2 list
21 | Decl of Ast_c.declaration
22 | Field of Ast_c.field
23 | FieldList of Ast_c.field list
24 | Stmt of Ast_c.statement
25
26 let fcts : (string, param_type list -> string ref list -> unit) Hashtbl.t =
27 Hashtbl.create 11 (* Use prime number *)
28
29 (* ---------------------------------------------------------------------- *)
30 (* Match management *)
31
32 let inc_match = ref true
33 let include_match x = inc_match := x
34 let exited = ref true
35 let exit _ = exited := true
36 let dir () = !Flag.dir