2 * Copyright 2012, INRIA
3 * Julia Lawall, Gilles Muller
4 * Copyright 2010-2011, INRIA, University of Copenhagen
5 * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix
6 * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
7 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
8 * This file is part of Coccinelle.
10 * Coccinelle is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, according to version 2 of the License.
14 * Coccinelle is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
22 * The authors reserve the right to distribute this or future versions of
23 * Coccinelle under other licenses.
30 module StringMap
= Map.Make
(String
)
32 exception Pycocciexception
34 let python_support = false
36 let check_return_value v
= failwith
"no python"
37 let check_int_return_value v
= failwith
"no python"
39 let initialised = ref false
41 let cocci_file_name = ref ""
43 (* dealing with python modules loaded *)
44 let get_module module_name
= failwith
"no python"
46 let is_module_loaded module_name
= failwith
"no python"
48 let load_module module_name
= failwith
"no python"
49 (* end python module handling part *)
51 (* initialisation routines *)
52 let pycocci_init () = initialised := true
54 (*let _ = pycocci_init ()*)
55 (* end initialisation routines *)
57 (* python interaction *)
58 let split_fqn fqn
= failwith
"no python"
60 let pycocci_get_class_type fqn
= failwith
"no python"
62 let pycocci_instantiate_class fqn args
= failwith
"no python"
64 (* end python interaction *)
66 let inc_match = ref false
67 let exited = ref false
69 let include_match v
= failwith
"no python"
71 let sp_exit _ = failwith
"no python"
73 let build_method (mname
, camlfunc
, args
) pymodule classx classdict
=
76 let build_class cname parent methods pymodule
= failwith
"no python"
78 let has_environment_binding env name
= failwith
"no python"
80 let get_cocci_file args
= failwith
"no python"
82 let build_classes env
= failwith
"no python"
84 let build_variable name
value = failwith
"no python"
86 let contains_binding e
(_,(r
,m
),_) = failwith
"no python"
88 let construct_variables mv e
= failwith
"no python"
90 let construct_script_variables mv
= failwith
"no python"
91 let retrieve_script_variables mv
= failwith
"no python"
93 let set_coccifile cocci_file
=
94 cocci_file_name := cocci_file
;
98 let pyrun_simplestring s
=
101 let py_isinitialized () =