Project

General

Profile

« Previous | Next » 

Revision c419ca44

Added by Guillaume DAVY almost 3 years ago

Ada: Changed type name for states and normalized variable name to match ada requirements.

View differences:

src/backends/Ada/ada_backend.ml
20 20
  close_out out;
21 21
  Log.report ~level:2 (fun fmt -> fprintf fmt "    .. %s generated @." path)
22 22

  
23
exception CheckFailed of string
24

  
25
let check machine =
26
  match machine.mconst with
27
    | [] -> ()
28
    | _ -> raise (CheckFailed "machine.mconst should be void")
29

  
23 30
let translate_to_ada basename prog machines dependencies =
24 31
  let module Ads = Ada_backend_ads.Main in
25 32
  let module Adb = Ada_backend_adb.Main in
26 33
  let module Wrapper = Ada_backend_wrapper.Main in
27 34

  
28
  let destname = !Options.dest_dir ^ "/" ^ basename in
35
  let destname = !Options.dest_dir ^ "/" in
36

  
37
  Log.report ~level:2 (fun fmt -> fprintf fmt "  .. Checking machines@.");
38

  
39
  List.iter check machines;
29 40

  
30
  Log.report ~level:2 (fun fmt -> fprintf fmt "  .. Generating ads@,");
41
  Log.report ~level:2 (fun fmt -> fprintf fmt "  .. Generating ads@.");
31 42

  
32 43
  List.iter (gen_ada destname Ads.print ".ads") machines;
33 44

  
34
  Log.report ~level:2 (fun fmt -> fprintf fmt "  .. Generating adb@,");
45
  Log.report ~level:2 (fun fmt -> fprintf fmt "  .. Generating adb@.");
35 46

  
36 47
  List.iter (gen_ada destname Adb.print ".adb") machines
37 48

  

Also available in: Unified diff