(*
- * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
+ * Copyright 2005-2010, 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.
+ *
+ * Coccinelle is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, according to version 2 of the License.
+ *
+ * Coccinelle is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * The authors reserve the right to distribute this or future versions of
+ * Coccinelle under other licenses.
+ *)
+
+
+(*
+ * Copyright 2005-2010, 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.
*
module VT0 = Visitor_ast0_types
(* all fresh identifiers *)
-let fresh_table = (Hashtbl.create(50) : ((string * string), unit) Hashtbl.t)
+let fresh_table = (Hashtbl.create(50) : (Ast.meta_name, unit) Hashtbl.t)
let warning s = Printf.fprintf stderr "warning: %s\n" s
let rec loop = function
[] | [_] -> ()
| ((rule,name) as x)::y::_ when x = y ->
- failwith (Printf.sprintf "duplicate use of %s.%s" rule name)
+ failwith
+ (Printf.sprintf "duplicate use of %s.%s" rule name)
| _::xs -> loop xs in
loop res
let make_table l =
let table =
(Hashtbl.create(List.length l) :
- ((string * string), bool ref) Hashtbl.t) in
+ (Ast.meta_name, bool ref) Hashtbl.t) in
List.iter
(function x -> Hashtbl.add table (Ast.get_meta_name x) (ref false)) l;
table