Project

General

Profile

Revision 568b5a26 src/backends/EMF/EMF_backend.ml

View differences:

src/backends/EMF/EMF_backend.ml
280 280
	 remove guard's variable from inputs *)
281 281
      (VSet.elements inputs)
282 282
    ;
283
    fprintf fmt "@[<v 2>\"branches\": {@ %a@]}@ "
283
    fprintf fmt "@[<v 2>\"branches\": {@ @[<v 0>%a@]@]@ }"
284 284
      (fprintf_list ~sep:",@ "
285 285
	 (fun fmt (tag, instrs_tag) ->
286 286
	   let branch_all_lhs, _, branch_inputs = branch_block_vars instrs_tag in
......
290 290
	   fprintf fmt "\"inputs\": [%a],@ " pp_emf_vars_decl (VSet.elements branch_inputs); 
291 291
	   fprintf fmt "@[<v 2>\"instrs\": {@ ";
292 292
	   (pp_emf_instrs m) fmt instrs_tag;
293
	   fprintf fmt "@]}@ ";
294
	   fprintf fmt "@]}"
295

  
293
	   fprintf fmt "@]@ }";
294
	   fprintf fmt "@]@ }"
296 295
	 )
297 296
      )
298 297
      hl
......
332 331
  )
333 332
  | _ -> (
334 333
    fprintf fmt "@[ @[<v 2>\"%a\": {@ " get_instr_id i;
335
    fprintf fmt "%a@ " pp_content i;
336
    fprintf fmt "}@]"
334
    fprintf fmt "%a" pp_content i;
335
    fprintf fmt "@]@]@ }"
337 336
  )
338 337
and pp_emf_instrs m fmt instrs = fprintf_list ~sep:",@ " (pp_emf_instr m) fmt instrs
339 338
       
......
384 383
  (* Previous alternative: mapping normalized lustre to EMF: 
385 384
     fprintf_list ~sep:",@ " pp_decl fmt prog; *)
386 385
  fprintf_list ~sep:",@ " pp_machine fmt (List.rev machines);
387
  fprintf fmt "@ @]}";
388
  fprintf fmt "@ @]}"
386
  fprintf fmt "@]@ }";
387
  fprintf fmt "@]@ }"
389 388

  
390 389
(* Local Variables: *)
391 390
(* compile-command: "make -C ../.." *)

Also available in: Unified diff