Commit b4be27ed authored by Bruno Guillaume's avatar Bruno Guillaume

Fix messages

parent c4f645a3
......@@ -270,7 +270,7 @@ module Command = struct
end
else
begin
check_node_id_msg loc ("Unbound identifier %s (neither a node nor a lexicon)") node_id_or_lex kni;
check_node_id_msg loc ("Unbound identifier (neither a node nor a lexicon):") node_id_or_lex kni;
Domain.check_feature_name ~loc ?domain feature_name_or_lex_field;
Feat (cn_of_node_id node_id_or_lex, feature_name_or_lex_field)
end
......
......@@ -512,45 +512,11 @@ module P_fs = struct
let new_acc = (lex_name, new_lexicon) :: (List.remove_assoc lex_name acc) in
loop new_acc (t_pat, t)
with
| Not_found -> failwith "TODO<123>"
| Not_found -> Error.bug "[P_fs.match_] Cannot find lexicon. lex_name=\"%s\"" lex_name
end
| (_::p_tail, _::g_tail) -> loop acc (p_tail,g_tail) in
loop lexicons (p_fs_wo_pos,g_fs)
(* ------------------------------------------------------------------------------ *)
(*
| ((_, {P_feature.cst=cst; P_feature.in_param=in_param})::t_pat, (_, atom)::t) ->
(* check for the constraint part and fail if needed *)
let () = match cst with
| P_feature.Absent -> raise Fail
| P_feature.Equal fv when not (List_.sort_mem atom fv) -> raise Fail
| P_feature.Different fv when List_.sort_mem atom fv -> raise Fail
| P_feature.Else (fv1,_,_) when fv1 <> atom -> raise Fail
| _ -> () in
(* if constraint part don't fail, look for lexical parameters *)
match (acc, in_param) with
| (_,[]) -> loop acc (t_pat,t)
| (None,_) -> Log.bug "[P_fs.match_] Parametrized constraint in a non-parametrized rule"; exit 2
| (Some param, [index]) ->
(match Lex_par.select index (string_of_value atom) param with
| None -> raise Fail
| Some new_param -> loop (Some new_param) (t_pat,t)
)
| _ -> Error.bug "[P_fs.match_] several different parameters contraints for the same feature is not implemented" in
loop param (p_fs_wo_pos,g_fs)
*)
(* ------------------------------------------------------------------------------ *)
exception Fail_unif
let unif fs1 fs2 =
let rec loop = function
......
......@@ -122,12 +122,10 @@ module Rule : sig
val apply: ?domain: Domain.t -> t -> Instance.t -> Instance_set.t
val det_apply: ?domain: Domain.t -> t -> Instance.t -> Instance.t option
val wrd_apply: ?domain: Domain.t -> t -> (G_graph.t * Libgrew_types.big_step option) -> (G_graph.t * Libgrew_types.big_step) option
val onf_apply: ?domain: Domain.t -> t -> G_graph.t -> G_graph.t option
val gwh_apply: ?domain: Domain.t -> t -> Graph_with_history.t -> Graph_with_history_set.t
......
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