From b60f27407c20344f5d48fa7d6f3efe5f9d4e87fb Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Mon, 14 Jan 2019 23:31:07 +1100 Subject: Tests added for Stamp and Ignore procedures in Packrat.Lexer --- src/packrat-lexer.ads | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/packrat-lexer.ads') diff --git a/src/packrat-lexer.ads b/src/packrat-lexer.ads index fe5ff9d..1da9662 100644 --- a/src/packrat-lexer.ads +++ b/src/packrat-lexer.ads @@ -40,7 +40,8 @@ package Packrat.Lexer is type Lexer_Component is access procedure - (Context : in out Lexer_Context); + (Input : in Element_Array; + Context : in out Lexer_Context); type Component_Array is array (Positive range <>) of Lexer_Component; @@ -49,14 +50,22 @@ package Packrat.Lexer is generic Label : in Label_Enum; - Combo : in Combinator; + with function Combo + (Input : in Element_Array; + Start : in Positive) + return Combinator_Result; procedure Stamp - (Context : in out Lexer_Context); + (Input : in Element_Array; + Context : in out Lexer_Context); generic - Combo : in Combinator; + with function Combo + (Input : in Element_Array; + Start : in Positive) + return Combinator_Result; procedure Ignore - (Context : in out Lexer_Context); + (Input : in Element_Array; + Context : in out Lexer_Context); -- cgit