From 670e21a7aa4b1eb9ed1862a4faa7e0d62d0899cf Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Thu, 10 Jan 2019 23:29:16 +1100 Subject: Test framework for Lexer Combinators --- src/packrat-lexer-combinators.adb | 16 ++++++++-------- src/packrat-lexer-combinators.ads | 10 ++++++---- 2 files changed, 14 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/packrat-lexer-combinators.adb b/src/packrat-lexer-combinators.adb index ef53bb1..1d51262 100644 --- a/src/packrat-lexer-combinators.adb +++ b/src/packrat-lexer-combinators.adb @@ -141,7 +141,7 @@ package body Packrat.Lexer.Combinators is - function Start_Of_Line + function Line_Start (Input : in Element_Array; Start : in Positive; Length : out Natural; @@ -149,10 +149,10 @@ package body Packrat.Lexer.Combinators is return Result is begin return Failure; - end Start_Of_Line; + end Line_Start; - function End_Of_Line + function Line_End (Input : in Element_Array; Start : in Positive; Length : out Natural; @@ -160,10 +160,10 @@ package body Packrat.Lexer.Combinators is return Result is begin return Failure; - end End_Of_Line; + end Line_End; - function Start_Of_Input + function Input_Start (Input : in Element_Array; Start : in Positive; Length : out Natural; @@ -171,10 +171,10 @@ package body Packrat.Lexer.Combinators is return Result is begin return Failure; - end Start_Of_Input; + end Input_Start; - function End_Of_Input + function Input_End (Input : in Element_Array; Start : in Positive; Length : out Natural; @@ -182,7 +182,7 @@ package body Packrat.Lexer.Combinators is return Result is begin return Failure; - end End_Of_Input; + end Input_End; end Packrat.Lexer.Combinators; diff --git a/src/packrat-lexer-combinators.ads b/src/packrat-lexer-combinators.ads index 08bdbec..b346b0a 100644 --- a/src/packrat-lexer-combinators.ads +++ b/src/packrat-lexer-combinators.ads @@ -155,7 +155,7 @@ package Packrat.Lexer.Combinators is generic EOL_Item : in Element; - function Start_Of_Line + function Line_Start (Input : in Element_Array; Start : in Positive; Length : out Natural; @@ -164,21 +164,23 @@ package Packrat.Lexer.Combinators is generic EOL_Item : in Element; - function End_Of_Line + function Line_End (Input : in Element_Array; Start : in Positive; Length : out Natural; Value : out Element_Array) return Result; - function Start_Of_Input + function Input_Start (Input : in Element_Array; Start : in Positive; Length : out Natural; Value : out Element_Array) return Result; - function End_Of_Input + generic + EOF_Item : in Element; + function Input_End (Input : in Element_Array; Start : in Positive; Length : out Natural; -- cgit