type Token is new Limited_Object with private;
type Identifier_Token is new Token with private;
type Number_Token is new Token with private;
type String_Token is new Token with private;
type Token_Type is ( TK_AND, TK_BANG, TK_COMMA, TK_EQUALS, TK_GREATER, TK_GREATER_EQUALS, TK_LEFT_PARENTHESIS, TK_LESS, TK_LESS_EQUALS, TK_MINUS, TK_NOT_EQUALS, TK_OR, TK_PERCENT, TK_PLUS, TK_RIGHT_PARENTHESIS, TK_SLASH, TK_STAR, TK_IDENTIFIER, TK_NUMBER, TK_STRING, TK_EOF );
type Token_Location is record line : Natural := 0; col : Natural := 0; end record;
type A_Token is access all Token'Class;
type A_Identifier_Token is access all Identifier_Token'Class;
type A_Number_Token is access all Number_Token'Class;
type A_String_Token is access all String_Token'Class;
function To_String
( | loc | : Token_Location ) return String; |
function Create_Token
( | text | : String; |
loc | : Token_Location ) return A_Token; |
function Get_Location
( | this | : not null access Token'Class ) return Token_Location; |
function Get_Type
( | this | : not null access Token'Class ) return Token_Type; |
function Get_Name
( | this | : not null access Identifier_Token'Class ) return String; |
function Get_Value
( | this | : not null access Number_Token'Class ) return Long_Float; |
function Get_Value
( | this | : not null access String_Token'Class ) return String; |