taste-backend.ads 1.56 KB
Newer Older
1
2
3
4
--  ******************************* KAZOO  *******************************  --
--  (c) 2017-2021 European Space Agency - maxime.perrotin@esa.int
--  See LICENSE file
--  *********************************************************************** --
5
6
with Ada.Strings.Unbounded,
     --  Ocarina.Backends.Properties,
7
8
     TASTE.Interface_View;

9
package TASTE.Backend is
10
11
   use Ada.Strings.Unbounded,
       --  Ocarina.Backends.Properties,
12
13
       Interface_View;

14
15
   Backend_Error : exception;

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
   function Map_Language (Language : String) return String is
     (if    Language = "ada"             then "Ada"
      elsif Language = "c"               then "C"
      elsif Language = "blackbox_device" then "Blackbox_C"
      elsif Language = "gui"             then "GUI"
      elsif Language = "cpp"             then "CPP"
      elsif Language = "rtds"            then "RTDS"
      elsif Language = "sdl"             then "SDL"
      elsif Language = "sdl_opengeode"   then "SDL"
      elsif Language = "simulink"        then "SIMULINK"
      elsif Language = "qgenc"           then "QGenC"
      elsif Language = "qgenada"         then "QGenAda"
      elsif Language = "system_c"        then "System_C"
      elsif Language = "vdm"             then "VDM"
      elsif Language = "vhdl"            then "VHDL"
      elsif Language = "vhdl_brave"      then "VHDL_BRAVE"
      elsif Language = "micropython"     then "MicroPython"
      else Language);

35
   function Language_Spelling (Func : Taste_Terminal_Function) return String is
36
      (Map_Language (To_String (Func.Language)));
37
end TASTE.Backend;