Coccinelle release 1.0.0-rc14
[bpt/coccinelle.git] / parsing_cocci / data.ml
index 8618934..a056742 100644 (file)
@@ -1,4 +1,8 @@
 (*
+ * Copyright 2012, INRIA
+ * Julia Lawall, Gilles Muller
+ * Copyright 2010-2011, INRIA, University of Copenhagen
+ * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix
  * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
  * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
  * This file is part of Coccinelle.
@@ -20,6 +24,7 @@
  *)
 
 
+# 0 "./data.ml"
 module Ast0 = Ast0_cocci
 module Ast = Ast_cocci
 
@@ -34,9 +39,9 @@ type incl_iso =
 
 type clt =
     line_type * int * int * int * int (* starting spaces *) *
-      (string * Ast0.position_info) list (* code before *) *
-      (string * Ast0.position_info) list (* code after *) *
-      Ast0.meta_pos (* position variable, minus only *)
+      (Ast_cocci.added_string * Ast0.position_info) list (* code before *) *
+      (Ast_cocci.added_string * Ast0.position_info) list (* code after *) *
+      Ast0.anything list (* position variable, minus only *)
 
 (* ---------------------------------------------------------------------- *)
 
@@ -74,11 +79,21 @@ let all_metadecls =
 let clear_meta: (unit -> unit) ref =
   ref (fun _ -> failwith "uninitialized add_meta")
 
+let add_meta_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
+
 let add_id_meta:
     (Ast.meta_name -> iconstraints -> Ast0.pure -> unit) ref =
   ref (fun _ -> failwith "uninitialized add_meta")
 
-let add_fresh_id_meta: (Ast.meta_name -> unit) ref =
+let add_virt_id_meta_found: (string -> string -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
+
+let add_virt_id_meta_not_found:
+    (Ast_cocci.meta_name -> Ast0_cocci.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
+
+let add_fresh_id_meta: (Ast.meta_name -> Ast.seed -> unit) ref =
   ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_type_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
@@ -87,11 +102,15 @@ let add_type_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
 let add_init_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
   ref (fun _ -> failwith "uninitialized add_meta")
 
+let add_initlist_meta:
+    (Ast.meta_name -> Ast.list_len -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
+
 let add_param_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
   ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_paramlist_meta:
-    (Ast.meta_name -> Ast.meta_name option -> Ast0.pure -> unit) ref =
+    (Ast.meta_name -> Ast.list_len -> Ast0.pure -> unit) ref =
   ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_const_meta:
@@ -123,7 +142,20 @@ let add_local_idexp_meta:
   ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_explist_meta:
-    (Ast.meta_name -> Ast.meta_name option -> Ast0.pure -> unit) ref =
+    (Ast.meta_name -> Ast.list_len -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
+
+let add_decl_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
+
+let add_field_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
+
+let add_field_list_meta:
+    (Ast.meta_name -> Ast.list_len -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
+
+let add_symbol_meta: (string -> unit) ref =
   ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_stm_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =