X-Git-Url: http://git.hcoop.net/bpt/coccinelle.git/blobdiff_plain/9f8e26f459677a621822918b7539ae94214621ac..5636bb2c2537506718da74f85a2b81a5ff3df16f:/parsing_cocci/check_meta.ml diff --git a/parsing_cocci/check_meta.ml b/parsing_cocci/check_meta.ml index 2a020e1..2d95149 100644 --- a/parsing_cocci/check_meta.ml +++ b/parsing_cocci/check_meta.ml @@ -1,5 +1,27 @@ (* - * 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 . + * + * 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. * @@ -31,7 +53,7 @@ module V0 = Visitor_ast0 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 @@ -501,7 +523,8 @@ let dup_positions rules = 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 @@ -510,7 +533,7 @@ let dup_positions rules = 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