From 84696069475bfa7732326dee94a2c8a852ece827 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Thu, 12 Nov 2020 17:06:06 +1100 Subject: Outline of tests for Parse_Graphs --- src/packrat-parse_graphs.adb | 1 + src/packrat-parse_graphs.ads | 4 ++-- src/packrat.ads | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/packrat-parse_graphs.adb b/src/packrat-parse_graphs.adb index 1705d36..eed2eee 100644 --- a/src/packrat-parse_graphs.adb +++ b/src/packrat-parse_graphs.adb @@ -259,6 +259,7 @@ package body Packrat.Parse_Graphs is SU.Delete (Result, SU.Length (Result), SU.Length (Result)); end loop; -- what delete goes here? + SU.Append (Result, Latin.LF); end loop; return SU.To_String (Result); end Debug_String; diff --git a/src/packrat-parse_graphs.ads b/src/packrat-parse_graphs.ads index 2912110..de5e4e9 100644 --- a/src/packrat-parse_graphs.ads +++ b/src/packrat-parse_graphs.ads @@ -68,8 +68,8 @@ package Packrat.Parse_Graphs is (Left, Right : in Finished_Token_Array) return Boolean; - type Token_Group is private with Type_Invariant => - Ada.Containers.">" (Length (Token_Group), 0); + use type Ada.Containers.Count_Type; + type Token_Group is private with Type_Invariant => Length (Token_Group) > 0; type Token_Group_Array is array (Positive range <>) of Token_Group; function "<" diff --git a/src/packrat.ads b/src/packrat.ads index 6032cb1..58afbaa 100644 --- a/src/packrat.ads +++ b/src/packrat.ads @@ -20,6 +20,10 @@ package Packrat is + -- need to restructure all this to separate these nested packages out into their own files + -- and also to add in a Traits package to contain the Enum/Element/Array generic stuff + + package Errors is -- cgit