Commit dee9748e authored by bguillaum's avatar bguillaum

fix bug #13405

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@6654 7838e531-6607-4d57-9587-6c381814729c
parent bc615a66
......@@ -110,8 +110,9 @@ module Feature_structure = struct
let rec del_feat feature_name = function
| [] -> []
| (Feature.Equal (fn,_))::t when feature_name <= fn -> t
| (Feature.Equal (fn,ats))::t -> (Feature.Equal (fn,ats)):: (del_feat feature_name t)
| ((Feature.Equal (fn,_))::_) as t when feature_name < fn -> t
| (Feature.Equal (fn,_))::t when feature_name = fn -> t
| Feature.Equal (fn,ats)::t -> Feature.Equal (fn,ats):: (del_feat feature_name t)
| _ -> Log.bug "[Feature_structure.set_feat]: Disequality not allowed in graph features"; exit 2
(* WARNING: different from prev implem: does not fail when pattern contains a feature_name or in instance *)
......
......@@ -12,8 +12,15 @@ module Feature_structure: sig
val empty: t
val to_string: t -> string
val to_dep: ?main_feat: string -> t -> string
(** [set_feat feature_name atoms t] adds the feature ([feature_name],[atoms]) in [t].
If [t] already contains a feature named [feature_name], the old value is erased by the new one. *)
val set_feat: string -> string list -> t -> t
(** [del_feat feature_name t] remove the feature with name [feature_name] in [t].
If [t] does not contain such a feature, [t] is returned unchanged. *)
val del_feat: string -> t -> t
val compatible: t -> t -> bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment