source: trunk/ada-2012/src/semantic/gela-pass_utils.ads@ 370

Last change on this file since 370 was 370, checked in by Maxim Reznik, 6 years ago

Add evaluation for numeric static expression

File size: 3.7 KB
Line 
1------------------------------------------------------------------------------
2-- G E L A A S I S --
3-- ASIS implementation for Gela project, a portable Ada compiler --
4-- a portable Ada compiler --
5-- http://gela.ada-ru.org/ --
6-- - - - - - - - - - - - - - - - --
7-- Read copyright and license in gela.ads file --
8------------------------------------------------------------------------------
9
10with Gela.Compilations;
11with Gela.Elements.Compilation_Unit_Declarations;
12with Gela.Elements.Defining_Names;
13with Gela.Elements.Defining_Identifiers;
14with Gela.Lexical_Types;
15with Gela.Semantic_Types;
16with Gela.Resolve;
17
18package Gela.Pass_Utils is
19 pragma Preelaborate;
20
21 package Resolve renames Gela.Resolve;
22
23 function Add_Name_Create_Region
24 (Comp : Gela.Compilations.Compilation_Access;
25 Env : Gela.Semantic_Types.Env_Index;
26 Symbol : Gela.Lexical_Types.Symbol;
27 Name : Gela.Elements.Defining_Names.Defining_Name_Access;
28 Decl : Gela.Elements.Element_Access)
29 return Gela.Semantic_Types.Env_Index;
30 -- Add (Symbol, Name) to Env
31 -- Check if Name is part of enumeration type declaration
32 -- else create new declarative region
33
34 function Leave_Declarative_Region
35 (Comp : Gela.Compilations.Compilation_Access;
36 Index : Gela.Semantic_Types.Env_Index;
37 Name : Gela.Elements.Defining_Names.Defining_Name_Access)
38 return Gela.Semantic_Types.Env_Index;
39
40 function Add_Names
41 (Comp : Gela.Compilations.Compilation_Access;
42 Env : Gela.Semantic_Types.Env_Index;
43 List : Gela.Lexical_Types.Symbol_List;
44 Names : Gela.Elements.Defining_Identifiers
45 .Defining_Identifier_Sequence_Access)
46 return Gela.Semantic_Types.Env_Index;
47 -- Add (Symbol, Name) from List and Names to Env
48
49 function Add_Names_Create_Region
50 (Comp : Gela.Compilations.Compilation_Access;
51 Env : Gela.Semantic_Types.Env_Index;
52 List : Gela.Lexical_Types.Symbol_List;
53 Names : Gela.Elements.Defining_Identifiers
54 .Defining_Identifier_Sequence_Access)
55 return Gela.Semantic_Types.Env_Index;
56 -- Add (Symbol, Name) from List and Names to Env, then create new
57 -- declarative region
58
59 function Parents_Declarative_Region
60 (Comp : Gela.Compilations.Compilation_Access;
61 Full_Name : Gela.Lexical_Types.Symbol)
62 return Gela.Semantic_Types.Env_Index;
63 -- Return end of declarative region of unit's parent
64
65 function Create_String_Value
66 (Comp : Gela.Compilations.Compilation_Access;
67 Full_Name : Gela.Lexical_Types.Token_Index)
68 return Gela.Semantic_Types.Value_Index;
69 -- Return end of declarative region of unit's parent
70
71 function Create_Numeric_Value
72 (Comp : Gela.Compilations.Compilation_Access;
73 Value : Gela.Lexical_Types.Token_Index)
74 return Gela.Semantic_Types.Value_Index;
75 -- Return end of declarative region of unit's parent
76
77 function Create_Function_Call_Value
78 (Comp : Gela.Compilations.Compilation_Access;
79 Name : Gela.Semantic_Types.Value_Index;
80 Arguments : Gela.Semantic_Types.Value_Index)
81 return Gela.Semantic_Types.Value_Index;
82
83 procedure End_Of_Compilation_Unit_Declaration
84 (Comp : Gela.Compilations.Compilation_Access;
85 Unit : Gela.Elements.Compilation_Unit_Declarations.
86 Compilation_Unit_Declaration_Access;
87 Symbol : Gela.Lexical_Types.Symbol;
88 Env : in out Gela.Semantic_Types.Env_Index);
89
90end Gela.Pass_Utils;
Note: See TracBrowser for help on using the repository browser.