diff options
Diffstat (limited to 'src/packrat-lexer.ads')
| -rw-r--r-- | src/packrat-lexer.ads | 38 | 
1 files changed, 20 insertions, 18 deletions
| diff --git a/src/packrat-lexer.ads b/src/packrat-lexer.ads index a797d7f..9499d50 100644 --- a/src/packrat-lexer.ads +++ b/src/packrat-lexer.ads @@ -9,10 +9,12 @@ private with  generic      type Label_Enum is (<>); -    type Element is private; -    type Element_Array is array (Positive range <>) of Element; +    type Element_Type is private; +    type Element_Array is array (Positive range <>) of Element_Type; -    with package Gen_Tokens is new Tokens (Label_Enum, Element, Element_Array); +    with function "<" (Left, Right : in Element_Type) return Boolean is <>; + +    with package Gen_Tokens is new Tokens (Label_Enum, Element_Type, Element_Array);  package Packrat.Lexer is @@ -102,7 +104,7 @@ package Packrat.Lexer is      generic          Components : in Component_Array; -        Pad_In     : in Element; +        Pad_In     : in Element_Type;          Pad_Out    : in Gen_Tokens.Token;      procedure Scan_Set             (Input   : in     Element_Array; @@ -111,7 +113,7 @@ package Packrat.Lexer is      generic          Components : in Component_Array; -        Pad_In     : in Element; +        Pad_In     : in Element_Type;          Pad_Out    : in Gen_Tokens.Token;      procedure Scan_Set_With             (Input   : in     With_Input; @@ -156,7 +158,7 @@ package Packrat.Lexer is                  Start : in Positive)              return Combinator_Result;          with function Test -               (Item : in Element) +               (Item : in Element_Type)              return Boolean;          Minimum : in Natural := 0;      function Many_Until @@ -169,7 +171,7 @@ package Packrat.Lexer is      generic          with function Test -               (Item : in Element) +               (Item : in Element_Type)              return Boolean;      function Satisfy             (Input : in Element_Array; @@ -178,28 +180,28 @@ package Packrat.Lexer is      generic          with function Test -               (Item : in Element) +               (Item : in Element_Type)              return Boolean;          with function Change -               (From : in Element) -            return Element; +               (From : in Element_Type) +            return Element_Type;      function Satisfy_With             (Input : in Element_Array;              Start : in Positive)          return Combinator_Result;      generic -        Item : in Element; +        Item : in Element_Type;      function Match             (Input : in Element_Array;              Start : in Positive)          return Combinator_Result;      generic -        Item : in Element; +        Item : in Element_Type;          with function Change -               (From : in Element) -            return Element; +               (From : in Element_Type) +            return Element_Type;      function Match_With             (Input : in Element_Array;              Start : in Positive) @@ -221,7 +223,7 @@ package Packrat.Lexer is      generic          with function Test -               (Item : in Element) +               (Item : in Element_Type)              return Boolean;      function Take_While             (Input : in Element_Array; @@ -230,7 +232,7 @@ package Packrat.Lexer is      generic          with function Test -               (Item : in Element) +               (Item : in Element_Type)              return Boolean;      function Take_Until             (Input : in Element_Array; @@ -241,14 +243,14 @@ package Packrat.Lexer is      generic -        EOL_Item : in Element; +        EOL_Item : in Element_Type;      function Line_End             (Input : in Element_Array;              Start : in Positive)          return Combinator_Result;      generic -        EOF_Item : in Element; +        EOF_Item : in Element_Type;      function Input_End             (Input : in Element_Array;              Start : in Positive) | 
