From 81c4526fa275a256bfefe0f8a7cd638369ea1252 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sat, 28 Nov 2020 16:24:04 +1100 Subject: Cleaned up Lexer, Util package names --- test/packrat-lexer-debug.adb | 119 ------------------------------------------- 1 file changed, 119 deletions(-) delete mode 100644 test/packrat-lexer-debug.adb (limited to 'test/packrat-lexer-debug.adb') diff --git a/test/packrat-lexer-debug.adb b/test/packrat-lexer-debug.adb deleted file mode 100644 index 40dbd87..0000000 --- a/test/packrat-lexer-debug.adb +++ /dev/null @@ -1,119 +0,0 @@ - - -package body Packrat.Lexer.Debug is - - - function Create_Result - (Finish : in Natural; - Status : in Result_Status) - return Combinator_Result is - begin - return (Finish, Status); - end Create_Result; - - - function Join - (Left, Right : in Combinator_Result) - return Combinator_Result is - begin - if Left.Status = Success or Left.Status = Optional_More then - return Right; - elsif Left.Status = Needs_More then - return (Left.Finish, Failure); - else - return Left; - end if; - end Join; - - - function Status - (This : in Combinator_Result) - return Result_Status is - begin - return This.Status; - end Status; - - - function Debug_String - (This : in Combinator_Result) - return String is - begin - return Integer'Image (This.Finish) - & " " & Result_Status'Image (This.Status); - end Debug_String; - - - - - - function So_Far - (This : in Lexer_Context) - return Token_Vector is - begin - return (This.Result_So_Far with null record); - end So_Far; - - function Position - (This : in Lexer_Context) - return Positive is - begin - return This.Position; - end Position; - - function Status - (This : in Lexer_Context) - return Result_Status is - begin - return This.Status; - end Status; - - function Has_Pass - (This : in Lexer_Context) - return Boolean is - begin - return not This.Pass_Forward.Is_Empty; - end Has_Pass; - - function Pass - (This : in Lexer_Context) - return Traits.Element_Array is - begin - return This.Pass_Forward.Element; - end Pass; - - function Length - (Vec : in Token_Vector) - return Natural is - begin - return Integer (Token_Vectors.Vector (Vec).Length); - end Length; - - function Element - (Vec : in Token_Vector; - Dex : in Positive) - return Traits.Tokens.Token is - begin - return Token_Vectors.Vector (Vec).Element (Dex); - end Element; - - - - - function Is_Failure - (Result : in Component_Result) - return Boolean is - begin - return Result = Component_Failure; - end Is_Failure; - - function Is_Success - (Result : in Component_Result) - return Boolean is - begin - return Result = Component_Success; - end Is_Success; - - -end Packrat.Lexer.Debug; - - -- cgit