1
(**************************************************************************)
4
(* Copyright (C) 2002 Institut National de Recherche en Informatique et *)
5
(* en Automatique. All rights reserved. *)
7
(* This program is free software; you can redistribute it and/or modify *)
8
(* it under the terms of the GNU General Public License as published by *)
9
(* the Free Software Foundation; either version 2 of the License, or *)
10
(* any later version. *)
12
(* This program is distributed in the hope that it will be useful, *)
13
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
14
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
15
(* GNU General Public License for more details. *)
17
(* You should have received a copy of the GNU General Public License *)
18
(* along with this program; if not, write to the Free Software *)
19
(* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *)
22
(* Contact: Maxence.Guesdon@inria.fr *)
23
(**************************************************************************)
26
module V = Omom_variables
29
let rec id_list = function
31
" " ^ x ^ " " ^ (id_list t)
34
| V.V_String (x, _) -> x
35
| V.V_List x -> id_list x
38
let rec includes_list = function
40
"-I " ^ x ^ " " ^ (includes_list t)
43
| V.V_String (x, _) -> "-I " ^ x
44
| V.V_List x -> includes_list x
46
let actions = Hashtbl.create 8
48
let action_of_string str =
50
Hashtbl.find actions str
56
"includes", includes ;
59
let default_action = "" (* id *)
61
let _ = List.iter (fun (s,f) -> Hashtbl.add actions s f) actions_list
63
let actions_names = List.map fst actions_list