managed to change h2-scheme to a generic package
This commit is contained in:
		@ -6,7 +6,9 @@ with Ada.Text_IO;
 | 
			
		||||
with Ada.Unchecked_Deallocation;
 | 
			
		||||
 | 
			
		||||
procedure scheme is
 | 
			
		||||
	package S renames H2.Scheme;
 | 
			
		||||
	--package S renames H2.Scheme;
 | 
			
		||||
	--package S is new  H2.Scheme (Wide_Character, Wide_String);
 | 
			
		||||
	package S renames Stream.S;
 | 
			
		||||
 | 
			
		||||
	Pool: aliased Storage.Global_Pool;
 | 
			
		||||
	SI: S.Interpreter_Record;
 | 
			
		||||
@ -43,14 +45,6 @@ begin
 | 
			
		||||
	--S.Set_Input_Stream (SI, String_Stream);
 | 
			
		||||
	--S.Set_Output_Stream (SI, Stream); -- specify main output stream.
 | 
			
		||||
 | 
			
		||||
--S.Read (SI, I);
 | 
			
		||||
S.Make_Test_Object (SI, I);
 | 
			
		||||
 | 
			
		||||
	S.Evaluate (SI, I, O);
 | 
			
		||||
S.Print (SI, I);
 | 
			
		||||
Ada.Text_IO.Put_Line ("-------------------------------------------");
 | 
			
		||||
S.Print (SI, O);
 | 
			
		||||
 | 
			
		||||
Ada.Text_IO.Put_Line ("-------------------------------------------");
 | 
			
		||||
S.Run_Loop (SI, I);
 | 
			
		||||
S.Print (SI, I);
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,8 @@ with Ada.Wide_Text_IO;
 | 
			
		||||
 | 
			
		||||
package Stream is
 | 
			
		||||
 | 
			
		||||
	package S renames H2.Scheme;
 | 
			
		||||
	--package S renames H2.Scheme;
 | 
			
		||||
	package S is new  H2.Scheme (Standard.Wide_Character, Standard.Wide_String);
 | 
			
		||||
 | 
			
		||||
	------------------------------------------------------------
 | 
			
		||||
	--type Object_String_Pointer is access all S.Object_String;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user