Hosted by
|
with Ada.Unchecked_Deallocation;
package body Line_Readers is
procedure Initialize_Line_Reader
(This : access Line_Reader'Class) is
begin
Initialize_Token_Reader(This);
end Initialize_Line_Reader;
procedure Initialize_Line_Reader
(This : access Line_Reader'Class;
Filename : in String) is
begin
Initialize_Token_Reader(This, Filename);
end Initialize_Line_Reader;
procedure Finalize_Line_Reader
(This : access Line_Reader'Class) is
begin
Finalize_Token_Reader(This);
end Finalize_Line_Reader;
function Current_Input
return Line_Reader_Access
is
Result : Line_Reader_Access := new Line_Reader;
begin
Initialize_Line_Reader(Result);
return Result;
end Current_Input;
function Open
(Filename : in String)
return Line_Reader_Access
is
Result : Line_Reader_Access := new Line_Reader;
begin
Initialize_Line_Reader(Result, Filename);
return Result;
end Open;
|