Skip to content
Snippets Groups Projects
Commit a38faa34 authored by Mamadou Ndiaye's avatar Mamadou Ndiaye
Browse files

-kcg: now compiles the edge node correctly.

parent b6732b4e
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,6 @@ open Lv6MainArgs
(* XXX changer le nom de cette fonction *)
let (dump_long : Lv6Id.long -> string) = fun x ->
(*Ajout*)
if global_opt.kcg then
if global_opt.no_prefix then
Lv6Id.no_pack_string_of_long x
......@@ -156,11 +155,9 @@ and string_def_of_type_eff = function
None -> ""
| Some ce -> " = " ^ (string_of_const_eff ce)
in
(*début modif type struct*)
if global_opt.kcg then
(List.fold_left (f "; ") (f "" " {" (List.hd fl)) (List.tl fl)) ^ "}"
else
(*fin modif*)
else
"struct " ^
(List.fold_left (f "; ") (f "" " {" (List.hd fl)) (List.tl fl)) ^ "}"
......@@ -427,7 +424,6 @@ and (string_of_by_pos_op_eff: Lic.by_pos_op srcflagged -> Lic.val_exp list -> st
^ " -> pre " ^
(if is_a_tuple ve1 then tuple_par [ve2] else string_of_val_exp_eff ve2)
else
(*ajout*)
if global_opt.kcg then (
"fby (" ^
(if is_a_tuple ve1 then tuple_par [ve2] else string_of_val_exp_eff ve2)
......@@ -436,7 +432,6 @@ and (string_of_by_pos_op_eff: Lic.by_pos_op srcflagged -> Lic.val_exp list -> st
)
else(
(*fin ajout*)
(if is_a_tuple ve1 then tuple_par [ve1] else string_of_val_exp_eff ve1)
^ " fby " ^
(if is_a_tuple ve1 then tuple_par [ve2] else string_of_val_exp_eff ve2)
......@@ -507,12 +502,10 @@ and string_of_val_exp_eff_core ve_core =
(string_of_val_exp_eff ct) ^ ") else current (" ^
(string_of_val_exp_eff cf) ^")"
) else (
(*modif*)
if global_opt.kcg then (
"merge ( " ^ (string_of_val_exp_eff ve) ^ ";" ^
(string_of_val_exp_eff ct) ^ "when true;" ^
(string_of_val_exp_eff cf) ^"when false )"
(*fin modif*)
) else (
"merge " ^ (string_of_val_exp_eff ve) ^ " (true -> " ^
(string_of_val_exp_eff ct) ^ ") (false -> "^ (string_of_val_exp_eff cf) ^")"
......@@ -654,7 +647,6 @@ and node_of_node_exp_eff (neff: Lic.node_exp): string =
(* no extern kwd in v4... *)
then "extern " else ""
)^(
(*modifié*)
if global_opt.lv4 || global_opt.kcg then (
(* node and function does not have the same meaning in scade and in lv4... *)
if neff.def_eff = ExternLic then "function " else "node "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment