Release coccinelle-0.2.0
[bpt/coccinelle.git] / python / no_pycocci_aux.ml
index 47f9146..0867b6c 100644 (file)
@@ -1,30 +1,30 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* 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-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.
+ *
+ * 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.
+ *)
 
 
 open Ast_c
 open Common
 
 let rec exprrep expr = match expr with
-  Ast_c.Ident s -> s
+  Ast_c.Ident (ident) -> Ast_c.str_of_name ident
 | Ast_c.Constant c -> constantrep c
 | Ast_c.FunCall (e,args) -> "TODO: FunCall"
 | Ast_c.CondExpr (e1,e2,e3) -> "TODO: CondExpr"
@@ -45,16 +45,16 @@ let rec exprrep expr = match expr with
 | Ast_c.ParenExpr e -> "TODO: ParenExpr"
 and constantrep c = match c with
   Ast_c.String (s,isWchar) -> s 
-| Ast_c.MultiString -> "TODO: MultiString"
+| Ast_c.MultiString -> "TODO: MultiString"
 | Ast_c.Char (s,isWchar) -> s
-| Ast_c.Int s -> s 
-| Ast_c.Float (s,t) -> s
+| Ast_c.Int (s, _t) -> s 
+| Ast_c.Float (s, _t) -> s
 
 let call_pretty f a =
   let str = ref ([] : string list) in
   let pr_elem info = str := (Ast_c.str_of_info info) :: !str in
   let pr_sp _ = () in
-  f pr_elem pr_sp a;
+  f ~pr_elem ~pr_space:pr_sp a;
   String.concat " " (List.rev !str)
 
 let stringrep mvb = match mvb with
@@ -73,4 +73,5 @@ let stringrep mvb = match mvb with
     (* Common.sprintf ("pos(%d,%d)") pos1 pos2 *)
     "TODO: <<posval>>"
 | Ast_c.MetaPosValList positions -> "TODO: <<postvallist>>"
+| Ast_c.MetaInitVal _ -> "TODO: <<metainitval>>"