-
Notifications
You must be signed in to change notification settings - Fork 1
/
GeneratorAda-CsharpGenerator.ads
366 lines (366 loc) · 14.3 KB
/
GeneratorAda-CsharpGenerator.ads
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
-- Autogenerated by MSIL2Ada v. 2
-- By: Martin C. Carlisle
-- Department of Computer Science
-- US Air Force Academy
with MSSyst.Object;
with MSIL_Types;
use MSIL_Types;
with GeneratorAda.Imperative_Interface;
limited with MSSyst.String;
limited with MSSyst.Type_k;
with generate_interface.typ;
limited with parse_tree.boolean2;
limited with parse_tree.boolean_expression;
limited with parse_tree.boolean_parseable;
limited with parse_tree.expression;
limited with parse_tree.parameter_list;
package GeneratorAda.CsharpGenerator is
type Typ is new MSSyst.Object.Typ
and GeneratorAda.Imperative_Interface.Typ
and generate_interface.typ.Typ
with record
null;
end record;
type Ref is access all Typ'Class;
type Ref_addrof is access all Ref;
type Ref_Arr is array(Natural range <>) of Ref;
type Ref_Array is access all Ref_Arr;
type Ref_Array_addrof is access all Ref_Array;
function new_CsharpGenerator(
This : Ref := null) return Ref;
function new_CsharpGenerator(
This : Ref := null;
filename : access MSSyst.String.Typ'Class) return Ref;
procedure Array_1D_Assignment_After_Index(
This : access Typ);
procedure Array_1D_Assignment_PastRHS(
This : access Typ);
procedure Array_1D_Assignment_Start(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Array_2D_Assignment_After_Indices(
This : access Typ);
procedure Array_2D_Assignment_Between_Indices(
This : access Typ);
procedure Array_2D_Assignment_PastRHS(
This : access Typ);
procedure Array_2D_Assignment_Start(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Declare_As_1D_Array(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Declare_As_2D_Array(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Declare_As_Variable(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Declare_Procedure(
This : access Typ;
name : access MSSyst.String.Typ'Class;
args : access MSSyst.String.Ref_arr;
arg_is_input : MSIL_Types.Bool_Arr;
arg_is_output : MSIL_Types.Bool_Arr);
procedure Declare_String_Variable(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Done_Method(
This : access Typ);
procedure Done_Variable_Declarations(
This : access Typ);
procedure Emit_And(
This : access Typ);
procedure Emit_And_Shortcut(
This : access Typ;
left : access parse_tree.boolean_parseable.Typ'Class;
right : access parse_tree.boolean2.Typ'Class;
left_negated : Standard.Boolean);
procedure Emit_Array_Size(
This : access Typ;
name : access MSSyst.String.Typ'Class);
function Emit_Call_Method(
This : access Typ;
name : Integer) return access MSSyst.Object.Typ'Class;
function Emit_Call_Subchart(
This : access Typ;
name : access MSSyst.String.Typ'Class) return access MSSyst.Object.Typ'Class;
procedure Emit_Conversion(
This : access Typ;
o : Integer);
procedure Emit_Divide(
This : access Typ);
procedure Emit_End_Conversion(
This : access Typ;
o : Integer);
procedure Emit_Exponentiation(
This : access Typ);
procedure Emit_Get_Click(
This : access Typ;
x_or_y : Integer);
procedure Emit_Get_Mouse_Button(
This : access Typ);
procedure Emit_Is_Array(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Emit_Is_Array2D(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Emit_Is_Character(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Emit_Is_Number(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Emit_Is_String(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Emit_Last_Parameter(
This : access Typ;
o : access MSSyst.Object.Typ'Class);
procedure Emit_Left_Paren(
This : access Typ);
procedure Emit_Load(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Emit_Load_Array_2D_After_Indices(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Emit_Load_Array_2D_Between_Indices(
This : access Typ);
procedure Emit_Load_Array_2D_Start(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Emit_Load_Array_After_Index(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Emit_Load_Array_Start(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Emit_Load_Boolean(
This : access Typ;
val : Standard.Boolean);
procedure Emit_Load_Character(
This : access Typ;
val : Wide_Character);
procedure Emit_Load_Number(
This : access Typ;
val : Long_Float);
procedure Emit_Load_String(
This : access Typ;
val : access MSSyst.String.Typ'Class);
procedure Emit_Load_String_Const(
This : access Typ;
val : access MSSyst.String.Typ'Class);
procedure Emit_Minus(
This : access Typ);
procedure Emit_Mod(
This : access Typ);
procedure Emit_Next_Parameter(
This : access Typ;
o : access MSSyst.Object.Typ'Class);
procedure Emit_No_Parameters(
This : access Typ;
o : access MSSyst.Object.Typ'Class);
procedure Emit_Not(
This : access Typ);
procedure Emit_Or(
This : access Typ);
procedure Emit_Or_Shortcut(
This : access Typ;
left : access parse_tree.boolean2.Typ'Class;
right : access parse_tree.boolean_expression.Typ'Class);
procedure Emit_Past_Sleep(
This : access Typ);
procedure Emit_Plugin_Call(
This : access Typ;
name : access MSSyst.String.Typ'Class;
parameters : access parse_tree.parameter_list.Typ'Class);
procedure Emit_Plus(
This : access Typ);
procedure Emit_Random(
This : access Typ);
procedure Emit_Random_2(
This : access Typ;
first : Long_Float;
last : Long_Float);
procedure Emit_Relation(
This : access Typ;
relation : Integer);
procedure Emit_Rem(
This : access Typ);
procedure Emit_Right_Paren(
This : access Typ);
procedure Emit_Sleep(
This : access Typ);
procedure Emit_String_Length(
This : access Typ);
procedure Emit_Times(
This : access Typ);
procedure Emit_To_Integer(
This : access Typ);
procedure Emit_Unary_Minus(
This : access Typ);
procedure Emit_Xor(
This : access Typ);
procedure Finish(
This : access Typ);
function Get_Menu_Name(
This : access Typ) return access MSSyst.String.Typ'Class;
procedure If_Done(
This : access Typ;
o : access MSSyst.Object.Typ'Class);
procedure If_Else_Part(
This : access Typ;
o : access MSSyst.Object.Typ'Class);
function If_Start(
This : access Typ) return access MSSyst.Object.Typ'Class;
procedure If_Then_Part(
This : access Typ;
o : access MSSyst.Object.Typ'Class);
procedure Indent(
This : access Typ);
procedure Input_Past_Prompt(
This : access Typ);
procedure Input_Start_Array_1D(
This : access Typ;
name : access MSSyst.String.Typ'Class;
reference : access parse_tree.expression.Typ'Class);
procedure Input_Start_Array_2D(
This : access Typ;
name : access MSSyst.String.Typ'Class;
reference : access parse_tree.expression.Typ'Class;
reference2 : access parse_tree.expression.Typ'Class);
procedure Input_Start_Variable(
This : access Typ;
name : access MSSyst.String.Typ'Class);
function Is_Postfix(
This : access Typ) return Standard.Boolean;
procedure Loop_End(
This : access Typ;
o : access MSSyst.Object.Typ'Class);
procedure Loop_End_Condition(
This : access Typ;
o : access MSSyst.Object.Typ'Class);
function Loop_Start(
This : access Typ;
is_while : Standard.Boolean;
negative_condition : Standard.Boolean) return access MSSyst.Object.Typ'Class;
procedure Loop_Start_Condition(
This : access Typ;
o : access MSSyst.Object.Typ'Class);
procedure Output_Past_Expr(
This : access Typ;
has_newline : Standard.Boolean;
is_string : Standard.Boolean);
procedure Output_Start(
This : access Typ;
has_newline : Standard.Boolean;
is_string : Standard.Boolean);
procedure Start_Method(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure Variable_Assignment_PastRHS(
This : access Typ);
procedure Variable_Assignment_Start(
This : access Typ;
name : access MSSyst.String.Typ'Class);
procedure WriteParameters(
This : access Typ);
procedure WriteVariables(
This : access Typ);
private
pragma Convention(MSIL,Typ);
pragma MSIL_Constructor(new_CsharpGenerator);
pragma Import(MSIL,Array_1D_Assignment_After_Index,"Array_1D_Assignment_After_Index");
pragma Import(MSIL,Array_1D_Assignment_PastRHS,"Array_1D_Assignment_PastRHS");
pragma Import(MSIL,Array_1D_Assignment_Start,"Array_1D_Assignment_Start");
pragma Import(MSIL,Array_2D_Assignment_After_Indices,"Array_2D_Assignment_After_Indices");
pragma Import(MSIL,Array_2D_Assignment_Between_Indices,"Array_2D_Assignment_Between_Indices");
pragma Import(MSIL,Array_2D_Assignment_PastRHS,"Array_2D_Assignment_PastRHS");
pragma Import(MSIL,Array_2D_Assignment_Start,"Array_2D_Assignment_Start");
pragma Import(MSIL,Declare_As_1D_Array,"Declare_As_1D_Array");
pragma Import(MSIL,Declare_As_2D_Array,"Declare_As_2D_Array");
pragma Import(MSIL,Declare_As_Variable,"Declare_As_Variable");
pragma Import(MSIL,Declare_Procedure,"Declare_Procedure");
pragma Import(MSIL,Declare_String_Variable,"Declare_String_Variable");
pragma Import(MSIL,Done_Method,"Done_Method");
pragma Import(MSIL,Done_Variable_Declarations,"Done_Variable_Declarations");
pragma Import(MSIL,Emit_And,"Emit_And");
pragma Import(MSIL,Emit_And_Shortcut,"Emit_And_Shortcut");
pragma Import(MSIL,Emit_Array_Size,"Emit_Array_Size");
pragma Import(MSIL,Emit_Call_Method,"Emit_Call_Method");
pragma Import(MSIL,Emit_Call_Subchart,"Emit_Call_Subchart");
pragma Import(MSIL,Emit_Conversion,"Emit_Conversion");
pragma Import(MSIL,Emit_Divide,"Emit_Divide");
pragma Import(MSIL,Emit_End_Conversion,"Emit_End_Conversion");
pragma Import(MSIL,Emit_Exponentiation,"Emit_Exponentiation");
pragma Import(MSIL,Emit_Get_Click,"Emit_Get_Click");
pragma Import(MSIL,Emit_Get_Mouse_Button,"Emit_Get_Mouse_Button");
pragma Import(MSIL,Emit_Is_Array,"Emit_Is_Array");
pragma Import(MSIL,Emit_Is_Array2D,"Emit_Is_Array2D");
pragma Import(MSIL,Emit_Is_Character,"Emit_Is_Character");
pragma Import(MSIL,Emit_Is_Number,"Emit_Is_Number");
pragma Import(MSIL,Emit_Is_String,"Emit_Is_String");
pragma Import(MSIL,Emit_Last_Parameter,"Emit_Last_Parameter");
pragma Import(MSIL,Emit_Left_Paren,"Emit_Left_Paren");
pragma Import(MSIL,Emit_Load,"Emit_Load");
pragma Import(MSIL,Emit_Load_Array_2D_After_Indices,"Emit_Load_Array_2D_After_Indices");
pragma Import(MSIL,Emit_Load_Array_2D_Between_Indices,"Emit_Load_Array_2D_Between_Indices");
pragma Import(MSIL,Emit_Load_Array_2D_Start,"Emit_Load_Array_2D_Start");
pragma Import(MSIL,Emit_Load_Array_After_Index,"Emit_Load_Array_After_Index");
pragma Import(MSIL,Emit_Load_Array_Start,"Emit_Load_Array_Start");
pragma Import(MSIL,Emit_Load_Boolean,"Emit_Load_Boolean");
pragma Import(MSIL,Emit_Load_Character,"Emit_Load_Character");
pragma Import(MSIL,Emit_Load_Number,"Emit_Load_Number");
pragma Import(MSIL,Emit_Load_String,"Emit_Load_String");
pragma Import(MSIL,Emit_Load_String_Const,"Emit_Load_String_Const");
pragma Import(MSIL,Emit_Minus,"Emit_Minus");
pragma Import(MSIL,Emit_Mod,"Emit_Mod");
pragma Import(MSIL,Emit_Next_Parameter,"Emit_Next_Parameter");
pragma Import(MSIL,Emit_No_Parameters,"Emit_No_Parameters");
pragma Import(MSIL,Emit_Not,"Emit_Not");
pragma Import(MSIL,Emit_Or,"Emit_Or");
pragma Import(MSIL,Emit_Or_Shortcut,"Emit_Or_Shortcut");
pragma Import(MSIL,Emit_Past_Sleep,"Emit_Past_Sleep");
pragma Import(MSIL,Emit_Plugin_Call,"Emit_Plugin_Call");
pragma Import(MSIL,Emit_Plus,"Emit_Plus");
pragma Import(MSIL,Emit_Random,"Emit_Random");
pragma Import(MSIL,Emit_Random_2,"Emit_Random_2");
pragma Import(MSIL,Emit_Relation,"Emit_Relation");
pragma Import(MSIL,Emit_Rem,"Emit_Rem");
pragma Import(MSIL,Emit_Right_Paren,"Emit_Right_Paren");
pragma Import(MSIL,Emit_Sleep,"Emit_Sleep");
pragma Import(MSIL,Emit_String_Length,"Emit_String_Length");
pragma Import(MSIL,Emit_Times,"Emit_Times");
pragma Import(MSIL,Emit_To_Integer,"Emit_To_Integer");
pragma Import(MSIL,Emit_Unary_Minus,"Emit_Unary_Minus");
pragma Import(MSIL,Emit_Xor,"Emit_Xor");
pragma Import(MSIL,Finish,"Finish");
pragma Import(MSIL,Get_Menu_Name,"Get_Menu_Name");
pragma Import(MSIL,If_Done,"If_Done");
pragma Import(MSIL,If_Else_Part,"If_Else_Part");
pragma Import(MSIL,If_Start,"If_Start");
pragma Import(MSIL,If_Then_Part,"If_Then_Part");
pragma Import(MSIL,Indent,"Indent");
pragma Import(MSIL,Input_Past_Prompt,"Input_Past_Prompt");
pragma Import(MSIL,Input_Start_Array_1D,"Input_Start_Array_1D");
pragma Import(MSIL,Input_Start_Array_2D,"Input_Start_Array_2D");
pragma Import(MSIL,Input_Start_Variable,"Input_Start_Variable");
pragma Import(MSIL,Is_Postfix,"Is_Postfix");
pragma Import(MSIL,Loop_End,"Loop_End");
pragma Import(MSIL,Loop_End_Condition,"Loop_End_Condition");
pragma Import(MSIL,Loop_Start,"Loop_Start");
pragma Import(MSIL,Loop_Start_Condition,"Loop_Start_Condition");
pragma Import(MSIL,Output_Past_Expr,"Output_Past_Expr");
pragma Import(MSIL,Output_Start,"Output_Start");
pragma Import(MSIL,Start_Method,"Start_Method");
pragma Import(MSIL,Variable_Assignment_PastRHS,"Variable_Assignment_PastRHS");
pragma Import(MSIL,Variable_Assignment_Start,"Variable_Assignment_Start");
pragma Import(MSIL,WriteParameters,"WriteParameters");
pragma Import(MSIL,WriteVariables,"WriteVariables");
end GeneratorAda.CsharpGenerator;
pragma Import(MSIL,GeneratorAda.CsharpGenerator,
".ver 1:0:0:0",
"[GeneratorAda]GeneratorAda.CsharpGenerator");