1 (***********************************************************************)
4 (* Nicolas Pouillard, Berke Durak, projet Gallium, INRIA Rocquencourt *)
6 (* Copyright 2007 Institut National de Recherche en Informatique et *)
7 (* en Automatique. All rights reserved. This file is distributed *)
8 (* under the terms of the Q Public License version 1.0. *)
10 (***********************************************************************)
13 (* Original author: Nicolas Pouillard *)
15 open Bool
(* FIXME remove me *)
17 let all_flags = ref []
21 List.fold_left
begin fun acc
(xtags
, xflags
) ->
22 if Tags.does_match tags xtags
then xflags
:: acc
27 let () = Command.tag_handler
:= of_tags
29 let of_tag_list x
= of_tags (Tags.of_list x
)
31 let set_flags tags flags
=
32 all_flags := (tags
, flags
) :: !all_flags
34 let flag tags flags
= set_flags (Tags.of_list tags
) flags
36 let add x xs
= x
:: xs
37 let remove me
= List.filter
(fun x
-> me
<> x
)
40 List.fold_right
begin fun (x
, y
) acc
->
41 A
("-"^x
) :: A y
:: acc
45 let get_flags () = !all_flags