Hosted by
|
with Ada.Unchecked_Deallocation;
with Messages; use Messages;
with Integer_Strings; use Integer_Strings;
with Real_Strings; use Real_Strings;
package body Token_Readers is
procedure Initialize_Token_Reader
(This : access Token_Reader'Class) is
begin
Initialize_Reader(This);
end Initialize_Token_Reader;
procedure Initialize_Token_Reader
(This : access Token_Reader'Class;
Filename : in String) is
begin
Initialize_Reader(This, Filename);
end Initialize_Token_Reader;
procedure Finalize_Token_Reader
(This : access Token_Reader'Class) is
begin
Finalize_Reader(This);
Free(This.Token);
end Finalize_Token_Reader;
function Current_Input
return Token_Reader_Access
is
Result : Token_Reader_Access := new Token_Reader;
begin
Initialize_Token_Reader(Result);
return Result;
end Current_Input;
function Open
(Filename : in String)
return Token_Reader_Access
is
Result : Token_Reader_Access := new Token_Reader;
begin
Initialize_Token_Reader(Result, Filename);
return Result;
end Open;
|