Project

General

Profile

Revision bdc471f3 src/backends/Ada/ada_backend_adb.ml

View differences:

src/backends/Ada/ada_backend_adb.ml
10 10
(********************************************************************)
11 11

  
12 12
open Format
13

  
13 14
open Machine_code_types
14 15
open Lustre_types
15 16
open Corelang
16 17
open Machine_code_common
17 18

  
19
open Ada_backend_common
20

  
18 21
module Main =
19 22
struct
20 23

  
21
(*TODO: Copied from ./ada_backend_ads.ml *)
22
let pp_package_name fmt machine =
23
  fprintf fmt "%s" machine.mname.node_id
24
let pp_begin_package fmt machine =
25
  fprintf fmt "package body %a is" pp_package_name machine
26
let pp_end_package fmt machine =
27
  fprintf fmt "end %a;" pp_package_name machine
28

  
29 24
let pp_machine_instr machine fmt instr =
30 25
    fprintf fmt "instruction"
31 26

  
32 27
let print fmt machine =
33 28
  let pp_instr = pp_machine_instr machine in
34 29
  fprintf fmt "@[<v 2>%a@,%a@]@,%a@."
35
    pp_begin_package machine
30
    (pp_begin_package true) machine
36 31
    (Utils.fprintf_list ~sep:"@," pp_instr) machine.mstep.step_instrs
37 32
    pp_end_package machine
38 33

  

Also available in: Unified diff