private with Ada.Containers.Indefinite_Holders; generic type Label_Enum is (<>); type Element_Type is private; type Element_Array is array (Positive range <>) of Element_Type; with function "<" (Left, Right : in Element_Type) return Boolean is <>; with function "<" (Left, Right : in Element_Array) return Boolean is <>; package Packrat.Tokens is type Token is private; type Token_Array is array (Positive range <>) of Token; function "<" (Left, Right : in Token) return Boolean; function "<" (Left, Right : in Token_Array) return Boolean; function Create (Ident : in Label_Enum; Start : in Positive; Value : in Element_Array) return Token; -- Note: The Start index indicates where the token was found -- in whatever array it was lexed from. The Value does *not* -- have to correspond with whatever is found there. function Debug_String (This : in Token) return String; function Label (This : in Token) return Label_Enum; function Start (This : in Token) return Positive; function Value (This : in Token) return Element_Array; generic Ident : in Label_Enum; function Is_Label (This : in Token) return Boolean; generic Start : in Positive; function Is_Start (This : in Token) return Boolean; generic Value : in Element_Array; function Is_Value (This : in Token) return Boolean; private package Value_Holders is new Ada.Containers.Indefinite_Holders (Element_Array); function "<" (Left, Right : in Value_Holders.Holder) return Boolean; type Token is record Identifier : Label_Enum; Start_At : Positive; Token_Value : Value_Holders.Holder; end record; end Packrat.Tokens;